Engauge Digitizer 2
Loading...
Searching...
No Matches
TransformationStateContext.h
Go to the documentation of this file.
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>
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
37 TransformationState transformationState,
38 CmdMediator &cmdMediator,
39 const Transformation &transformation,
40 const QString &selectedGraphCurve);
41
43 void updateAxesChecker (CmdMediator &cmdMediator,
44 const Transformation &transformation);
45
46private:
48
49 QVector<TransformationStateAbstractBase*> m_states;
50 TransformationState m_currentState;
51 bool m_isGnuplot;
52};
53
54#endif // TRANSFORMATION_STATE_CONTEXT_H
TransformationState
Set of possible states of axes transformation.
Command queue stack.
Definition CmdMediator.h:24
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
void triggerStateTransition(bool isGnuplot, TransformationState transformationState, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)
Trigger a state transition to be performed immediately.
TransformationStateContext(QGraphicsScene &scene, bool isGnuplot)
Single constructor.
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.