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

Context class for transformation state machine. More...

#include <TransformationStateContext.h>

Public Member Functions

 TransformationStateContext (QGraphicsScene &scene, bool isGnuplot)
 Single constructor.
 
bool isGnuplot () const
 Flag for gnuplot debug files.
 
void resetOnLoad ()
 Reset, when loading a document after the first, to same state that first document was at when loaded.
 
void triggerStateTransition (TransformationState transformationState, CmdMediator &cmdMediator, const Transformation &transformation, const QString &selectedGraphCurve)
 Trigger a state transition to be performed immediately.
 
void updateAxesChecker (CmdMediator &cmdMediator, const Transformation &transformation)
 Apply the new DocumentModelAxesChecker.
 

Detailed Description

Context class for transformation state machine.

This removes some tricky state processing from MainWindow. Unlike typical state machines, the transitions are driven directly from the outside rather than indirectly by events that are processed by the states (this has triggerStateTransition rather than requestStateTransition)

Definition at line 21 of file TransformationStateContext.h.

Constructor & Destructor Documentation

◆ TransformationStateContext()

TransformationStateContext::TransformationStateContext ( QGraphicsScene &  scene,
bool  isGnuplot 
)

Single constructor.

Definition at line 17 of file TransformationStateContext.cpp.

◆ ~TransformationStateContext()

TransformationStateContext::~TransformationStateContext ( )
virtual

Definition at line 28 of file TransformationStateContext.cpp.

Member Function Documentation

◆ isGnuplot()

bool TransformationStateContext::isGnuplot ( ) const

Flag for gnuplot debug files.

Definition at line 32 of file TransformationStateContext.cpp.

◆ resetOnLoad()

void TransformationStateContext::resetOnLoad ( )

Reset, when loading a document after the first, to same state that first document was at when loaded.

Definition at line 37 of file TransformationStateContext.cpp.

◆ triggerStateTransition()

void TransformationStateContext::triggerStateTransition ( TransformationState  transformationState,
CmdMediator cmdMediator,
const Transformation transformation,
const QString &  selectedGraphCurve 
)

Trigger a state transition to be performed immediately.

Definition at line 44 of file TransformationStateContext.cpp.

◆ updateAxesChecker()

void TransformationStateContext::updateAxesChecker ( CmdMediator cmdMediator,
const Transformation transformation 
)

Apply the new DocumentModelAxesChecker.

Definition at line 69 of file TransformationStateContext.cpp.


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