File: qfinalstate.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (33 lines) | stat: -rw-r--r-- 4,566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QFinalState Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</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">QFinalState Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QFinalState class provides a final state. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractstate.html">QAbstractState</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qfinalstate.html#QFinalState">__init__</a></b> (<i>self</i>, QState&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qfinalstate.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qfinalstate.html#onEntry">onEntry</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qfinalstate.html#onExit">onExit</a></b> (<i>self</i>, QEvent)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QFinalState class provides a final state.</p>
<p>A final state is used to communicate that (part of) a <a href="qstatemachine.html">QStateMachine</a> has finished its work. When a final top-level state is entered, the state machine's <a href="qstate.html#finished">finished</a>() signal is emitted. In general, when a final substate (a child of a <a href="qstate.html">QState</a>) is entered, the parent state's <a href="qstate.html#finished">finished</a>() signal is emitted. QFinalState is part of <a href="statemachine-api.html">The State Machine Framework</a>.</p>
<p>To use a final state, you create a QFinalState object and add a transition to it from another state. Example:</p>
<pre> QPushButton button;

 QStateMachine machine;
 QState *s1 = new QState();
 QFinalState *s2 = new QFinalState();
 s1-&gt;addTransition(&amp;button, SIGNAL(clicked()), s2);
 machine.addState(s1);
 machine.addState(s2);

 QObject.connect(&amp;machine, SIGNAL(finished()), QApplication.instance(), SLOT(quit()));
 machine.setInitialState(s1);
 machine.start();</pre>
<p>See also <a href="qstate.html#finished">QStateMachine.finished</a>() and <a href="qstate.html#finished">QState.finished</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QFinalState" />QFinalState.__init__ (<i>self</i>, <a href="qstate.html">QState</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new <a href="qfinalstate.html">QFinalState</a> object with the given <i>parent</i> state.</p>
<a name="//apple_ref/cpp/instm/QFinalState/~QFinalState" />
<h3 class="fn"><a name="event" />bool QFinalState.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<a name="//apple_ref/cpp/instm/QFinalState/onEntry" />
<h3 class="fn"><a name="onEntry" />QFinalState.onEntry (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qabstractstate.html#onEntry">QAbstractState.onEntry</a>().</p>
<a name="//apple_ref/cpp/instm/QFinalState/onExit" />
<h3 class="fn"><a name="onExit" />QFinalState.onExit (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qabstractstate.html#onExit">QAbstractState.onExit</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 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.2</td></tr></table></div></address></body></html>