QStateMachine: make enterStates/exitStates virtual.

This allows handling of state specific code when entering/exiting
states during a micro-step.

Change-Id: If2fa8dde9a1e209345950a93dee59414063d863e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Erik Verbruggen 2015-09-21 11:18:23 +02:00
parent 462f355e4f
commit 5445eb3541

View File

@ -134,16 +134,16 @@ public:
virtual void beginMacrostep();
virtual void endMacrostep(bool didChange);
virtual void exitInterpreter();
void exitStates(QEvent *event, const QList<QAbstractState *> &statesToExit_sorted,
const QHash<QAbstractState*, QVector<QPropertyAssignment> > &assignmentsForEnteredStates);
virtual void exitStates(QEvent *event, const QList<QAbstractState *> &statesToExit_sorted,
const QHash<QAbstractState*, QVector<QPropertyAssignment> > &assignmentsForEnteredStates);
QList<QAbstractState*> computeExitSet(const QList<QAbstractTransition*> &enabledTransitions, CalculationCache *cache);
QSet<QAbstractState*> computeExitSet_Unordered(const QList<QAbstractTransition*> &enabledTransitions, CalculationCache *cache);
QSet<QAbstractState*> computeExitSet_Unordered(QAbstractTransition *t, CalculationCache *cache);
void executeTransitionContent(QEvent *event, const QList<QAbstractTransition*> &transitionList);
void enterStates(QEvent *event, const QList<QAbstractState*> &exitedStates_sorted,
const QList<QAbstractState*> &statesToEnter_sorted,
const QSet<QAbstractState*> &statesForDefaultEntry,
QHash<QAbstractState *, QVector<QPropertyAssignment> > &propertyAssignmentsForState
virtual void enterStates(QEvent *event, const QList<QAbstractState*> &exitedStates_sorted,
const QList<QAbstractState*> &statesToEnter_sorted,
const QSet<QAbstractState*> &statesForDefaultEntry,
QHash<QAbstractState *, QVector<QPropertyAssignment> > &propertyAssignmentsForState
#ifndef QT_NO_ANIMATION
, const QList<QAbstractAnimation*> &selectedAnimations
#endif