Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DigitizeStateEmpty Class Reference

Digitizing state before a Document has been created. In this state, the cursor is Qt::ArrowCursor. More...

#include <DigitizeStateEmpty.h>

Inheritance diagram for DigitizeStateEmpty:
Inheritance graph
Collaboration diagram for DigitizeStateEmpty:
Collaboration graph

Public Member Functions

 DigitizeStateEmpty (DigitizeStateContext &context)
 Single constructor.
 
virtual ~DigitizeStateEmpty ()
 
virtual QString activeCurve () const
 Name of the active Curve. This can include AXIS_CURVE_NAME.
 
virtual void begin (CmdMediator *cmdMediator, DigitizeState previousState)
 Method that is called at the exact moment a state is entered.
 
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 current state.
 
virtual QCursor cursor (CmdMediator *cmdMediator) const
 Returns the state-specific cursor shape.
 
virtual void end ()
 Method that is called at the exact moment a state is exited. Typically called just before begin for the next state.
 
virtual void handleCurveChange (CmdMediator *cmdMediator)
 Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Segments.
 
virtual void handleContextMenuEventAxis (CmdMediator *cmdMediator, const QString &pointIdentifier)
 Handle a right click, on an axis point, that was intercepted earlier.
 
virtual void handleContextMenuEventGraph (CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
 Handle a right click, on a graph point, that was intercepted earlier.
 
virtual void handleKeyPress (CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
 Handle a key press that was intercepted earlier.
 
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 mode is worthwhile.
 
virtual void handleMousePress (CmdMediator *cmdMediator, QPointF posScreen)
 Handle a mouse press that was intercepted earlier.
 
virtual void handleMouseRelease (CmdMediator *cmdMediator, QPointF posScreen)
 Handle a mouse release that was intercepted earlier.
 
virtual QString state () const
 State name for debugging.
 
virtual void updateAfterPointAddition ()
 Update graphics attributes after possible new points. This is useful for highlight opacity.
 
virtual void updateModelDigitizeCurve (CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
 Update the digitize curve settings.
 
virtual void updateModelSegments (const DocumentModelSegments &modelSegments)
 Update the segments given the new settings.
 
- Public Member Functions inherited from DigitizeStateAbstractBase
 DigitizeStateAbstractBase (DigitizeStateContext &context)
 Single constructor.
 
virtual ~DigitizeStateAbstractBase ()
 
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.
 
void setCursor (CmdMediator *cmdMediator)
 Update the cursor according to the current state.
 

Additional Inherited Members

- Protected Member Functions inherited from DigitizeStateAbstractBase
bool canPasteProtected (const Transformation &transformation, const QSize &viewSize) const
 Protected version of canPaste method. Some, but not all, leaf classes use this method.
 

Detailed Description

Digitizing state before a Document has been created. In this state, the cursor is Qt::ArrowCursor.

Definition at line 13 of file DigitizeStateEmpty.h.

Constructor & Destructor Documentation

◆ DigitizeStateEmpty()

DigitizeStateEmpty::DigitizeStateEmpty ( DigitizeStateContext & context)

Single constructor.

Definition at line 15 of file DigitizeStateEmpty.cpp.

15 :
17{
18}
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses,...

◆ ~DigitizeStateEmpty()

DigitizeStateEmpty::~DigitizeStateEmpty ( )
virtual

Definition at line 20 of file DigitizeStateEmpty.cpp.

21{
22}

Member Function Documentation

◆ activeCurve()

QString DigitizeStateEmpty::activeCurve ( ) const
virtual

Name of the active Curve. This can include AXIS_CURVE_NAME.

Implements DigitizeStateAbstractBase.

Definition at line 24 of file DigitizeStateEmpty.cpp.

25{
26 return "";
27}

◆ begin()

void DigitizeStateEmpty::begin ( CmdMediator * cmdMediator,
DigitizeState previousState )
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

Implements DigitizeStateAbstractBase.

Definition at line 29 of file DigitizeStateEmpty.cpp.

31{
32 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::begin";
33
34 setCursor(cmdMediator);
36}
log4cpp::Category * mainCat
Definition Logger.cpp:14
void setCursor(CmdMediator *cmdMediator)
Update the cursor according to the current state.
MainWindow & mainWindow()
Reference to the MainWindow, without const.
virtual QString activeCurve() const
Name of the active Curve. This can include AXIS_CURVE_NAME.
void updateViewsOfSettings(const QString &activeCurve)
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateCont...
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ canPaste()

bool DigitizeStateEmpty::canPaste ( const Transformation & transformation,
const QSize & viewSize ) const
virtual

Return true if there is good data in the clipboard for pasting, and that is compatible with the current state.

Implements DigitizeStateAbstractBase.

Definition at line 38 of file DigitizeStateEmpty.cpp.

40{
41 return false;
42}

◆ cursor()

QCursor DigitizeStateEmpty::cursor ( CmdMediator * cmdMediator) const
virtual

Returns the state-specific cursor shape.

Implements DigitizeStateAbstractBase.

Definition at line 44 of file DigitizeStateEmpty.cpp.

45{
46 LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateEmpty::cursor";
47
48 return QCursor (Qt::ArrowCursor);
49}
const int INNER_RADIUS_MIN
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20

◆ end()

void DigitizeStateEmpty::end ( )
virtual

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

Implements DigitizeStateAbstractBase.

Definition at line 51 of file DigitizeStateEmpty.cpp.

52{
53 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::end";
54}

◆ handleContextMenuEventAxis()

void DigitizeStateEmpty::handleContextMenuEventAxis ( CmdMediator * cmdMediator,
const QString & pointIdentifier )
virtual

Handle a right click, on an axis point, that was intercepted earlier.

Implements DigitizeStateAbstractBase.

Definition at line 56 of file DigitizeStateEmpty.cpp.

58{
59 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::handleContextMenuEventAxis "
60 << " point=" << pointIdentifier.toLatin1 ().data ();
61}

◆ handleContextMenuEventGraph()

void DigitizeStateEmpty::handleContextMenuEventGraph ( CmdMediator * cmdMediator,
const QStringList & pointIdentifiers )
virtual

Handle a right click, on a graph point, that was intercepted earlier.

Implements DigitizeStateAbstractBase.

Definition at line 63 of file DigitizeStateEmpty.cpp.

65{
66 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty ::handleContextMenuEventGraph "
67 << "points=" << pointIdentifiers.join(",").toLatin1 ().data ();
68}

◆ handleCurveChange()

void DigitizeStateEmpty::handleCurveChange ( CmdMediator * cmdMediator)
virtual

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

Implements DigitizeStateAbstractBase.

Definition at line 70 of file DigitizeStateEmpty.cpp.

71{
72 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::handleCurveChange";
73}

◆ handleKeyPress()

void DigitizeStateEmpty::handleKeyPress ( CmdMediator * cmdMediator,
Qt::Key key,
bool atLeastOneSelectedItem )
virtual

Handle a key press that was intercepted earlier.

Implements DigitizeStateAbstractBase.

Definition at line 75 of file DigitizeStateEmpty.cpp.

78{
79 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::handleKeyPress"
80 << " key=" << QKeySequence (key).toString ().toLatin1 ().data ();
81}

◆ handleMouseMove()

void DigitizeStateEmpty::handleMouseMove ( CmdMediator * cmdMediator,
QPointF posScreen )
virtual

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

Implements DigitizeStateAbstractBase.

Definition at line 83 of file DigitizeStateEmpty.cpp.

85{
86// LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateEmpty::handleMouseMove";
87}

◆ handleMousePress()

void DigitizeStateEmpty::handleMousePress ( CmdMediator * cmdMediator,
QPointF pos )
virtual

Handle a mouse press that was intercepted earlier.

Implements DigitizeStateAbstractBase.

Definition at line 89 of file DigitizeStateEmpty.cpp.

91{
92 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::handleMousePress";
93}

◆ handleMouseRelease()

void DigitizeStateEmpty::handleMouseRelease ( CmdMediator * cmdMediator,
QPointF pos )
virtual

Handle a mouse release that was intercepted earlier.

Implements DigitizeStateAbstractBase.

Definition at line 95 of file DigitizeStateEmpty.cpp.

97{
98 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::handleMouseRelease";
99}

◆ state()

QString DigitizeStateEmpty::state ( ) const
virtual

State name for debugging.

Implements DigitizeStateAbstractBase.

Definition at line 101 of file DigitizeStateEmpty.cpp.

102{
103 return "DigitizeStateEmpty";
104}

◆ updateAfterPointAddition()

void DigitizeStateEmpty::updateAfterPointAddition ( )
virtual

Update graphics attributes after possible new points. This is useful for highlight opacity.

Implements DigitizeStateAbstractBase.

Definition at line 106 of file DigitizeStateEmpty.cpp.

107{
108 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::updateAfterPointAddition";
109}

◆ updateModelDigitizeCurve()

void DigitizeStateEmpty::updateModelDigitizeCurve ( CmdMediator * cmdMediator,
const DocumentModelDigitizeCurve & modelDigitizeCurve )
virtual

Update the digitize curve settings.

Implements DigitizeStateAbstractBase.

Definition at line 111 of file DigitizeStateEmpty.cpp.

113{
114 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::updateModelDigitizeCurve";
115}

◆ updateModelSegments()

void DigitizeStateEmpty::updateModelSegments ( const DocumentModelSegments & modelSegments)
virtual

Update the segments given the new settings.

Implements DigitizeStateAbstractBase.

Definition at line 117 of file DigitizeStateEmpty.cpp.

118{
119 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateEmpty::updateModelSegments";
120}

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