Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
DigitizeStateAbstractBase Class Referenceabstract

Base class for all digitizing states. This serves as an interface to DigitizeStateContext. More...

#include <DigitizeStateAbstractBase.h>

Inheritance diagram for DigitizeStateAbstractBase:
DigitizeStateAxis DigitizeStateColorPicker DigitizeStateCurve DigitizeStateEmpty DigitizeStatePointMatch DigitizeStateSegment DigitizeStateSelect

Public Member Functions

 DigitizeStateAbstractBase (DigitizeStateContext &context)
 Single constructor.
 
virtual QString activeCurve () const =0
 Name of the active Curve. This can include AXIS_CURVE_NAME.
 
virtual void begin (CmdMediator *cmdMediator, DigitizeState previousState)=0
 Method that is called at the exact moment a state is entered.
 
DigitizeStateContextcontext ()
 Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses, without const.
 
const DigitizeStateContextcontext () const
 Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses, without const.
 
virtual void end ()=0
 Method that is called at the exact moment a state is exited. Typically called just before begin for the next state.
 
void handleContextMenuEvent (CmdMediator *cmdMediator, const QString &pointIdentifier)
 Handle a right click that was intercepted earlier. This is done in the superclass since it works the same in all states.
 
virtual void handleCurveChange (CmdMediator *cmdMediator)=0
 Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Segments.
 
virtual void handleKeyPress (CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)=0
 Handle a key press that was intercepted earlier.
 
virtual void handleLeave (CmdMediator *cmdMediator)
 Handle leave in case an override cursor is in effect from last QDialog, by resetting the override cursor.
 
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 mode is worthwhile.
 
virtual void handleMousePress (CmdMediator *cmdMediator, QPointF pos)=0
 Handle a mouse press that was intercepted earlier.
 
virtual void handleMouseRelease (CmdMediator *cmdMediator, QPointF pos)=0
 Handle a mouse release that was intercepted earlier.
 
void handleSetOverrideCursor (CmdMediator *cmdMediator, const QCursor &cursor)
 Handle the command to set the override cursor.
 
void removeOverrideCursor ()
 Remove the override cursor if it is in use. This is called after a leave event, and prior to displaying a QDialog.
 
void setCursor (CmdMediator *cmdMediator)
 Update the cursor according to the current state.
 
virtual QString state () const =0
 State name for debugging.
 
virtual void updateModelDigitizeCurve (CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)=0
 Update the digitize curve settings.
 
virtual void updateModelSegments (const DocumentModelSegments &modelSegments)=0
 Update the segments given the new settings.
 

Protected Member Functions

virtual QCursor cursor (CmdMediator *cmdMediator) const =0
 Returns the state-specific cursor shape.
 

Detailed Description

Base class for all digitizing states. This serves as an interface to DigitizeStateContext.

Definition at line 35 of file DigitizeStateAbstractBase.h.

Constructor & Destructor Documentation

◆ DigitizeStateAbstractBase()

DigitizeStateAbstractBase::DigitizeStateAbstractBase ( DigitizeStateContext context)

Single constructor.

Definition at line 23 of file DigitizeStateAbstractBase.cpp.

◆ ~DigitizeStateAbstractBase()

DigitizeStateAbstractBase::~DigitizeStateAbstractBase ( )
virtual

Definition at line 29 of file DigitizeStateAbstractBase.cpp.

Member Function Documentation

◆ activeCurve()

virtual QString DigitizeStateAbstractBase::activeCurve ( ) const
pure virtual

◆ begin()

virtual void DigitizeStateAbstractBase::begin ( CmdMediator cmdMediator,
DigitizeState  previousState 
)
pure virtual

Method that is called at the exact moment a state is entered.

Typically called just after end for the previous state. The previousState value is used by DigitizeStateColorPicker to return to the previous state

Implemented in DigitizeStateAxis, DigitizeStateColorPicker, DigitizeStateCurve, DigitizeStateEmpty, DigitizeStatePointMatch, DigitizeStateSegment, and DigitizeStateSelect.

◆ context() [1/2]

DigitizeStateContext & DigitizeStateAbstractBase::context ( )

Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses, without const.

