Engauge Digitizer  2
TransformationStateAbstractBase.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_ABSTRACT_BASE_H
8 #define TRANSFORMATION_STATE_ABSTRACT_BASE_H
9 
10 class CmdMediator;
12 class QColor;
13 class QString;
14 class Transformation;
16 
22 };
23 
26 {
27 public:
31 
33  virtual void begin(bool isGnuplot,
34  CmdMediator &cmdMediator,
35  const Transformation &transformation,
36  const QString &selectedGraphCurve) = 0;
37 
39  virtual void end(CmdMediator &cmdMediator,
40  const Transformation &transformation) = 0;
41 
43  virtual void updateAxesChecker (CmdMediator &cmdMediator,
44  const Transformation &transformation) = 0;
45 
46 protected:
49 
50 private:
52 
53  TransformationStateContext &m_context;
54 };
55 
56 #endif // TRANSFORMATION_STATE_ABSTRACT_BASE_H
TransformationStateAbstractBase::~TransformationStateAbstractBase
virtual ~TransformationStateAbstractBase()
Definition: TransformationStateAbstractBase.cpp:15
TransformationStateAbstractBase::updateAxesChecker
virtual void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)=0
Apply the new DocumentModelAxesChecker.
TransformationStateAbstractBase::begin
virtual void begin(bool isGnuplot, 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...
TransformationState
TransformationState
Set of possible states of axes transformation.
Definition: TransformationStateAbstractBase.h:17
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition: Transformation.h:30
TransformationStateAbstractBase
Base class for all transformation states. This serves as an interface to TransformationStateContext.
Definition: TransformationStateAbstractBase.h:24
TRANSFORMATION_STATE_UNDEFINED
Definition: TransformationStateAbstractBase.h:19
NUM_TRANSFORMATION_STATES
Definition: TransformationStateAbstractBase.h:20
TransformationStateContext
Context class for transformation state machine.
Definition: TransformationStateContext.h:20
TransformationStateAbstractBase::end
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...
TRANSFORMATION_STATE_DEFINED
Definition: TransformationStateAbstractBase.h:18
CmdMediator
Command queue stack.
Definition: CmdMediator.h:22
DocumentModelAxesChecker
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Definition: DocumentModelAxesChecker.h:17
TransformationStateAbstractBase::context
TransformationStateContext & context()
Reference to the TransformationStateContext that contains all the TransformationStateAbstractBase sub...
Definition: TransformationStateAbstractBase.cpp:19