~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qsplashscreen.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSplashScreen Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QSplashScreen widget provides a splash screen that can be shown during application startup. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsplashscreen.html#QSplashScreen">__init__</a></b> (<i>self</i>, QPixmap&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qsplashscreen.html#QSplashScreen-2">__init__</a></b> (<i>self</i>, QWidget, QPixmap&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qsplashscreen.html#clearMessage">clearMessage</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#drawContents">drawContents</a></b> (<i>self</i>, QPainter)</li><li><div class="fn" />bool <b><a href="qsplashscreen.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qsplashscreen.html#finish">finish</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qsplashscreen.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" />QPixmap <b><a href="qsplashscreen.html#pixmap">pixmap</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#repaint">repaint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#setPixmap">setPixmap</a></b> (<i>self</i>, QPixmap)</li><li><div class="fn" /><b><a href="qsplashscreen.html#showMessage">showMessage</a></b> (<i>self</i>, QString, int&#160;<i>alignment</i>&#160;=&#160;Qt.AlignLeft, QColor&#160;<i>color</i>&#160;=&#160;Qt.black)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qsplashscreen.html#messageChanged">messageChanged</a></b> (const QString&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSplashScreen widget provides a splash screen that can be shown during application startup.</p>
11
 
<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>
12
 
<p>The splash screen appears in the center of the screen. It may be useful to add the <a href="qt.html#WindowType-enum">Qt.WindowStaysOnTopHint</a> to the splash widget's window flags if you want to keep it above all the other windows on the desktop.</p>
13
 
<p>Some X11 window managers do not support the "stays on top" flag. A solution is to set up a timer that periodically calls <a href="qwidget.html#raise">raise_</a>() on the splash screen to simulate the "stays on top" effect.</p>
14
 
<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 in which a splash screen is displayed and some initialization tasks are performed before the application's main window is shown:</p>
15
 
<pre> int main(int argc, char *argv[])
 
9
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSplashScreen Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QSplashScreen widget provides a splash screen that can be
 
10
shown during application startup. <a href="#details">More...</a></p>
 
11
 
 
12
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsplashscreen.html#QSplashScreen">__init__</a></b> (<i>self</i>, QPixmap&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qsplashscreen.html#QSplashScreen-2">__init__</a></b> (<i>self</i>, QWidget, QPixmap&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qsplashscreen.html#clearMessage">clearMessage</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#drawContents">drawContents</a></b> (<i>self</i>, QPainter)</li><li><div class="fn" />bool <b><a href="qsplashscreen.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qsplashscreen.html#finish">finish</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qsplashscreen.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" />QPixmap <b><a href="qsplashscreen.html#pixmap">pixmap</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#repaint">repaint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplashscreen.html#setPixmap">setPixmap</a></b> (<i>self</i>, QPixmap)</li><li><div class="fn" /><b><a href="qsplashscreen.html#showMessage">showMessage</a></b> (<i>self</i>, QString, int&#160;<i>alignment</i>&#160;=&#160;Qt.AlignLeft, QColor&#160;<i>color</i>&#160;=&#160;Qt.black)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qsplashscreen.html#messageChanged">messageChanged</a></b> (const QString&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSplashScreen widget provides a splash screen that can be
 
13
shown during application startup.</p>
 
14
<p>A splash screen is a widget that is usually displayed when an
 
15
application is being started. Splash screens are often used for
 
16
applications that have long start up times (e.g. database or
 
17
networking applications that take time to establish connections) to
 
18
provide the user with feedback that the application is loading.</p>
 
19
<p>The splash screen appears in the center of the screen. It may be
 
20
useful to add the <a href="qt.html#WindowType-enum">Qt.WindowStaysOnTopHint</a> to the
 
21
splash widget's window flags if you want to keep it above all the
 
22
other windows on the desktop.</p>
 
23
<p>Some X11 window managers do not support the "stays on top" flag.
 
