Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1046

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?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>QStateMachine 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="index.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">QStateMachine Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QStateMachine class provides a hierarchical finite state
machine. <a href="#details">More...</a></p>

<p>Inherits <a href="qstate.html">QState</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qstatemachine.html#Error-enum">Error</a></b> { NoError, NoInitialStateError, NoDefaultStateInHistoryStateError, NoCommonAncestorForTransitionError }</li><li><div class="fn" />enum <b><a href="qstatemachine.html#EventPriority-enum">EventPriority</a></b> { NormalPriority, HighPriority }</li><li><div class="fn" />enum <b><a href="qstatemachine.html#RestorePolicy-enum">RestorePolicy</a></b> { DontRestoreProperties, RestoreProperties }</li><li><div class="fn" />class <b><a href="qstatemachine-signalevent.html">SignalEvent</a></b></li><li><div class="fn" />class <b><a href="qstatemachine-wrappedevent.html">WrappedEvent</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstatemachine.html#QStateMachine">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstatemachine.html#addDefaultAnimation">addDefaultAnimation</a></b> (<i>self</i>, QAbstractAnimation&#160;<i>animation</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#addState">addState</a></b> (<i>self</i>, QAbstractState&#160;<i>state</i>)</li><li><div class="fn" />bool <b><a href="qstatemachine.html#cancelDelayedEvent">cancelDelayedEvent</a></b> (<i>self</i>, int&#160;<i>id</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#clearError">clearError</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QAbstractState <b><a href="qstatemachine.html#configuration">configuration</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QAbstractAnimation <b><a href="qstatemachine.html#defaultAnimations">defaultAnimations</a></b> (<i>self</i>)</li><li><div class="fn" />Error <b><a href="qstatemachine.html#error">error</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qstatemachine.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qstatemachine.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" />bool <b><a href="qstatemachine.html#eventFilter">eventFilter</a></b> (<i>self</i>, QObject&#160;<i>watched</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />RestorePolicy <b><a href="qstatemachine.html#globalRestorePolicy">globalRestorePolicy</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qstatemachine.html#isAnimated">isAnimated</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qstatemachine.html#isRunning">isRunning</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#onEntry">onEntry</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#onExit">onExit</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />int <b><a href="qstatemachine.html#postDelayedEvent">postDelayedEvent</a></b> (<i>self</i>, QEvent&#160;<i>event</i>, int&#160;<i>delay</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#postEvent">postEvent</a></b> (<i>self</i>, QEvent&#160;<i>event</i>, EventPriority&#160;<i>priority</i>&#160;=&#160;QStateMachine.NormalPriority)</li><li><div class="fn" /><b><a href="qstatemachine.html#removeDefaultAnimation">removeDefaultAnimation</a></b> (<i>self</i>, QAbstractAnimation&#160;<i>animation</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#removeState">removeState</a></b> (<i>self</i>, QAbstractState&#160;<i>state</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#setAnimated">setAnimated</a></b> (<i>self</i>, bool&#160;<i>enabled</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#setGlobalRestorePolicy">setGlobalRestorePolicy</a></b> (<i>self</i>, RestorePolicy&#160;<i>restorePolicy</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#start">start</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qstatemachine.html#stop">stop</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qstatemachine.html#started">started</a></b> ()</li><li><div class="fn" />void <b><a href="qstatemachine.html#stopped">stopped</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStateMachine class provides a hierarchical finite state
machine.</p>
<p>QStateMachine is based on the concepts and notation of <a href="http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf">
Statecharts</a>. QStateMachine is part of <a href="statemachine-api.html">The State Machine Framework</a>.</p>
<p>A state machine manages a set of states (classes that inherit
from <a href="qabstractstate.html">QAbstractState</a>) and
transitions (descendants of <a href="qabstracttransition.html">QAbstractTransition</a>) between those
states; these states and transitions define a state graph. Once a
state graph has been built, the state machine can execute it.
QStateMachine's execution algorithm is based on the <a href="http://www.w3.org/TR/scxml/">State Chart XML (SCXML)</a>
algorithm. The framework's <a href="statemachine-api.html">overview</a> gives several state graphs and
the code to build them.</p>
<p>Use the <a href="qstatemachine.html#addState">addState</a>()
function to add a top-level state to the state machine. States are
removed with the <a href="qstatemachine.html#removeState">removeState</a>() function.
Removing states while the machine is running is discouraged.</p>
<p>Before the machine can be started, the <a href="qstate.html#initialState-prop">initial state</a> must be set. The
initial state is the state that the machine enters when started.
You can then <a href="qstatemachine.html#start">start</a>() the
state machine. The <a href="qstatemachine.html#started">started</a>() signal is emitted when
the initial state is entered.</p>
<p>The machine is event driven and keeps its own event loop. Events
are posted to the machine through <a href="qstatemachine.html#postEvent">postEvent</a>(). Note that this
means that it executes asynchronously, and that it will not
progress without a running event loop. You will normally not have
to post events to the machine directly as Qt's transitions, e.g.,
<a href="qeventtransition.html">QEventTransition</a> and its
subclasses, handle this. But for custom transitions triggered by
events, <a href="qstatemachine.html#postEvent">postEvent</a>() is
useful.</p>
<p>The state machine processes events and takes transitions until a
top-level final state is entered; the state machine then emits the
<a href="qstate.html#finished">finished</a>() signal. You can also
<a href="qstatemachine.html#stop">stop</a>() the state machine
explicitly. The <a href="qstatemachine.html#stopped">stopped</a>()
signal is emitted in this case.</p>
<p>The following snippet shows a state machine that will finish
when a button is clicked:</p>
<pre class="cpp">
 <span class="type"><a href="qpushbutton.html">QPushButton</a></span> button;

 <span class="type">QStateMachine</span> machine;
 <span class="type"><a href="qstate.html">QState</a></span> <span class="operator">*</span>s1 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qstate.html">QState</a></span>();
 s1<span class="operator">-</span><span class="operator">&gt;</span><a href="qstate.html#assignProperty">assignProperty</a>(<span class="operator">&amp;</span>button<span class="operator">,</span> <span class="string">"text"</span><span class="operator">,</span> <span class="string">"Click me"</span>);

 <span class="type"><a href="qfinalstate.html">QFinalState</a></span> <span class="operator">*</span>s2 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qfinalstate.html">QFinalState</a></span>();
 s1<span class="operator">-</span><span class="operator">&gt;</span><a href="qstate.html#addTransition">addTransition</a>(<span class="operator">&amp;</span>button<span class="operator">,</span> SIGNAL(clicked())<span class="operator">,</span> s2);

 machine<span class="operator">.</span><a href="qstatemachine.html#addState">addState</a>(s1);
 machine<span class="operator">.</span><a href="qstatemachine.html#addState">addState</a>(s2);
 machine<span class="operator">.</span><a href="qstate.html#initialState-prop">setInitialState</a>(s1);
 machine<span class="operator">.</span><a href="qstatemachine.html#start">start</a>();
