Engauge Digitizer  2
TransformationStateAbstractBase.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_ABSTRACT_BASE_H
8 #define TRANSFORMATION_STATE_ABSTRACT_BASE_H
9 
10 class CmdMediator;
12 class QColor;
13 class QString;
14 class Transformation;
16 
18 enum TransformationState {
19  TRANSFORMATION_STATE_DEFINED,
20  TRANSFORMATION_STATE_UNDEFINED,
21  NUM_TRANSFORMATION_STATES
22 };
23 
26 {
27 public:
31 
33  virtual void begin(CmdMediator &cmdMediator,
34  const Transformation &transformation,
35  const QString &selectedGraphCurve) = 0;
36 
38  virtual void end(CmdMediator &cmdMediator,
39  const Transformation &transformation) = 0;
40 
42  virtual void updateAxesChecker (CmdMediator &cmdMediator,
43  const Transformation &transformation) = 0;
44 
45 protected:
48 
49 private:
51 
52  TransformationStateContext &m_context;
53 };
54 
55 #endif // TRANSFORMATION_STATE_ABSTRACT_BASE_H
Base class for all transformation states. This serves as an interface to TransformationStateContext.
Context class for transformation state machine.
TransformationStateContext & context()
Reference to the TransformationStateContext that contains all the TransformationStateAbstractBase sub...
Affine transformation between screen and graph coordinates, based on digitized axis points...
virtual void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)=0
Apply the new DocumentModelAxesChecker.
virtual void end(CmdMediator &cmdMediator, const Transformation &transformation)=0
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Command queue stack.
Definition: CmdMediator.h:23
virtual void begin(CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)=0
Method that is called at the exact moment a state is entered. Typically called just after end for the...