Engauge Digitizer  2
Public Member Functions | List of all members
DigitizeStateContext Class Reference

Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a standard state machine implementation. More...

#include <DigitizeStateContext.h>

Inheritance diagram for DigitizeStateContext:

Public Member Functions

 DigitizeStateContext (MainWindow &mainWindow, QGraphicsView &view, bool isGnuplot)
 Single constructor.
 
QString activeCurve () const
 Curve name for active Curve. This can include AXIS_CURVE_NAME, and empty string.
 
void appendNewCmd (QUndoCommand *cmd)
 Append just-created QUndoCommand to command stack. This is called from DigitizeStateAbstractBase subclasses.
 
void bindToCmdMediatorAndResetOnLoad (CmdMediator *cmdMediator)
 Bind to CmdMediator class. More...
 
CmdMediatorcmdMediator ()
 Provide CmdMediator for indirect access to the Document.
 
const CmdMediatorcmdMediator () const
 Provide CmdMediator for indirect access to the Document.
 
void handleContextMenuEvent (const QString &pointIdentifier)
 See DigitizeStateAbstractBase::handleContextMenuEvent.
 
void handleCurveChange ()
 See DigitizeStateAbstractBase::handleCurveChange.
 
void handleKeyPress (Qt::Key key, bool atLeastOneSelectedItem)
 See DigitizeStateAbstractBase::handleKeyPress.
 
void handleLeave ()
 See DigitizeStateAbstractBase::handleLeave.
 
void handleMouseMove (QPointF pos)
 See DigitizeStateAbstractBase::handleMouseMove.
 
void handleMousePress (QPointF pos)
 See DigitizeStateAbstractBase::handleMousePress.
 
void handleMouseRelease (QPointF pos)
 See DigitizeStateAbstractBase::handleMouseRelease.
 
void handleSetOverrideCursor (const QCursor &cursor)
 See DigitizeStateAbstractBase::handleSetOverrideCursor.
 
bool isGnuplot () const
 Get method for gnuplot flag.
 
MainWindowmainWindow ()
 Reference to the MainWindow, without const.
 
const MainWindowmainWindow () const
 Reference to the MainWindow, with const.
 
void requestDelayedStateTransition (DigitizeState digitizeState)
 Initiate state transition to be performed later, when DigitizeState is off the stack.
 
void requestImmediateStateTransition (DigitizeState digitizeState)
 Perform immediate state transition. Called from outside state machine.
 
void setCursor ()
 Set cursor after asking state for the new cursor shape.
 
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 state () const
 State name for debugging.
 
void updateModelDigitizeCurve (const DocumentModelDigitizeCurve &modelDigitizeCurve)
 Update the digitize curve settings.
 
void updateModelSegments (const DocumentModelSegments &modelSegments)
 Update the segments given the new settings.
 
QGraphicsView & view ()
 QGraphicsView for use by DigitizeStateAbstractBase subclasses.
 

Detailed Description

Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a standard state machine implementation.

Definition at line 19 of file DigitizeStateContext.h.

Member Function Documentation

void DigitizeStateContext::bindToCmdMediatorAndResetOnLoad ( CmdMediator cmdMediator)

Bind to CmdMediator class.

Binding occurs from the single instance of this class to each new CmdMediator. Resetting makes re-initializes for documents after the first

Definition at line 62 of file DigitizeStateContext.cpp.


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