You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
193 lines
9.5 KiB
193 lines
9.5 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQSplashScreen Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQSplashScreen Class Reference</h1>
|
||
|
|
||
|
<p>The TQSplashScreen widget provides a splash screen that can
|
||
|
be shown during application startup.
|
||
|
<a href="#details">More...</a>
|
||
3 months ago
|
<p><tt>#include <<a href="tqsplashscreen-h.html">tqsplashscreen.h</a>></tt>
|
||
7 months ago
|
<p>Inherits <a href="tqwidget.html">TQWidget</a>.
|
||
3 months ago
|
<p><a href="tqsplashscreen-members.html">List of all member functions.</a>
|
||
13 years ago
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQSplashScreen"><b>TQSplashScreen</b></a> ( const TQPixmap & pixmap = TQPixmap ( ), WFlags f = 0 )</li>
|
||
|
<li class=fn>virtual <a href="#~TQSplashScreen"><b>~TQSplashScreen</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#setPixmap"><b>setPixmap</b></a> ( const TQPixmap & pixmap )</li>
|
||
|
<li class=fn>TQPixmap * <a href="#pixmap"><b>pixmap</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#finish"><b>finish</b></a> ( TQWidget * mainWin )</li>
|
||
|
<li class=fn>void <a href="#repaint"><b>repaint</b></a> ()</li>
|
||
|
</ul>
|
||
|
<h2>Public Slots</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#message"><b>message</b></a> ( const TQString & message, int alignment = AlignLeft, const TQColor & color = black )</li>
|
||
|
<li class=fn>void <a href="#clear"><b>clear</b></a> ()</li>
|
||
|
</ul>
|
||
|
<h2>Signals</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#messageChanged"><b>messageChanged</b></a> ( const TQString & message )</li>
|
||
|
</ul>
|
||
|
<h2>Protected Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn>virtual void <a href="#drawContents"><b>drawContents</b></a> ( TQPainter * painter )</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
The TQSplashScreen widget provides a splash screen that can
|
||
|
be shown during application startup.
|
||
|
<p>
|
||
|
|
||
|
<p> A splash screen is a widget that is usually displayed when an
|
||
|
application is being started. Splash screens are often used for
|
||
|
applications that have long start up times (e.g. database or
|
||
|
networking applications that take time to establish connections) to
|
||
|
provide the user with feedback that the application is loading.
|
||
|
<p> The splash screen appears centered on the screen. It may be useful to add
|
||
3 months ago
|
the <a href="tqt.html#WidgetFlags-enum">WStyle_StaysOnTop</a> if you desire to keep above all the windows in the
|
||
13 years ago
|
GUI.
|
||
|
<p> Some X11 window managers do not support the "stays on top" flag. A
|
||
7 months ago
|
solution is to set up a timer that periodically calls <a href="tqwidget.html#raise">raise</a>() on
|
||
13 years ago
|
the splash screen to simulate the "stays on top" effect.
|
||
|
<p> The most common usage is to show a splash screen before the main
|
||
|
widget is displayed on the screen. This is illustrated in the
|
||
|
following code snippet.
|
||
|
<p> <pre>
|
||
|
int main( int argc, char **argv )
|
||
|
{
|
||
13 years ago
|
<a href="ntqapplication.html">TQApplication</a> app( argc, argv );
|
||
5 months ago
|
<a href="tqpixmap.html">TQPixmap</a> pixmap( "splash.png" );
|
||
13 years ago
|
TQSplashScreen *splash = new TQSplashScreen( pixmap );
|
||
7 months ago
|
splash-><a href="tqwidget.html#show">show</a>();
|
||
6 months ago
|
<a href="tqmainwindow.html">TQMainWindow</a> *mainWin = new <a href="tqmainwindow.html">TQMainWindow</a>;
|
||
13 years ago
|
...
|
||
13 years ago
|
app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( mainWin );
|
||
7 months ago
|
mainWin-><a href="tqwidget.html#show">show</a>();
|
||
13 years ago
|
splash-><a href="#finish">finish</a>( mainWin );
|
||
|
delete splash;
|
||
13 years ago
|
return app.<a href="ntqapplication.html#exec">exec</a>();
|
||
13 years ago
|
}
|
||
|
</pre>
|
||
|
|
||
|
<p> It is sometimes useful to update the splash screen with messages,
|
||
|
for example, announcing connections established or modules loaded
|
||
|
as the application starts up. TQSplashScreen supports this with the
|
||
|
<a href="#message">message</a>() function. If you wish to do your own drawing you can
|
||
|
get a pointer to the pixmap used in the splash screen with <a href="#pixmap">pixmap</a>().
|
||
|
Alternatively, you can subclass TQSplashScreen and reimplement
|
||
|
<a href="#drawContents">drawContents</a>().
|
||
|
<p> The user can hide the splash screen by clicking on it with the
|
||
|
mouse. Since the splash screen is typically displayed before the
|
||
|
event loop has started running, it is necessary to periodically
|
||
13 years ago
|
call <a href="ntqapplication.html#processEvents">TQApplication::processEvents</a>() to receive the mouse clicks.
|
||
13 years ago
|
<p> <pre>
|
||
5 months ago
|
<a href="tqpixmap.html">TQPixmap</a> pixmap( "splash.png" );
|
||
13 years ago
|
TQSplashScreen *splash = new TQSplashScreen( pixmap );
|
||
7 months ago
|
splash-><a href="tqwidget.html#show">show</a>();
|
||
13 years ago
|
... // Loading some items
|
||
|
splash-><a href="#message">message</a>( "Loaded modules" );
|
||
13 years ago
|
tqApp-><a href="ntqapplication.html#processEvents">processEvents</a>();
|
||
13 years ago
|
... // Establishing connections
|
||
|
splash-><a href="#message">message</a>( "Established connections" );
|
||
13 years ago
|
tqApp-><a href="ntqapplication.html#processEvents">processEvents</a>();
|
||
13 years ago
|
</pre>
|
||
|
|
||
|
<p> <p>See also <a href="misc.html">Miscellaneous Classes</a>.
|
||
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
5 months ago
|
<h3 class=fn><a name="TQSplashScreen"></a>TQSplashScreen::TQSplashScreen ( const <a href="tqpixmap.html">TQPixmap</a> & pixmap = TQPixmap ( ), WFlags f = 0 )
|
||
13 years ago
|
</h3>
|
||
|
Construct a splash screen that will display the <em>pixmap</em>.
|
||
|
<p> There should be no need to set the widget flags, <em>f</em>, except
|
||
3 months ago
|
perhaps <a href="tqt.html#WidgetFlags-enum">WDestructiveClose</a> or <a href="tqt.html#WidgetFlags-enum">WStyle_StaysOnTop</a>.
|
||
13 years ago
|
|
||
|
<h3 class=fn><a name="~TQSplashScreen"></a>TQSplashScreen::~TQSplashScreen ()<tt> [virtual]</tt>
|
||
|
</h3>
|
||
|
Destructor.
|
||
|
|
||
|
<h3 class=fn>void <a name="clear"></a>TQSplashScreen::clear ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Removes the message being displayed on the splash screen
|
||
|
<p> <p>See also <a href="#message">message</a>().
|
||
|
|
||
5 months ago
|
<h3 class=fn>void <a name="drawContents"></a>TQSplashScreen::drawContents ( <a href="tqpainter.html">TQPainter</a> * painter )<tt> [virtual protected]</tt>
|
||
13 years ago
|
</h3>
|
||
|
Draw the contents of the splash screen using painter <em>painter</em>.
|
||
|
The default implementation draws the message passed by <a href="#message">message</a>().
|
||
|
Reimplement this function if you want to do your own drawing on
|
||
|
the splash screen.
|
||
|
|
||
7 months ago
|
<h3 class=fn>void <a name="finish"></a>TQSplashScreen::finish ( <a href="tqwidget.html">TQWidget</a> * mainWin )
|
||
13 years ago
|
</h3>
|
||
|
Makes the splash screen wait until the widget <em>mainWin</em> is displayed
|
||
7 months ago
|
before calling <a href="tqwidget.html#close">close</a>() on itself.
|
||
13 years ago
|
|
||
5 months ago
|
<h3 class=fn>void <a name="message"></a>TQSplashScreen::message ( const <a href="tqstring.html">TQString</a> & message, int alignment = AlignLeft, const <a href="tqcolor.html">TQColor</a> & color = black )<tt> [slot]</tt>
|
||
13 years ago
|
</h3>
|
||
|
Draws the <em>message</em> text onto the splash screen with color <em>color</em> and aligns the text according to the flags in <em>alignment</em>.
|
||
3 months ago
|
<p> <p>See also <a href="tqt.html#AlignmentFlags-enum">TQt::AlignmentFlags</a> and <a href="#clear">clear</a>().
|
||
13 years ago
|
|
||
6 months ago
|
<h3 class=fn>void <a name="messageChanged"></a>TQSplashScreen::messageChanged ( const <a href="tqstring.html">TQString</a> & message )<tt> [signal]</tt>
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> This signal is emitted when the message on the splash screen
|
||
|
changes. <em>message</em> is the new message and is a null-string
|
||
|
when the message has been removed.
|
||
|
<p> <p>See also <a href="#message">message</a>() and <a href="#clear">clear</a>().
|
||
|
|
||
5 months ago
|
<h3 class=fn><a href="tqpixmap.html">TQPixmap</a> * <a name="pixmap"></a>TQSplashScreen::pixmap () const
|
||
13 years ago
|
</h3>
|
||
|
Returns the pixmap that is used in the splash screen. The image
|
||
|
does not have any of the text drawn by <a href="#message">message</a>() calls.
|
||
|
|
||
|
<h3 class=fn>void <a name="repaint"></a>TQSplashScreen::repaint ()
|
||
|
</h3>
|
||
7 months ago
|
This overrides <a href="tqwidget.html#repaint">TQWidget::repaint</a>(). It differs from the standard
|
||
13 years ago
|
repaint function in that it also calls <a href="ntqapplication.html#flush">TQApplication::flush</a>() to
|
||
13 years ago
|
ensure the updates are displayed, even when there is no event loop
|
||
|
present.
|
||
|
|
||
5 months ago
|
<h3 class=fn>void <a name="setPixmap"></a>TQSplashScreen::setPixmap ( const <a href="tqpixmap.html">TQPixmap</a> & pixmap )
|
||
13 years ago
|
</h3>
|
||
|
Sets the pixmap that will be used as the splash screen's image to
|
||
|
<em>pixmap</em>.
|
||
|
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|