24
A solution is to set up a timer that periodically calls <a href="qwidget.html#raise">raise_</a>() on the splash screen to simulate
 
25
the "stays on top" effect.</p>
 
26
<p>The most common usage is to show a splash screen before the main
 
27
widget is displayed on the screen. This is illustrated in the
 
28
following code snippet in which a splash screen is displayed and
 
29
some initialization tasks are performed before the application's
 
30
main window is shown:</p>
 
31
<pre class="highlightedCode brush: cpp">
 
32
 int main(int argc, char *argv[])
16
33
 {
17
34
     QApplication app(argc, argv);
18
35
     QPixmap pixmap(":/splash.png");
24
41
     window.show();
25
42
     splash.finish(&amp;window);
26
43
     return app.exec();
27
 
 }</pre>
28
 
<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 call <a href="qcoreapplication.html#processEvents">QApplication.processEvents</a>() to receive the mouse clicks.</p>
29
 
<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:</p>
30
 
<pre> QPixmap pixmap(":/splash.png");
 
44
 }
 
45
</pre>
 
46
<p>The user can hide the splash screen by clicking on it with the
 
47
mouse. Since the splash screen is typically displayed before the
 
48
event loop has started running, it is necessary to periodically
 
49
call <a href="qcoreapplication.html#processEvents">QApplication.processEvents</a>()
 
50
to receive the mouse clicks.</p>
 
51
<p>It is sometimes useful to update the splash screen with
 
52
messages, for example, announcing connections established or
 
53
modules loaded as the application starts up:</p>
 
54
<pre class="highlightedCode brush: cpp">
 
55
 QPixmap pixmap(":/splash.png");
31
56
 QSplashScreen *splash = new QSplashScreen(pixmap);
32
57
 splash-&gt;show();
33
58
 
39
64
 ... <span class="comment">// Establishing connections</span>
40
65
 splash-&gt;showMessage("Established connections");
41
66
 
42
 
 qApp-&gt;processEvents();</pre>
43
 
<p>QSplashScreen supports this with the <a href="qsplashscreen.html#showMessage">showMessage</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="qsplashscreen.html#pixmap">pixmap</a>(). Alternatively, you can subclass QSplashScreen and reimplement <a href="qsplashscreen.html#drawContents">drawContents</a>().</p>
44
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSplashScreen" />QSplashScreen.__init__ (<i>self</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>Construct a splash screen that will display the <i>pixmap</i>.</p>
45
 
<p>There should be no need to set the widget flags, <i>f</i>, except perhaps <a href="qt.html#WindowType-enum">Qt.WindowStaysOnTopHint</a>.</p>
 
67
 qApp-&gt;processEvents();
 
68
</pre>
 
69
<p>QSplashScreen supports this with the <a href="qsplashscreen.html#showMessage">showMessage</a>() function. If you
 
70
wish to do your own drawing you can get a pointer to the pixmap
 
71
used in the splash screen with <a href="qsplashscreen.html#pixmap">pixmap</a>(). Alternatively, you can
 
72
subclass QSplashScreen and reimplement <a href="qsplashscreen.html#drawContents">drawContents</a>().</p>
 
73
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSplashScreen" />QSplashScreen.__init__ (<i>self</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>Construct a splash screen that will display the
 
74
<i>pixmap</i>.</p>
 
75
<p>There should be no need to set the widget flags, <i>f</i>,
 
76
except perhaps <a href="qt.html#WindowType-enum">Qt.WindowStaysOnTopHint</a>.</p>
 
77
 
 
78
 
46
79
<h3 class="fn"><a name="QSplashScreen-2" />QSplashScreen.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>&#160;=&#160;QPixmap(), <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>The <i>QWidget</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>This is an overloaded function.</p>
47
 
<p>This function allows you to specify a parent for your splashscreen. The typical use for this constructor is if you have a multiple screens and prefer to have the splash screen on a different screen than your primary one. In that case pass the proper <a href="examples.html#desktop">desktop</a>() as the <i>parent</i>.</p>
48
 