</pre>
<p>This code example uses <a href="qstate.html">QState</a>, which
inherits <a href="qabstractstate.html">QAbstractState</a>. The
<a href="qstate.html">QState</a> class provides a state that you
can use to set properties and invoke methods on <a href="qobject.html">QObject</a>s when the state is entered or exited. It
also contains convenience functions for adding transitions, e.g.,
<a href="qsignaltransition.html">QSignalTransition</a>s as in this
example. See the <a href="qstate.html">QState</a> class description
for further details.</p>
<p>If an error is encountered, the machine will look for an
<a href="qstate.html#errorState-prop">error state</a>, and if one
is available, it will enter this state. The types of errors
possible are described by the <a href="qstatemachine.html#Error-enum">Error</a> enum. After the error
state is entered, the type of the error can be retrieved with
<a href="qstatemachine.html#error">error</a>(). The execution of
the state graph will not stop when the error state is entered. If
no error state applies to the erroneous state, the machine will
stop executing and an error message will be printed to the
console.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Error-enum" />QStateMachine.Error</h3><p>This enum type defines errors that can occur in the state
machine at run time. When the state machine encounters an
unrecoverable error at run time, it will set the error code
returned by <a href="qstatemachine.html#error">error</a>(), the
error message returned by <a href="qstatemachine.html#errorString-prop">errorString</a>(), and enter
an error state based on the context of the error.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStateMachine.NoError</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">No error has occurred.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStateMachine.NoInitialStateError</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The machine has entered a <a href="qstate.html">QState</a> with children which does not have an
initial state set. The context of this error is the state which is
missing an initial state.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStateMachine.NoDefaultStateInHistoryStateError</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The machine has entered a <a href="qhistorystate.html">QHistoryState</a> which does not have a
default state set. The context of this error is the <a href="qhistorystate.html">QHistoryState</a> which is missing a default
state.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStateMachine.NoCommonAncestorForTransitionError</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The machine has selected a transition whose
source and targets are not part of the same tree of states, and
thus are not part of the same state machine. Commonly, this could
mean that one of the states has not been given any parent or added
to any machine. The context of this error is the source state of
the transition.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstate.html#errorState-prop">setErrorState</a>().</p>


<h3 class="fn"><a name="EventPriority-enum" />QStateMachine.EventPriority</h3><p>This enum type specifies the priority of an event posted to the
state machine using <a href="qstatemachine.html#postEvent">postEvent</a>().</p>
<p>Events of high priority are processed before events of normal
priority.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStateMachine.NormalPriority</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The event has normal priority.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStateMachine.HighPriority</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The event has high priority.</td>
</tr>
</table>


