7 #ifndef DIGITIZE_STATE_ABSTRACT_BASE_H 8 #define DIGITIZE_STATE_ABSTRACT_BASE_H 10 #include "PointStyle.h" 26 DIGITIZE_STATE_COLOR_PICKER,
29 DIGITIZE_STATE_POINT_MATCH,
30 DIGITIZE_STATE_SEGMENT,
31 DIGITIZE_STATE_SELECT,
50 DigitizeState previousState) = 0;
54 const QSize &viewSize)
const = 0;
63 virtual void end() = 0;
67 const QString &pointIdentifier) = 0;
71 const QStringList &pointIdentifiers) = 0;
79 bool atLeastOneSelectedItem) = 0;
83 QPointF posScreen) = 0;
97 virtual QString
state()
const = 0;
112 const QSize &viewSize)
const;
124 #endif // DIGITIZE_STATE_ABSTRACT_BASE_H virtual void handleMousePress(CmdMediator *cmdMediator, QPointF pos)=0
Handle a mouse press that was intercepted earlier.
virtual QString activeCurve() const =0
Name of the active Curve. This can include AXIS_CURVE_NAME.
virtual QCursor cursor(CmdMediator *cmdMediator) const =0
Returns the state-specific cursor shape.
bool canPasteProtected(const Transformation &transformation, const QSize &viewSize) const
Protected version of canPaste method. Some, but not all, leaf classes use this method.
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)=0
Handle a key press that was intercepted earlier.
virtual QString state() const =0
State name for debugging.
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF pos)=0
Handle a mouse release that was intercepted earlier.
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)=0
Handle a right click, on an axis point, that was intercepted earlier.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses...
virtual void end()=0
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
void setCursor(CmdMediator *cmdMediator)
Update the cursor according to the current state.
virtual bool canPaste(const Transformation &transformation, const QSize &viewSize) const =0
Return true if there is good data in the clipboard for pasting, and that is compatible with the curre...
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)=0
Update the segments given the new settings.
virtual void handleMouseMove(CmdMediator *cmdMediator, QPointF posScreen)=0
Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mod...
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)=0
Update the digitize curve settings.
Model for DlgSettingsSegments and CmdSettingsSegments.
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)=0
Handle a right click, on a graph point, that was intercepted earlier.
virtual void handleCurveChange(CmdMediator *cmdMediator)=0
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
virtual void updateAfterPointAddition()=0
Update graphics attributes after possible new points. This is useful for highlight opacity...
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)=0
Method that is called at the exact moment a state is entered.