<a name="//apple_ref/cpp/instm/QSplashScreen/~QSplashScreen" />
 
80
<p>This function allows you to specify a parent for your
 
81
splashscreen. The typical use for this constructor is if you have a
 
82
multiple screens and prefer to have the splash screen on a
 
83
different screen than your primary one. In that case pass the
 
84
proper desktop() as the <i>parent</i>.</p>
 
85
 
 
86
 
49
87
<h3 class="fn"><a name="clearMessage" />QSplashScreen.clearMessage (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clearMessage()</tt>.</p><p>Removes the message being displayed on the splash screen</p>
50
88
<p>See also <a href="qsplashscreen.html#showMessage">showMessage</a>().</p>
51
 
<a name="//apple_ref/cpp/instm/QSplashScreen/drawContents" />
52
 
<h3 class="fn"><a name="drawContents" />QSplashScreen.drawContents (<i>self</i>, <a href="qpainter.html">QPainter</a>)</h3><p>Draw the contents of the splash screen using painter <i>painter</i>. The default implementation draws the message passed by <a href="qsplashscreen.html#showMessage">showMessage</a>(). Reimplement this function if you want to do your own drawing on the splash screen.</p>
53
 
<a name="//apple_ref/cpp/instm/QSplashScreen/event" />
 
89
 
 
90
 
 
91
<h3 class="fn"><a name="drawContents" />QSplashScreen.drawContents (<i>self</i>, <a href="qpainter.html">QPainter</a>)</h3><p>Draw the contents of the splash screen using painter
 
92
<i>painter</i>. The default implementation draws the message passed
 
93
by <a href="qsplashscreen.html#showMessage">showMessage</a>().
 
94
Reimplement this function if you want to do your own drawing on the
 
95
splash screen.</p>
 
96
 
 
97
 
54
98
<h3 class="fn"><a name="event" />bool QSplashScreen.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
55
 
<a name="//apple_ref/cpp/instm/QSplashScreen/finish" />
56
 
<h3 class="fn"><a name="finish" />QSplashScreen.finish (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>Makes the splash screen wait until the widget <i>mainWin</i> is displayed before calling <a href="qwidget.html#close">close</a>() on itself.</p>
57
 
<a name="//apple_ref/cpp/instm/QSplashScreen/messageChanged" />
 
99
 
 
100
 
 
101
<h3 class="fn"><a name="finish" />QSplashScreen.finish (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>Makes the splash screen wait until the widget <i>mainWin</i> is
 
102
displayed before calling <a href="qwidget.html#close">close</a>()
 
103
on itself.</p>
 
104
 
 
105
 
58
106
<h3 class="fn"><a name="mousePressEvent" />QSplashScreen.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>
59
 
<a name="//apple_ref/cpp/instm/QSplashScreen/pixmap" />
60
 
<h3 class="fn"><a name="pixmap" /><a href="qpixmap.html">QPixmap</a> QSplashScreen.pixmap (<i>self</i>)</h3><p>Returns the pixmap that is used in the splash screen. The image does not have any of the text drawn by <a href="qsplashscreen.html#showMessage">showMessage</a>() calls.</p>
 
107
 
 
108
 
 
109
<h3 class="fn"><a name="pixmap" /><a href="qpixmap.html">QPixmap</a> QSplashScreen.pixmap (<i>self</i>)</h3><p>Returns the pixmap that is used in the splash screen. The image
 
110
does not have any of the text drawn by <a href="qsplashscreen.html#showMessage">showMessage</a>() calls.</p>
61
111
<p>See also <a href="qsplashscreen.html#setPixmap">setPixmap</a>().</p>
62
 
<a name="//apple_ref/cpp/instm/QSplashScreen/repaint" />
63
 
<h3 class="fn"><a name="repaint" />QSplashScreen.repaint (<i>self</i>)</h3><p>This overrides <a href="qwidget.html#repaint">QWidget.repaint</a>(). It differs from the standard repaint function in that it also calls <a href="qcoreapplication.html#flush">QApplication.flush</a>() to ensure the updates are displayed, even when there is no event loop present.</p>
64
 
<a name="//apple_ref/cpp/instm/QSplashScreen/setPixmap" />
65
 
<h3 class="fn"><a name="setPixmap" />QSplashScreen.setPixmap (<i>self</i>, <a href="qpixmap.html">QPixmap</a>)</h3><p>Sets the pixmap that will be used as the splash screen's image to <i>pixmap</i>.</p>
 
112
 
 
113
 
 
114
<h3 class="fn"><a name="repaint" />QSplashScreen.repaint (<i>self</i>)</h3><p>This overrides <a href="qwidget.html#repaint">QWidget.repaint</a>(). It differs from the
 
115
standard repaint function in that it also calls <a href="qcoreapplication.html#flush">QApplication.flush</a>() to ensure
 
116
the updates are displayed, even when there is no event loop
 
117
present.</p>
 
118
 
 
119
 
 
120
<h3 class="fn"><a name="setPixmap" />QSplashScreen.setPixmap (<i>self</i>, <a href="qpixmap.html">QPixmap</a>)</h3><p>Sets the pixmap that will be used as the splash screen's image
 
121
to <i>pixmap</i>.</p>
66
122
<p>See also <a href="qsplashscreen.html#pixmap">pixmap</a>().</p>
67
 
<a name="//apple_ref/cpp/instm/QSplashScreen/showMessage" />
68
 
<h3 class="fn"><a name="showMessage" />QSplashScreen.showMessage (<i>self</i>, QString, int&#160;<i>alignment</i>&#160;=&#160;Qt.AlignLeft, <a href="qcolor.html">QColor</a>&#160;<i>color</i>&#160;=&#160;Qt.black)</h3><p>This method is also a Qt slot with the C++ signature <tt>void showMessage(const QString&amp;,int = Qt.AlignLeft,const QColor&amp; = Qt.black)</tt>.</p><p>Draws the <i>message</i> text onto the splash screen with color <i>color</i> and aligns the text according to the flags in <i>alignment</i>.</p>
69
 
<p>See also <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a> and <a href="qsplashscreen.html#clearMessage">clearMessage</a>().</p>
70
 
<p /><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="messageChanged" />void messageChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the message on the splash screen changes. <i>message</i> is the new message and is a null-string when the message has been removed.</p>
 
123
 
 
124
 
 
125
<h3 class="fn"><a name="showMessage" />QSplashScreen.showMessage (<i>self</i>, QString, int&#160;<i>alignment</i>&#160;=&#160;Qt.AlignLeft, <a href="qcolor.html">QColor</a>&#160;<i>color</i>&#160;=&#160;Qt.black)</h3><p>This method is also a Qt slot with the C++ signature <tt>void showMessage(const QString&amp;,int = Qt.AlignLeft,const QColor&amp; = Qt.black)</tt>.</p><p>Draws the <i>message</i> text onto the splash screen with color
 
126
<i>color</i> and aligns the text according to the flags in
 
127
<i>alignment</i>.</p>
 
128
<p>See also <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a>
 
129
and <a href="qsplashscreen.html#clearMessage">clearMessage</a>().</p>
 
130
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="messageChanged" />void messageChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the message on the splash screen
 
131
changes. <i>message</i> is the new message and is a null-string
 
132
when the message has been removed.</p>
71
133
<p>See also <a href="qsplashscreen.html#showMessage">showMessage</a>() and <a href="qsplashscreen.html#clearMessage">clearMessage</a>().</p>
72
 
<a name="//apple_ref/cpp/instm/QSplashScreen/mousePressEvent" />
73
 
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
134
 
 
135
 
 
136
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'