Engauge Digitizer  2
TransformationStateDefined.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_DEFINED_H
8 #define TRANSFORMATION_STATE_DEFINED_H
9 
10 #include "Checker.h"
11 #include <QObject>
12 #include "Transformation.h"
14 
15 class QTimer;
16 
19 {
20  Q_OBJECT;
21 
22 public:
25  QGraphicsScene &scene);
26 
27  virtual void begin(bool isGnuplot,
28  CmdMediator &cmdMediator,
29  const Transformation &transformation,
30  const QString &selectedGraphCurve);
31  virtual void end(CmdMediator &cmdMediator,
32  const Transformation &transformation);
33  virtual void updateAxesChecker (CmdMediator &cmdMediator,
34  const Transformation &transformation);
35 
36 private slots:
37  void slotTimeout();
38 
39 private:
41 
42  void initializeModelGridDisplay (CmdMediator &cmdMediator,
43  const Transformation &transformation);
44  void initializeModelGridRemoval (bool isGnuplot,
45  CmdMediator &cmdMediator,
46  const Transformation &transformation,
47  const QString &selectedGraphCurve);
48  void startTimer (const DocumentModelAxesChecker &modelAxesChecker);
49 
50  // As a QGraphicsItem subclass, the Checker is deleted by the QGraphicsScene so it must be a pointer
51  Checker *m_axesChecker;
52 
53  QTimer *m_timer;
54 };
55 
56 #endif // TRANSFORMATION_STATE_DEFINED_H
TransformationStateDefined
Class to show transformation since transformation is defined.
Definition: TransformationStateDefined.h:17
Checker
Box shape that is drawn through the three axis points, to temporarily (usually) or permanently (rarel...
Definition: Checker.h:32
TransformationStateDefined::begin
virtual void begin(bool isGnuplot, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)
Method that is called at the exact moment a state is entered. Typically called just after end for the...
Definition: TransformationStateDefined.cpp:33
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
TransformationStateAbstractBase.h
Transformation.h
TransformationStateContext
Context class for transformation state machine.
Definition: TransformationStateContext.h:20
TransformationStateDefined::end
virtual void end(CmdMediator &cmdMediator, const Transformation &transformation)
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Definition: TransformationStateDefined.cpp:62
Checker.h
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
TransformationStateDefined::updateAxesChecker
virtual void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)
Apply the new DocumentModelAxesChecker.
Definition: TransformationStateDefined.cpp:135