1 #ifndef DIGITIZE_STATE_ABSTRACT_BASE_H
2 #define DIGITIZE_STATE_ABSTRACT_BASE_H
4 #include "PointStyle.h"
18 DIGITIZE_STATE_COLOR_PICKER,
21 DIGITIZE_STATE_POINT_MATCH,
22 DIGITIZE_STATE_SEGMENT,
23 DIGITIZE_STATE_SELECT,
40 virtual void begin(DigitizeState previousState) = 0;
49 virtual void end() = 0;
59 bool atLeastOneSelectedItem) = 0;
83 virtual QString
state()
const = 0;
93 virtual QCursor
cursor ()
const = 0;
100 bool m_isOverrideCursor;
103 #endif // DIGITIZE_STATE_ABSTRACT_BASE_H
virtual QString activeCurve() const =0
Name of the active Curve. This can include AXIS_CURVE_NAME.
virtual QString state() const =0
State name for debugging.
virtual void handleLeave()
Handle leave in case an override cursor is in effect from last QDialog, by resetting the override cur...
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.
virtual void handleCurveChange()=0
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
void setCursor()
Update the cursor according to the current state.
virtual void begin(DigitizeState previousState)=0
Method that is called at the exact moment a state is entered.
virtual void handleMousePress(QPointF pos)=0
Handle a mouse press that was intercepted earlier.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)=0
Update the segments given the new settings.
virtual void handleKeyPress(Qt::Key key, bool atLeastOneSelectedItem)=0
Handle a key press that was intercepted earlier.
virtual void updateModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)=0
Update the digitize curve settings.
void handleContextMenuEvent(const QString &pointIdentifier)
Handle a right click that was intercepted earlier. This is done in the superclass since it works the ...
Model for DlgSettingsSegments and CmdSettingsSegments.
void removeOverrideCursor()
Remove the override cursor if it is in use. This is called after a leave event, and prior to displayi...
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
virtual void handleMouseRelease(QPointF pos)=0
Handle a mouse release that was intercepted earlier.
void handleSetOverrideCursor(const QCursor &cursor)
Handle the command to set the override cursor.
virtual QCursor cursor() const =0
Returns the state-specific cursor shape.
virtual void handleMouseMove(QPointF posScreen)=0
Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mod...