<h3 class="fn"><a name="RestorePolicy-enum" />QStateMachine.RestorePolicy</h3><p>This enum specifies the restore policy type. The restore policy
takes effect when the machine enters a state which sets one or more
properties. If the restore policy is set to RestoreProperties, the
state machine will save the original value of the property before
the new value is set.</p>
<p>Later, when the machine either enters a state which does not set
a value for the given property, the property will automatically be
restored to its initial value.</p>
<p>Only one initial value will be saved for any given property. If
a value for a property has already been saved by the state machine,
it will not be overwritten until the property has been successfully
restored.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QStateMachine.DontRestoreProperties</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The state machine should not save the initial
values of properties and restore them later.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStateMachine.RestoreProperties</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The state machine should save the initial
values of properties and restore them later.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstatemachine.html#globalRestorePolicy-prop">QStateMachine.globalRestorePolicy</a>
and <a href="qstate.html#assignProperty">QState.assignProperty</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStateMachine" />QStateMachine.__init__ (<i>self</i>, <a href="qobject.html">QObject</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 state machine with the given <i>parent</i>.</p>


<h3 class="fn"><a name="addDefaultAnimation" />QStateMachine.addDefaultAnimation (<i>self</i>, <a href="qabstractanimation.html">QAbstractAnimation</a>&#160;<i>animation</i>)</h3><p>Adds a default <i>animation</i> to be considered for any
transition.</p>


<h3 class="fn"><a name="addState" />QStateMachine.addState (<i>self</i>, <a href="qabstractstate.html">QAbstractState</a>&#160;<i>state</i>)</h3><p>The <i>state</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>state</i> to this state machine. The state
becomes a top-level state.</p>
<p>If the state is already in a different machine, it will first be
removed from its old machine, and then added to this machine.</p>
<p><b>See also</b> <a href="qstatemachine.html#removeState">removeState</a>() and <a href="qstate.html#initialState-prop">setInitialState</a>().</p>


<h3 class="fn"><a name="cancelDelayedEvent" />bool QStateMachine.cancelDelayedEvent (<i>self</i>, int&#160;<i>id</i>)</h3><p>Cancels the delayed event identified by the given <i>id</i>. The
id should be a value returned by a call to <a href="qstatemachine.html#postDelayedEvent">postDelayedEvent</a>().
Returns true if the event was successfully cancelled, otherwise
returns false.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p><b>See also</b> <a href="qstatemachine.html#postDelayedEvent">postDelayedEvent</a>().</p>


<h3 class="fn"><a name="clearError" />QStateMachine.clearError (<i>self</i>)</h3><p>Clears the error string and error code of the state machine.</p>


<h3 class="fn"><a name="configuration" />list-of-QAbstractState QStateMachine.configuration (<i>self</i>)</h3><p>Returns the maximal consistent set of states (including parallel
and final states) that this state machine is currently in. If a
state <tt>s</tt> is in the configuration, it is always the case
that the parent of <tt>s</tt> is also in c. Note, however, that the
machine itself is not an explicit member of the configuration.</p>


<h3 class="fn"><a name="defaultAnimations" />list-of-QAbstractAnimation QStateMachine.defaultAnimations (<i>self</i>)</h3><p>Returns the list of default animations that will be considered
for any transition.</p>


<h3 class="fn"><a name="error" /><a href="qstatemachine.html#Error-enum">Error</a> QStateMachine.error (<i>self</i>)</h3><p>Returns the error code of the last error that occurred in the
state machine.</p>


<h3 class="fn"><a name="errorString" />QString QStateMachine.errorString (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QStateMachine.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="eventFilter" />bool QStateMachine.eventFilter (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>watched</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#eventFilter">QObject.eventFilter</a>().</p>


<h3 class="fn"><a name="globalRestorePolicy" /><a href="qstatemachine.html#RestorePolicy-enum">RestorePolicy</a> QStateMachine.globalRestorePolicy (<i>self</i>)</h3><h3 class="fn"><a name="isAnimated" />bool QStateMachine.isAnimated (<i>self</i>)</h3><h3 class="fn"><a name="isRunning" />bool QStateMachine.isRunning (<i>self</i>)</h3><p>Returns whether this state machine is running.</p>
<p><a href="qstatemachine.html#start">start</a>(), <a href="qstatemachine.html#stop">stop</a>()</p>


<h3 class="fn"><a name="onEntry" />QStateMachine.onEntry (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qabstractstate.html#onEntry">QAbstractState.onEntry</a>().</p>
<p>This function will call <a href="qstatemachine.html#start">start</a>() to start the state
machine.</p>


<h3 class="fn"><a name="onExit" />QStateMachine.onExit (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qabstractstate.html#onExit">QAbstractState.onExit</a>().</p>
<p>This function will call <a href="qstatemachine.html#stop">stop</a>() to stop the state machine and
subsequently emit the <a href="qstatemachine.html#stopped">stopped</a>() signal.</p>


<h3 class="fn"><a name="postDelayedEvent" />int QStateMachine.postDelayedEvent (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>, int&#160;<i>delay</i>)</h3><p>The <i>event</i> argument has it's ownership transferred to Qt.</p><p>Posts the given <i>event</i> for processing by this state
machine, with the given <i>delay</i> in milliseconds. Returns an
identifier associated with the delayed event, or -1 if the event
could not be posted.</p>
<p>This function returns immediately. When the delay has expired,
the event will be added to the state machine's event queue for
processing. The state machine takes ownership of the event and
deletes it once it has been processed.</p>
<p>You can only post events when the state machine is running.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p><b>See also</b> <a href="qstatemachine.html#cancelDelayedEvent">cancelDelayedEvent</a>()
and <a href="qstatemachine.html#postEvent">postEvent</a>().</p>


<h3 class="fn"><a name="postEvent" />QStateMachine.postEvent (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>, <a href="qstatemachine.html#EventPriority-enum">EventPriority</a>&#160;<i>priority</i>&#160;=&#160;QStateMachine.NormalPriority)</h3><p>The <i>event</i> argument has it's ownership transferred to Qt.</p><p>Posts the given <i>event</i> of the given <i>priority</i> for
processing by this state machine.</p>
<p>This function returns immediately. The event is added to the
state machine's event queue. Events are processed in the order
posted. The state machine takes ownership of the event and deletes
it once it has been processed.</p>
<p>You can only post events when the state machine is running.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p><b>See also</b> <a href="qstatemachine.html#postDelayedEvent">postDelayedEvent</a>().</p>


<h3 class="fn"><a name="removeDefaultAnimation" />QStateMachine.removeDefaultAnimation (<i>self</i>, <a href="qabstractanimation.html">QAbstractAnimation</a>&#160;<i>animation</i>)</h3><p>Removes <i>animation</i> from the list of default
animations.</p>


<h3 class="fn"><a name="removeState" />QStateMachine.removeState (<i>self</i>, <a href="qabstractstate.html">QAbstractState</a>&#160;<i>state</i>)</h3><p>The <i>state</i> argument</p><p>Removes the given <i>state</i> from this state machine. The
state machine releases ownership of the state.</p>
<p><b>See also</b> <a href="qstatemachine.html#addState">addState</a>().</p>


<h3 class="fn"><a name="setAnimated" />QStateMachine.setAnimated (<i>self</i>, bool&#160;<i>enabled</i>)</h3><h3 class="fn"><a name="setGlobalRestorePolicy" />QStateMachine.setGlobalRestorePolicy (<i>self</i>, <a href="qstatemachine.html#RestorePolicy-enum">RestorePolicy</a>&#160;<i>restorePolicy</i>)</h3><h3 class="fn"><a name="start" />QStateMachine.start (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void start()</tt>.</p><p>Starts this state machine. The machine will reset its
configuration and transition to the initial state. When a final
top-level state (<a href="qfinalstate.html">QFinalState</a>) is
entered, the machine will emit the <a href="qstate.html#finished">finished</a>() signal.</p>
<p><b>Note:</b> A state machine will not run without a running
event loop, such as the main application event loop started with
<a href="qcoreapplication.html#exec">QCoreApplication.exec</a>()
or <a href="qapplication.html#exec">QApplication.exec</a>().</p>
<p><b>See also</b> <a href="qstatemachine.html#started">started</a>(), <a href="qstate.html#finished">finished</a>(), <a href="qstatemachine.html#stop">stop</a>(), and <a href="qstate.html#initialState-prop">initialState</a>().</p>


<h3 class="fn"><a name="stop" />QStateMachine.stop (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stop()</tt>.</p><p>Stops this state machine. The state machine will stop processing
events and then emit the <a href="qstatemachine.html#stopped">stopped</a>() signal.</p>
<p><b>See also</b> <a href="qstatemachine.html#stopped">stopped</a>() and <a href="qstatemachine.html#start">start</a>().</p>


<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="started" />void started ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the state machine has entered its
initial state (<a href="qstate.html#initialState-prop">QStateMachine.initialState</a>).</p>
<p><b>See also</b> <a href="qstate.html#finished">QStateMachine.finished</a>() and <a href="qstatemachine.html#start">QStateMachine.start</a>().</p>


<h3 class="fn"><a name="stopped" />void stopped ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the state machine has stopped.</p>
<p><b>See also</b> <a href="qstatemachine.html#stop">QStateMachine.stop</a>() and <a href="qstate.html#finished">QStateMachine.finished</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.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> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>