Definition at line 33 of file DigitizeStateAbstractBase.cpp.

◆ context() [2/2]

const DigitizeStateContext & DigitizeStateAbstractBase::context ( ) const

Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses, without const.

Definition at line 38 of file DigitizeStateAbstractBase.cpp.

◆ cursor()

virtual QCursor DigitizeStateAbstractBase::cursor ( CmdMediator cmdMediator) const
protectedpure virtual

◆ end()

virtual void DigitizeStateAbstractBase::end ( )
pure virtual

Method that is called at the exact moment a state is exited. Typically called just before begin for the next state.

Implemented in DigitizeStateAxis, DigitizeStateColorPicker, DigitizeStateCurve, DigitizeStateEmpty, DigitizeStatePointMatch, DigitizeStateSegment, and DigitizeStateSelect.

◆ handleContextMenuEvent()

void DigitizeStateAbstractBase::handleContextMenuEvent ( CmdMediator cmdMediator,
const QString &  pointIdentifier 
)

Handle a right click that was intercepted earlier. This is done in the superclass since it works the same in all states.

Definition at line 43 of file DigitizeStateAbstractBase.cpp.

◆ handleCurveChange()

virtual void DigitizeStateAbstractBase::handleCurveChange ( CmdMediator cmdMediator)
pure virtual

Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Segments.

Implemented in DigitizeStateAxis, DigitizeStateColorPicker, DigitizeStateCurve, DigitizeStateEmpty, DigitizeStatePointMatch, DigitizeStateSegment, and DigitizeStateSelect.

◆ handleKeyPress()

virtual void DigitizeStateAbstractBase::handleKeyPress ( CmdMediator cmdMediator,
Qt::Key  key,
bool  atLeastOneSelectedItem 
)
pure virtual

◆ handleLeave()

void DigitizeStateAbstractBase::handleLeave ( CmdMediator cmdMediator)
virtual

Handle leave in case an override cursor is in effect from last QDialog, by resetting the override cursor.

Definition at line 105 of file DigitizeStateAbstractBase.cpp.

◆ handleMouseMove()

virtual void DigitizeStateAbstractBase::handleMouseMove ( CmdMediator cmdMediator,
QPointF  posScreen 
)
pure virtual

Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mode is worthwhile.

Implemented in DigitizeStateAxis, DigitizeStateColorPicker, DigitizeStateCurve, DigitizeStateEmpty, DigitizeStatePointMatch, DigitizeStateSegment, and DigitizeStateSelect.

◆ handleMousePress()

virtual void DigitizeStateAbstractBase::handleMousePress ( CmdMediator cmdMediator,
QPointF  pos 
)
pure virtual

◆ handleMouseRelease()

virtual void DigitizeStateAbstractBase::handleMouseRelease ( CmdMediator cmdMediator,
QPointF  pos 
)
pure virtual

◆ handleSetOverrideCursor()

void DigitizeStateAbstractBase::handleSetOverrideCursor ( CmdMediator cmdMediator,
const QCursor &  cursor 
)

Handle the command to set the override cursor.

Definition at line 112 of file DigitizeStateAbstractBase.cpp.

◆ removeOverrideCursor()

void DigitizeStateAbstractBase::removeOverrideCursor ( )

Remove the override cursor if it is in use. This is called after a leave event, and prior to displaying a QDialog.

Definition at line 124 of file DigitizeStateAbstractBase.cpp.

◆ setCursor()

void DigitizeStateAbstractBase::setCursor ( CmdMediator cmdMediator)

Update the cursor according to the current state.

Definition at line 138 of file DigitizeStateAbstractBase.cpp.

◆ state()

virtual QString DigitizeStateAbstractBase::state ( ) const
pure virtual

◆ updateModelDigitizeCurve()

virtual void DigitizeStateAbstractBase::updateModelDigitizeCurve ( CmdMediator cmdMediator,
const DocumentModelDigitizeCurve modelDigitizeCurve 
)
pure virtual

◆ updateModelSegments()

virtual void DigitizeStateAbstractBase::updateModelSegments ( const DocumentModelSegments modelSegments)
pure virtual

The documentation for this class was generated from the following files: