Qt 4.8
|
#include <qstatemachine_p.h>
Classes | |
struct | Handler |
Public Types | |
enum | EventProcessingMode { DirectProcessing, QueuedProcessing } |
typedef QEvent *(* | f_cloneEvent) (QEvent *) |
typedef QPair< QObject *, QByteArray > | RestorableId |
enum | State { NotRunning, Starting, Running } |
enum | StopProcessingReason { EventQueueEmpty, Finished, Stopped } |
Public Types inherited from QAbstractStatePrivate | |
enum | StateType { AbstractState, StandardState, FinalState, HistoryState } |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
Static Public Variables | |
static const Handler * | handler = &qt_kernel_statemachine_handler |
Definition at line 85 of file qstatemachine_p.h.
Definition at line 238 of file qstatemachine_p.h.
typedef QPair<QObject *, QByteArray> QStateMachinePrivate::RestorableId |
Definition at line 183 of file qstatemachine_p.h.
QStateMachinePrivate::QStateMachinePrivate | ( | ) |
Definition at line 190 of file qstatemachine.cpp.
QStateMachinePrivate::~QStateMachinePrivate | ( | ) |
Definition at line 208 of file qstatemachine.cpp.
void QStateMachinePrivate::_q_animationFinished | ( | ) |
Definition at line 1118 of file qstatemachine.cpp.
Referenced by applyProperties().
void QStateMachinePrivate::_q_process | ( | ) |
Definition at line 1250 of file qstatemachine.cpp.
Referenced by _q_start(), and processEvents().
void QStateMachinePrivate::_q_start | ( | ) |
Definition at line 1202 of file qstatemachine.cpp.
void QStateMachinePrivate::addStatesToEnter | ( | QAbstractState * | s, |
QState * | root, | ||
QSet< QAbstractState *> & | statesToEnter, | ||
QSet< QAbstractState *> & | statesForDefaultEntry | ||
) |
Definition at line 575 of file qstatemachine.cpp.
Referenced by enterStates(), and setError().
void QStateMachinePrivate::applyProperties | ( | const QList< QAbstractTransition *> & | transitionList, |
const QList< QAbstractState *> & | exitedStates, | ||
const QList< QAbstractState *> & | enteredStates | ||
) |
Definition at line 662 of file qstatemachine.cpp.
Referenced by _q_start(), and microstep().
void QStateMachinePrivate::cancelAllDelayedEvents | ( | ) |
Definition at line 1395 of file qstatemachine.cpp.
Referenced by _q_process().
void QStateMachinePrivate::clearHistory | ( | ) |
Definition at line 1192 of file qstatemachine.cpp.
Referenced by _q_start().
QEvent * QStateMachinePrivate::dequeueExternalEvent | ( | ) |
Definition at line 1357 of file qstatemachine.cpp.
Referenced by _q_process().
QEvent * QStateMachinePrivate::dequeueInternalEvent | ( | ) |
Definition at line 1349 of file qstatemachine.cpp.
Referenced by _q_process().
QList< QAbstractState * > QStateMachinePrivate::enterStates | ( | QEvent * | event, |
const QList< QAbstractTransition *> & | enabledTransitions | ||
) |
Definition at line 476 of file qstatemachine.cpp.
Referenced by _q_start(), and microstep().
void QStateMachinePrivate::executeTransitionContent | ( | QEvent * | event, |
const QList< QAbstractTransition *> & | transitionList | ||
) |
Definition at line 464 of file qstatemachine.cpp.
Referenced by _q_start(), and microstep().
QList< QAbstractState * > QStateMachinePrivate::exitStates | ( | QEvent * | event, |
const QList< QAbstractTransition *> & | transitionList | ||
) |
Definition at line 396 of file qstatemachine.cpp.
Referenced by microstep().
QAbstractState * QStateMachinePrivate::findErrorState | ( | QAbstractState * | context | ) |
Definition at line 1017 of file qstatemachine.cpp.
Referenced by setError().
QState * QStateMachinePrivate::findLCA | ( | const QList< QAbstractState *> & | states | ) | const |
Definition at line 299 of file qstatemachine.cpp.
Referenced by enterStates(), exitStates(), isPreempted(), and setError().
|
static |
Definition at line 214 of file qstatemachine.cpp.
Referenced by QState::addTransition(), QEventTransitionPrivate::maybeRegister(), QSignalTransitionPrivate::maybeRegister(), QSignalEventGenerator::qt_metacall(), QState::removeTransition(), stateEntryLessThan(), stateExitLessThan(), QSignalTransitionPrivate::unregister(), and QEventTransitionPrivate::unregister().
void QStateMachinePrivate::goToState | ( | QAbstractState * | targetState | ) |
Causes this state machine to unconditionally transition to the given targetState.
Provides a backdoor for using the state machine "imperatively"; i.e. rather than defining explicit transitions, you drive the machine's execution by calling this function. It breaks the whole integrity of the transition-driven model, but is provided for pragmatic reasons.
Definition at line 1440 of file qstatemachine.cpp.
Definition at line 1651 of file qstatemachine.cpp.
void QStateMachinePrivate::handleTransitionSignal | ( | QObject * | sender, |
int | signalIndex, | ||
void ** | args | ||
) |
Definition at line 1660 of file qstatemachine.cpp.
Referenced by QSignalEventGenerator::qt_metacall().
bool QStateMachinePrivate::hasRestorable | ( | QObject * | object, |
const QByteArray & | propertyName | ||
) | const |
Returns true if the variable with the given id has been registered for restoration.
Definition at line 993 of file qstatemachine.cpp.
QPair< QList< QAbstractAnimation * >, QList< QAbstractAnimation * > > QStateMachinePrivate::initializeAnimation | ( | QAbstractAnimation * | abstractAnimation, |
const QPropertyAssignment & | prop | ||
) |
Definition at line 1087 of file qstatemachine.cpp.
Referenced by applyProperties().
bool QStateMachinePrivate::isAtomic | ( | const QAbstractState * | s | ) | const |
Definition at line 883 of file qstatemachine.cpp.
Referenced by exitStates(), and selectTransitions().
bool QStateMachinePrivate::isCompound | ( | const QAbstractState * | s | ) | const |
Definition at line 870 of file qstatemachine.cpp.
Referenced by addStatesToEnter(), and isInFinalState().
|
static |
Definition at line 893 of file qstatemachine.cpp.
Referenced by addStatesToEnter(), exitStates(), findLCA(), indexOfDescendant(), isPreempted(), stateEntryLessThan(), and stateExitLessThan().
bool QStateMachinePrivate::isExternalEventQueueEmpty | ( | ) |
Definition at line 1371 of file qstatemachine.cpp.
|
static |
Definition at line 859 of file qstatemachine.cpp.
Referenced by enterStates(), isAtomic(), and isInFinalState().
bool QStateMachinePrivate::isInFinalState | ( | QAbstractState * | s | ) | const |
Definition at line 941 of file qstatemachine.cpp.
Referenced by enterStates().
bool QStateMachinePrivate::isInternalEventQueueEmpty | ( | ) |
Definition at line 1365 of file qstatemachine.cpp.
Referenced by _q_process().
|
static |
Definition at line 864 of file qstatemachine.cpp.
Referenced by addStatesToEnter(), enterStates(), isCompound(), and isInFinalState().
bool QStateMachinePrivate::isPreempted | ( | const QAbstractState * | s, |
const QSet< QAbstractTransition *> & | transitions | ||
) | const |
Definition at line 318 of file qstatemachine.cpp.
Referenced by selectTransitions().
void QStateMachinePrivate::microstep | ( | QEvent * | event, |
const QList< QAbstractTransition *> & | transitionList | ||
) |
Definition at line 375 of file qstatemachine.cpp.
Referenced by _q_process().
void QStateMachinePrivate::postExternalEvent | ( | QEvent * | e | ) |
Definition at line 1343 of file qstatemachine.cpp.
void QStateMachinePrivate::postInternalEvent | ( | QEvent * | e | ) |
Definition at line 1337 of file qstatemachine.cpp.
Referenced by handleFilteredEvent(), and handleTransitionSignal().
void QStateMachinePrivate::processEvents | ( | EventProcessingMode | processingMode | ) |
Definition at line 1377 of file qstatemachine.cpp.
Referenced by goToState(), handleFilteredEvent(), and handleTransitionSignal().
|
static |
Definition at line 903 of file qstatemachine.cpp.
Referenced by addStatesToEnter(), findLCA(), and selectTransitions().
void QStateMachinePrivate::registerEventTransition | ( | QEventTransition * | transition | ) |
Definition at line 1605 of file qstatemachine.cpp.
Referenced by QEventTransitionPrivate::maybeRegister(), and registerTransitions().
void QStateMachinePrivate::registerRestorable | ( | QObject * | object, |
const QByteArray & | propertyName | ||
) |
Definition at line 968 of file qstatemachine.cpp.
Referenced by applyProperties().
void QStateMachinePrivate::registerSignalTransition | ( | QSignalTransition * | transition | ) |
Definition at line 1507 of file qstatemachine.cpp.
Referenced by QSignalTransitionPrivate::maybeRegister(), and registerTransitions().
void QStateMachinePrivate::registerTransitions | ( | QAbstractState * | state | ) |
Definition at line 1476 of file qstatemachine.cpp.
Referenced by QState::addTransition(), and enterStates().
void QStateMachinePrivate::removeStartState | ( | ) |
QList< QPropertyAssignment > QStateMachinePrivate::restorablesToPropertyList | ( | const QHash< RestorableId, QVariant > & | restorables | ) | const |
Definition at line 975 of file qstatemachine.cpp.
Referenced by applyProperties().
QVariant QStateMachinePrivate::restorableValue | ( | QObject * | object, |
const QByteArray & | propertyName | ||
) | const |
Definition at line 998 of file qstatemachine.cpp.
QState * QStateMachinePrivate::rootState | ( | ) | const |
Definition at line 221 of file qstatemachine.cpp.
Referenced by _q_start(), addStatesToEnter(), enterStates(), findLCA(), isAtomic(), isCompound(), selectTransitions(), setError(), and unregisterAllTransitions().
QSet< QAbstractTransition * > QStateMachinePrivate::selectTransitions | ( | QEvent * | event | ) | const |
Definition at line 339 of file qstatemachine.cpp.
Referenced by _q_process().
void QStateMachinePrivate::setError | ( | QStateMachine::Error | error, |
QAbstractState * | currentContext | ||
) |
Definition at line 1033 of file qstatemachine.cpp.
Referenced by addStatesToEnter(), and exitStates().
QState * QStateMachinePrivate::startState | ( | ) |
Definition at line 1178 of file qstatemachine.cpp.
Referenced by _q_start(), and goToState().
|
static |
Definition at line 263 of file qstatemachine.cpp.
Referenced by enterStates().
|
static |
Definition at line 281 of file qstatemachine.cpp.
Referenced by exitStates().
|
static |
Definition at line 927 of file qstatemachine.cpp.
|
static |
Definition at line 934 of file qstatemachine.cpp.
Referenced by addStatesToEnter().
|
static |
Definition at line 913 of file qstatemachine.cpp.
Referenced by _q_animationFinished(), addStatesToEnter(), applyProperties(), exitStates(), findErrorState(), goToState(), isAtomic(), isCompound(), isInFinalState(), isParallel(), registerTransitions(), and selectTransitions().
|
static |
Definition at line 920 of file qstatemachine.cpp.
void QStateMachinePrivate::unregisterAllTransitions | ( | ) |
Definition at line 1583 of file qstatemachine.cpp.
Referenced by _q_process().
void QStateMachinePrivate::unregisterEventTransition | ( | QEventTransition * | transition | ) |
Definition at line 1629 of file qstatemachine.cpp.
Referenced by QEventTransitionPrivate::unregister(), unregisterAllTransitions(), and unregisterTransition().
void QStateMachinePrivate::unregisterRestorable | ( | QObject * | object, |
const QByteArray & | propertyName | ||
) |
Definition at line 1008 of file qstatemachine.cpp.
Referenced by _q_animationFinished().
void QStateMachinePrivate::unregisterSignalTransition | ( | QSignalTransition * | transition | ) |
Definition at line 1561 of file qstatemachine.cpp.
Referenced by QSignalTransitionPrivate::unregister(), unregisterAllTransitions(), and unregisterTransition().
void QStateMachinePrivate::unregisterTransition | ( | QAbstractTransition * | transition | ) |
Definition at line 1495 of file qstatemachine.cpp.
Referenced by QState::removeTransition().
QState* QStateMachinePrivate::_startState |
Definition at line 193 of file qstatemachine_p.h.
Referenced by QStateMachinePrivate(), removeStartState(), and startState().
bool QStateMachinePrivate::animated |
Definition at line 212 of file qstatemachine_p.h.
Referenced by applyProperties(), and QStateMachinePrivate().
QHash<QAbstractState*, QList<QAbstractAnimation*> > QStateMachinePrivate::animationsForState |
Definition at line 218 of file qstatemachine_p.h.
Referenced by _q_animationFinished(), and applyProperties().
QSet<QAbstractState*> QStateMachinePrivate::configuration |
Definition at line 198 of file qstatemachine_p.h.
Referenced by _q_start(), enterStates(), exitStates(), goToState(), isInFinalState(), microstep(), and selectTransitions().
Definition at line 231 of file qstatemachine_p.h.
Referenced by handleTransitionSignal(), registerSignalTransition(), and unregisterSignalTransition().
QList<QAbstractAnimation *> QStateMachinePrivate::defaultAnimations |
Definition at line 223 of file qstatemachine_p.h.
Referenced by applyProperties().
QMultiHash<QAbstractState *, QAbstractAnimation *> QStateMachinePrivate::defaultAnimationsForSource |
Definition at line 224 of file qstatemachine_p.h.
Referenced by applyProperties().
QMultiHash<QAbstractState *, QAbstractAnimation *> QStateMachinePrivate::defaultAnimationsForTarget |
Definition at line 225 of file qstatemachine_p.h.
Referenced by applyProperties().
Definition at line 235 of file qstatemachine_p.h.
Referenced by cancelAllDelayedEvents().
QMutex QStateMachinePrivate::delayedEventsMutex |
Definition at line 236 of file qstatemachine_p.h.
Referenced by cancelAllDelayedEvents().
QStateMachine::Error QStateMachinePrivate::error |
Definition at line 204 of file qstatemachine_p.h.
Referenced by addStatesToEnter(), QStateMachinePrivate(), and setError().
QString QStateMachinePrivate::errorString |
Definition at line 207 of file qstatemachine_p.h.
Referenced by setError().
QMutex QStateMachinePrivate::externalEventMutex |
Definition at line 202 of file qstatemachine_p.h.
Referenced by dequeueExternalEvent(), isExternalEventQueueEmpty(), and postExternalEvent().
Definition at line 200 of file qstatemachine_p.h.
Referenced by _q_start(), dequeueExternalEvent(), isExternalEventQueueEmpty(), postExternalEvent(), and ~QStateMachinePrivate().
QStateMachine::RestorePolicy QStateMachinePrivate::globalRestorePolicy |
Definition at line 205 of file qstatemachine_p.h.
Referenced by applyProperties(), and QStateMachinePrivate().
|
static |
Definition at line 243 of file qstatemachine_p.h.
Referenced by handleFilteredEvent(), qRegisterGuiStateMachine(), and qUnregisterGuiStateMachine().
QMutex QStateMachinePrivate::internalEventMutex |
Definition at line 201 of file qstatemachine_p.h.
Referenced by dequeueInternalEvent(), isInternalEventQueueEmpty(), and postInternalEvent().
Definition at line 199 of file qstatemachine_p.h.
Referenced by _q_start(), dequeueInternalEvent(), isInternalEventQueueEmpty(), postInternalEvent(), and ~QStateMachinePrivate().
QSet<QAbstractState *> QStateMachinePrivate::pendingErrorStates |
Definition at line 208 of file qstatemachine_p.h.
Referenced by enterStates(), exitStates(), and setError().
QSet<QAbstractState *> QStateMachinePrivate::pendingErrorStatesForDefaultEntry |
Definition at line 209 of file qstatemachine_p.h.
Referenced by enterStates(), and setError().
bool QStateMachinePrivate::processing |
Definition at line 194 of file qstatemachine_p.h.
Referenced by _q_process(), enterStates(), processEvents(), and QStateMachinePrivate().
bool QStateMachinePrivate::processingScheduled |
Definition at line 195 of file qstatemachine_p.h.
Referenced by _q_process(), _q_start(), processEvents(), and QStateMachinePrivate().
QHash<QAbstractAnimation*, QPropertyAssignment> QStateMachinePrivate::propertyForAnimation |
Definition at line 219 of file qstatemachine_p.h.
Referenced by _q_animationFinished(), and applyProperties().
QHash<QObject*, QHash<QEvent::Type, int> > QStateMachinePrivate::qobjectEvents |
Definition at line 233 of file qstatemachine_p.h.
Referenced by handleFilteredEvent(), registerEventTransition(), and unregisterEventTransition().
QHash<RestorableId, QVariant> QStateMachinePrivate::registeredRestorables |
Definition at line 184 of file qstatemachine_p.h.
Referenced by applyProperties(), hasRestorable(), registerRestorable(), restorableValue(), and unregisterRestorable().
QSet<QAbstractAnimation*> QStateMachinePrivate::resetAnimationEndValues |
Definition at line 221 of file qstatemachine_p.h.
Referenced by _q_animationFinished(), and applyProperties().
QSignalEventGenerator* QStateMachinePrivate::signalEventGenerator |
Definition at line 229 of file qstatemachine_p.h.
Referenced by QStateMachinePrivate(), registerSignalTransition(), and unregisterSignalTransition().
State QStateMachinePrivate::state |
Definition at line 192 of file qstatemachine_p.h.
Referenced by _q_animationFinished(), _q_process(), _q_start(), goToState(), processEvents(), QStateMachinePrivate(), selectTransitions(), toFinalState(), toHistoryState(), and toStandardState().
QHash<QAbstractAnimation*, QAbstractState*> QStateMachinePrivate::stateForAnimation |
Definition at line 220 of file qstatemachine_p.h.
Referenced by _q_animationFinished(), and applyProperties().
bool QStateMachinePrivate::stop |
Definition at line 196 of file qstatemachine_p.h.
Referenced by _q_process(), and QStateMachinePrivate().
StopProcessingReason QStateMachinePrivate::stopProcessingReason |
Definition at line 197 of file qstatemachine_p.h.
Referenced by _q_process(), enterStates(), and QStateMachinePrivate().