Engauge Digitizer  2
DigitizeStateEmpty.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 DIGITIZE_STATE_EMPTY_H
8 #define DIGITIZE_STATE_EMPTY_H
9 
11 
14 {
15 public:
18  virtual ~DigitizeStateEmpty();
19 
20  virtual QString activeCurve () const;
21  virtual void begin(CmdMediator *cmdMediator,
22  DigitizeState previousState);
23  virtual bool canPaste (const Transformation &transformation,
24  const QSize &viewSize) const;
25  virtual QCursor cursor (CmdMediator *cmdMediator) const;
26  virtual void end();
27  virtual void handleCurveChange(CmdMediator *cmdMediator);
28  virtual void handleContextMenuEventAxis (CmdMediator *cmdMediator,
29  const QString &pointIdentifier);
30  virtual void handleContextMenuEventGraph (CmdMediator *cmdMediator,
31  const QStringList &pointIdentifiers);
32  virtual void handleKeyPress (CmdMediator *cmdMediator,
33  Qt::Key key,
34  bool atLeastOneSelectedItem);
35  virtual void handleMouseMove (CmdMediator *cmdMediator,
36  QPointF posScreen);
37  virtual void handleMousePress (CmdMediator *cmdMediator,
38  QPointF posScreen);
39  virtual void handleMouseRelease (CmdMediator *cmdMediator,
40  QPointF posScreen);
41  virtual QString state() const;
42  virtual void updateAfterPointAddition ();
43  virtual void updateModelDigitizeCurve (CmdMediator *cmdMediator,
44  const DocumentModelDigitizeCurve &modelDigitizeCurve);
45  virtual void updateModelSegments(const DocumentModelSegments &modelSegments);
46 
47 private:
49 };
50 
51 #endif // DIGITIZE_STATE_EMPTY_H
DigitizeStateEmpty::handleCurveChange
virtual void handleCurveChange(CmdMediator *cmdMediator)
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
Definition: DigitizeStateEmpty.cpp:69
DigitizeStateEmpty::canPaste
virtual bool canPaste(const Transformation &transformation, const QSize &viewSize) const
Return true if there is good data in the clipboard for pasting, and that is compatible with the curre...
Definition: DigitizeStateEmpty.cpp:37
DigitizeStateContext
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
Definition: DigitizeStateContext.h:26
DigitizeStateAbstractBase::context
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses,...
Definition: DigitizeStateAbstractBase.cpp:41
DigitizeStateEmpty
Digitizing state before a Document has been created. In this state, the cursor is Qt::ArrowCursor.
Definition: DigitizeStateEmpty.h:12
DigitizeStateEmpty::handleMouseRelease
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
Definition: DigitizeStateEmpty.cpp:94
DigitizeStateEmpty::activeCurve
virtual QString activeCurve() const
Name of the active Curve. This can include AXIS_CURVE_NAME.
Definition: DigitizeStateEmpty.cpp:23
DigitizeStateEmpty::handleContextMenuEventGraph
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, that was intercepted earlier.
Definition: DigitizeStateEmpty.cpp:62
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition: Transformation.h:30
DigitizeStateEmpty::end
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Definition: DigitizeStateEmpty.cpp:50
DigitizeStateEmpty::updateModelSegments
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
Definition: DigitizeStateEmpty.cpp:116
DigitizeStateEmpty::begin
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)
Method that is called at the exact moment a state is entered.
Definition: DigitizeStateEmpty.cpp:28
DigitizeStateAbstractBase.h
DigitizeStateEmpty::updateModelDigitizeCurve
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
Definition: DigitizeStateEmpty.cpp:110
DigitizeStateEmpty::updateAfterPointAddition
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity.
Definition: DigitizeStateEmpty.cpp:105
DigitizeStateEmpty::handleKeyPress
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
Definition: DigitizeStateEmpty.cpp:74
DigitizeState
DigitizeState
Set of possible states of Digitize toolbar.
Definition: DigitizeStateAbstractBase.h:23
DigitizeStateEmpty::handleMouseMove
virtual void handleMouseMove(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mod...
Definition: DigitizeStateEmpty.cpp:82
DigitizeStateEmpty::~DigitizeStateEmpty
virtual ~DigitizeStateEmpty()
Definition: DigitizeStateEmpty.cpp:19
DigitizeStateEmpty::cursor
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
Definition: DigitizeStateEmpty.cpp:43
DocumentModelSegments
Model for DlgSettingsSegments and CmdSettingsSegments.
Definition: DocumentModelSegments.h:16
DocumentModelDigitizeCurve
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
Definition: DocumentModelDigitizeCurve.h:17
CmdMediator
Command queue stack.
Definition: CmdMediator.h:22
DigitizeStateEmpty::handleContextMenuEventAxis
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
Definition: DigitizeStateEmpty.cpp:55
DigitizeStateAbstractBase
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
Definition: DigitizeStateAbstractBase.h:36
DigitizeStateEmpty::handleMousePress
virtual void handleMousePress(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse press that was intercepted earlier.
Definition: DigitizeStateEmpty.cpp:88
DigitizeStateEmpty::state
virtual QString state() const
State name for debugging.
Definition: DigitizeStateEmpty.cpp:100