Engauge Digitizer 2
Loading...
Searching...
No Matches
TransformationStateContext.h
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef TRANSFORMATION_STATE_CONTEXT_H
8#define TRANSFORMATION_STATE_CONTEXT_H
9
10#include <QVector>
11#include "TransformationStateAbstractBase.h"
12
13class CmdMediator;
15class QGraphicsScene;
16class Transformation;
17
22{
23public:
25 TransformationStateContext(QGraphicsScene &scene,
26 bool isGnuplot);
28
30 bool isGnuplot () const;
31
33 void resetOnLoad();
34
36 void triggerStateTransition (TransformationState transformationState,
37 CmdMediator &cmdMediator,
38 const Transformation &transformation,
39 const QString &selectedGraphCurve);
40
42 void updateAxesChecker (CmdMediator &cmdMediator,
43 const Transformation &transformation);
44
45private:
47
48 QVector<TransformationStateAbstractBase*> m_states;
49 TransformationState m_currentState;
50 bool m_isGnuplot;
51};
52
53#endif // TRANSFORMATION_STATE_CONTEXT_H
Command queue stack.
Definition CmdMediator.h:24
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Context class for transformation state machine.
void triggerStateTransition(TransformationState transformationState, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)
Trigger a state transition to be performed immediately.
void resetOnLoad()
Reset, when loading a document after the first, to same state that first document was at when loaded.
bool isGnuplot() const
Flag for gnuplot debug files.
void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)
Apply the new DocumentModelAxesChecker.
Affine transformation between screen and graph coordinates, based on digitized axis points.