7 #include "CmdMediator.h"
8 #include "EngaugeAssert.h"
10 #include <QGraphicsScene>
12 #include "TransformationStateAbstractBase.h"
13 #include "TransformationStateContext.h"
14 #include "TransformationStateDefined.h"
15 #include "TransformationStateUndefined.h"
19 m_isGnuplot (isGnuplot)
23 ENGAUGE_ASSERT (m_states.size () == NUM_TRANSFORMATION_STATES);
25 m_currentState = NUM_TRANSFORMATION_STATES;
28 TransformationStateContext::~TransformationStateContext()
30 qDeleteAll (m_states);
40 LOG4CPP_INFO_S ((*mainCat)) <<
"TransformationStateContext::resetOnLoad";
42 m_currentState = NUM_TRANSFORMATION_STATES;
46 TransformationState transformationState,
49 const QString &selectedGraphCurve)
51 LOG4CPP_INFO_S ((*mainCat)) <<
"TransformationStateContext::triggerStateTransition";
57 if (m_currentState != NUM_TRANSFORMATION_STATES) {
58 m_states[m_currentState]->end(cmdMediator,
62 m_currentState = transformationState;
65 m_states[m_currentState]->begin(isGnuplot,
74 LOG4CPP_INFO_S ((*mainCat)) <<
"TransformationStateContext::updateAxesChecker";
77 if (m_currentState < NUM_TRANSFORMATION_STATES) {
79 m_states[m_currentState]->updateAxesChecker (cmdMediator,
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...
TransformationStateContext(QGraphicsScene &scene, bool isGnuplot)
Single constructor.
void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)
Apply the new DocumentModelAxesChecker.
void triggerStateTransition(bool isGnuplot, TransformationState transformationState, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)
Trigger a state transition to be performed immediately.