1 #ifndef DIGITIZE_STATE_CONTEXT_H
2 #define DIGITIZE_STATE_CONTEXT_H
4 #include "DigitizeStateAbstractBase.h"
5 #include "PointStyle.h"
7 #include <QGraphicsView>
11 class CmdAbstractBase;
54 bool atLeastOneSelectedItem);
90 void setDragMode (QGraphicsView::DragMode dragMode);
96 QString
state()
const;
105 QGraphicsView &
view();
110 void completeRequestedStateTransitionIfExists ();
113 QGraphicsView &m_view;
114 bool m_imageIsLoaded;
116 QVector<DigitizeStateAbstractBase*> m_states;
117 DigitizeState m_currentState;
118 DigitizeState m_requestedState;
125 #endif // DIGITIZE_STATE_CONTEXT_H
void requestDelayedStateTransition(DigitizeState digitizeState)
Initiate state transition to be performed later, when DigitizeState is off the stack.
void handleMouseMove(QPointF pos)
See DigitizeStateAbstractBase::handleMouseMove.
CmdMediator & cmdMediator()
Provide CmdMediator for indirect access to the Document.
void setDragMode(QGraphicsView::DragMode dragMode)
Set QGraphicsView drag mode (in m_view). Called from DigitizeStateAbstractBase subclasses.
void setImageIsLoaded(bool imageIsLoaded)
Set the image so QGraphicsView cursor and drag mode are accessible.
QString activeCurve() const
Curve name for active Curve. This can include AXIS_CURVE_NAME, and empty string.
void bindToCmdMediatorAndResetOnLoad(CmdMediator *cmdMediator)
Bind to CmdMediator class.
void updateModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
void handleContextMenuEvent(const QString &pointIdentifier)
See DigitizeStateAbstractBase::handleContextMenuEvent.
MainWindow & mainWindow()
Reference to the MainWindow, without const.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
QString state() const
State name for debugging.
void requestImmediateStateTransition(DigitizeState digitizeState)
Perform immediate state transition. Called from outside state machine.
void handleLeave()
See DigitizeStateAbstractBase::handleLeave.
void appendNewCmd(QUndoCommand *cmd)
Append just-created QUndoCommand to command stack. This is called from DigitizeStateAbstractBase subc...
Model for DlgSettingsSegments and CmdSettingsSegments.
bool isGnuplot() const
Get method for gnuplot flag.
void handleSetOverrideCursor(const QCursor &cursor)
See DigitizeStateAbstractBase::handleSetOverrideCursor.
QGraphicsView & view()
QGraphicsView for use by DigitizeStateAbstractBase subclasses.
void handleCurveChange()
See DigitizeStateAbstractBase::handleCurveChange.
void handleMouseRelease(QPointF pos)
See DigitizeStateAbstractBase::handleMouseRelease.
void handleKeyPress(Qt::Key key, bool atLeastOneSelectedItem)
See DigitizeStateAbstractBase::handleKeyPress.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void setCursor()
Set cursor after asking state for the new cursor shape.
void handleMousePress(QPointF pos)
See DigitizeStateAbstractBase::handleMousePress.