Qt 4.8
Classes | Namespaces | Functions | Variables
qstatemachine.cpp File Reference
#include "qstatemachine.h"
#include "qstate.h"
#include "qstate_p.h"
#include "qstatemachine_p.h"
#include "qabstracttransition.h"
#include "qabstracttransition_p.h"
#include "qsignaltransition.h"
#include "qsignaltransition_p.h"
#include "qsignaleventgenerator_p.h"
#include "qabstractstate.h"
#include "qabstractstate_p.h"
#include "qfinalstate.h"
#include "qhistorystate.h"
#include "qhistorystate_p.h"
#include "private/qobject_p.h"
#include "private/qthread_p.h"
#include "qeventtransition.h"
#include "qeventtransition_p.h"
#include "qpropertyanimation.h"
#include "qanimationgroup.h"
#include <private/qvariantanimation_p.h>
#include <QtCore/qmetaobject.h>
#include <qdebug.h>
#include "moc_qstatemachine.cpp"

Go to the source code of this file.

Classes

class  _QStateMachine_Internal::GoToStateTransition
 

Namespaces

 _QStateMachine_Internal
 

Functions

static QEventcloneEvent (QEvent *e)
 
static int indexOfDescendant (QState *s, QAbstractState *desc)
 
Q_CORE_EXPORT const QStateMachinePrivate::HandlerqcoreStateMachineHandler ()
 

Variables

const QStateMachinePrivate::Handler qt_kernel_statemachine_handler
 
static const uint qt_meta_data_QSignalEventGenerator []
 
static const char qt_meta_stringdata_QSignalEventGenerator []
 

Function Documentation

◆ cloneEvent()

static QEvent* cloneEvent ( QEvent e)
static

Definition at line 226 of file qstatemachine.cpp.

227 {
228  switch (e->type()) {
229  case QEvent::None:
230  return new QEvent(*e);
231  case QEvent::Timer:
232  return new QTimerEvent(*static_cast<QTimerEvent*>(e));
233  default:
234  Q_ASSERT_X(false, "cloneEvent()", "not implemented");
235  break;
236  }
237  return 0;
238 }
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:341
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
Type type() const
Returns the event type.
Definition: qcoreevent.h:303

◆ indexOfDescendant()

static int indexOfDescendant ( QState s,
QAbstractState desc 
)
static

Definition at line 251 of file qstatemachine.cpp.

Referenced by QStateMachinePrivate::stateEntryLessThan(), and QStateMachinePrivate::stateExitLessThan().

252 {
254  for (int i = 0; i < childStates.size(); ++i) {
255  QAbstractState *c = childStates.at(i);
256  if ((c == desc) || QStateMachinePrivate::isDescendantOf(desc, c)) {
257  return i;
258  }
259  }
260  return -1;
261 }
unsigned char c[8]
Definition: qnumeric_p.h:62
static bool isDescendantOf(const QAbstractState *s, const QAbstractState *other)
The QAbstractState class is the base class of states of a QStateMachine.
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
static QStatePrivate * get(QState *q)
Definition: qstate_p.h:89
QList< QAbstractState * > childStates() const
Definition: qstate.cpp:199
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ qcoreStateMachineHandler()

Q_CORE_EXPORT const QStateMachinePrivate::Handler* qcoreStateMachineHandler ( )

Definition at line 246 of file qstatemachine.cpp.

Referenced by cloneEvent().

247 {
249 }
const QStateMachinePrivate::Handler qt_kernel_statemachine_handler

Variable Documentation

◆ qt_kernel_statemachine_handler

const QStateMachinePrivate::Handler qt_kernel_statemachine_handler
Initial value:
= {
}
static QEvent * cloneEvent(QEvent *e)

Definition at line 240 of file qstatemachine.cpp.

Referenced by qcoreStateMachineHandler().

◆ qt_meta_data_QSignalEventGenerator

const uint qt_meta_data_QSignalEventGenerator[]
static
Initial value:
= {
2,
0,
0, 0,
1, 12,
0, 0,
0, 0,
0, 0,
23, 22, 22, 22, 0x0a,
0
}

Definition at line 2271 of file qstatemachine.cpp.

◆ qt_meta_stringdata_QSignalEventGenerator

const char qt_meta_stringdata_QSignalEventGenerator[]
static
Initial value:
= {
"QSignalEventGenerator\0\0execute()\0"
}

Definition at line 2288 of file qstatemachine.cpp.

Referenced by QSignalEventGenerator::qt_metacast().