Engauge Digitizer 2
|
Context class for transformation state machine. More...
#include <TransformationStateContext.h>
Public Member Functions | |
TransformationStateContext (QGraphicsScene &scene, bool isGnuplot) | |
Single constructor. | |
virtual | ~TransformationStateContext () |
bool | isGnuplot () const |
Flag for gnuplot debug files. | |
void | resetOnLoad () |
Reset, when loading a document after the first, to same state that first document was at when loaded. | |
void | triggerStateTransition (bool isGnuplot, TransformationState transformationState, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve) |
Trigger a state transition to be performed immediately. | |
void | updateAxesChecker (CmdMediator &cmdMediator, const Transformation &transformation) |
Apply the new DocumentModelAxesChecker. | |
Context class for transformation state machine.
This removes some tricky state processing from MainWindow. Unlike typical state machines, the transitions are driven directly from the outside rather than indirectly by events that are processed by the states (this has triggerStateTransition rather than requestStateTransition)
Definition at line 21 of file TransformationStateContext.h.
TransformationStateContext::TransformationStateContext | ( | QGraphicsScene & | scene, |
bool | isGnuplot ) |
Single constructor.
Definition at line 17 of file TransformationStateContext.cpp.
|
virtual |
Definition at line 28 of file TransformationStateContext.cpp.
bool TransformationStateContext::isGnuplot | ( | ) | const |
Flag for gnuplot debug files.
Definition at line 33 of file TransformationStateContext.cpp.
void TransformationStateContext::resetOnLoad | ( | ) |
Reset, when loading a document after the first, to same state that first document was at when loaded.
Definition at line 38 of file TransformationStateContext.cpp.
void TransformationStateContext::triggerStateTransition | ( | bool | isGnuplot, |
TransformationState | transformationState, | ||
CmdMediator & | cmdMediator, | ||
const Transformation & | transformation, | ||
const QString & | selectedGraphCurve ) |
Trigger a state transition to be performed immediately.
Definition at line 45 of file TransformationStateContext.cpp.
void TransformationStateContext::updateAxesChecker | ( | CmdMediator & | cmdMediator, |
const Transformation & | transformation ) |
Apply the new DocumentModelAxesChecker.
Definition at line 71 of file TransformationStateContext.cpp.