Engauge Digitizer 2
Loading...
Searching...
No Matches
TransformationStateDefined.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_DEFINED_H
8#define TRANSFORMATION_STATE_DEFINED_H
9
10#include "Checker.h"
11#include <QObject>
12#include "Transformation.h"
13#include "TransformationStateAbstractBase.h"
14
15class QTimer;
16
19{
20 Q_OBJECT;
21
22public:
25 QGraphicsScene &scene);
26
27 virtual void begin(CmdMediator &cmdMediator,
28 const Transformation &transformation,
29 const QString &selectedGraphCurve);
30 virtual void end(CmdMediator &cmdMediator,
31 const Transformation &transformation);
32 virtual void updateAxesChecker (CmdMediator &cmdMediator,
33 const Transformation &transformation);
34
35private slots:
36 void slotTimeout();
37
38private:
40
41 void initializeModelGridRemoval (CmdMediator &cmdMediator,
42 const Transformation &transformation,
43 const QString &selectedGraphCurve);
44 void startTimer (const DocumentModelAxesChecker &modelAxesChecker);
45
46 // As a QGraphicsItem subclass, the Checker is deleted by the QGraphicsScene so it must be a pointer
47 Checker *m_axesChecker;
48
49 QTimer *m_timer;
50};
51
52#endif // TRANSFORMATION_STATE_DEFINED_H
Box shape that is drawn through the three axis points, to temporarily (usually) or permanently (rarel...
Definition Checker.h:36
Command queue stack.
Definition CmdMediator.h:24
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Base class for all transformation states. This serves as an interface to TransformationStateContext.
TransformationStateContext & context()
Reference to the TransformationStateContext that contains all the TransformationStateAbstractBase sub...
Context class for transformation state machine.
Class to show transformation since transformation is defined.
virtual void updateAxesChecker(CmdMediator &cmdMediator, const Transformation &transformation)
Apply the new DocumentModelAxesChecker.
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...
virtual void begin(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...
Affine transformation between screen and graph coordinates, based on digitized axis points.