7 #include "DigitizeStateEmpty.h" 8 #include "DigitizeStateContext.h" 10 #include "MainWindow.h" 13 #include "Transformation.h" 20 DigitizeStateEmpty::~DigitizeStateEmpty ()
32 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::begin";
46 LOG4CPP_DEBUG_S ((*mainCat)) <<
"DigitizeStateEmpty::cursor";
48 return QCursor (Qt::ArrowCursor);
53 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::end";
57 const QString &pointIdentifier)
59 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::handleContextMenuEventAxis " 60 <<
" point=" << pointIdentifier.toLatin1 ().data ();
64 const QStringList &pointIdentifiers)
66 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty ::handleContextMenuEventGraph " 67 <<
"points=" << pointIdentifiers.join(
",").toLatin1 ().data ();
72 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::handleCurveChange";
79 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::handleKeyPress" 80 <<
" key=" << QKeySequence (key).toString ().toLatin1 ().data ();
92 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::handleMousePress";
98 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::handleMouseRelease";
103 return "DigitizeStateEmpty";
108 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::updateAfterPointAddition";
114 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::updateModelDigitizeCurve";
119 LOG4CPP_INFO_S ((*mainCat)) <<
"DigitizeStateEmpty::updateModelSegments";
virtual QString state() const
State name for debugging.
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
virtual void handleCurveChange(CmdMediator *cmdMediator)
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
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...
DigitizeStateEmpty(DigitizeStateContext &context)
Single constructor.
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, that was intercepted earlier.
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses...
MainWindow & mainWindow()
Reference to the MainWindow, without const.
virtual void end()
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.
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
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...
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
Model for DlgSettingsSegments and CmdSettingsSegments.
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity...
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
virtual void handleMousePress(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse press that was intercepted earlier.
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)
Method that is called at the exact moment a state is entered.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
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...