Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
BackgroundStateAbstractBase Class Referenceabstract

Background image state machine state base class. More...

#include <BackgroundStateAbstractBase.h>

Inheritance diagram for BackgroundStateAbstractBase:
BackgroundStateCurve BackgroundStateNone BackgroundStateOriginal BackgroundStateUnloaded

Public Member Functions

 BackgroundStateAbstractBase (BackgroundStateContext &context, GraphicsScene &scene)
 Single constructor.
 
virtual void begin ()=0
 Method that is called at the exact moment a state is entered. Typically called just after end for the previous state.
 
BackgroundStateContextcontext ()
 Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses, without const.
 
const BackgroundStateContextcontext () const
 Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses, without const.
 
virtual void end ()=0
 Method that is called at the exact moment a state is exited. Typically called just before begin for the next state.
 
virtual void fitInView (GraphicsView &view)=0
 Zoom so background fills the window.
 
QImage image () const
 Image for the current state.
 
QGraphicsPixmapItem & imageItem () const
 Graphics image item for the current state.
 
GraphicsScenescene ()
 Reference to the GraphicsScene, without const.
 
const GraphicsScenescene () const
 Reference to the GraphicsScene, without const.
 
virtual void setCurveSelected (const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)=0
 Update the currently selected curve name.
 
virtual void setPixmap (const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QPixmap &pixmap)=0
 Update the image for this state, after the leaf class processes it appropriately.
 
virtual QString state () const =0
 State name for debugging.
 
virtual void updateColorFilter (const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter)=0
 Apply color filter settings.
 

Protected Member Functions

void setImageVisible (bool visible)
 Show/hide background image.
 
void setProcessedPixmap (const QPixmap &pixmap)
 Save the image for this state after it has been processed by the leaf class.
 

Detailed Description

Background image state machine state base class.

Definition at line 30 of file BackgroundStateAbstractBase.h.

Constructor & Destructor Documentation

◆ BackgroundStateAbstractBase()

BackgroundStateAbstractBase::BackgroundStateAbstractBase ( BackgroundStateContext context,
GraphicsScene scene 
)

Single constructor.

Definition at line 14 of file BackgroundStateAbstractBase.cpp.

◆ ~BackgroundStateAbstractBase()

BackgroundStateAbstractBase::~BackgroundStateAbstractBase ( )

Definition at line 28 of file BackgroundStateAbstractBase.cpp.

Member Function Documentation

◆ begin()

virtual void BackgroundStateAbstractBase::begin ( )
pure virtual

Method that is called at the exact moment a state is entered. Typically called just after end for the previous state.

Implemented in BackgroundStateCurve, BackgroundStateNone, BackgroundStateOriginal, and BackgroundStateUnloaded.

◆ context() [1/2]

BackgroundStateContext & BackgroundStateAbstractBase::context ( )

Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses, without const.

Definition at line 32 of file BackgroundStateAbstractBase.cpp.

◆ context() [2/2]

const BackgroundStateContext & BackgroundStateAbstractBase::context ( ) const

Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses, without const.

Definition at line 37 of file BackgroundStateAbstractBase.cpp.

◆ end()

virtual void BackgroundStateAbstractBase::end ( )
pure virtual

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

Implemented in BackgroundStateCurve, BackgroundStateNone, BackgroundStateOriginal, and BackgroundStateUnloaded.

◆ fitInView()

virtual void BackgroundStateAbstractBase::fitInView ( GraphicsView view)
pure virtual

Zoom so background fills the window.

Implemented in BackgroundStateCurve, BackgroundStateNone, BackgroundStateOriginal, and BackgroundStateUnloaded.

◆ image()

QImage BackgroundStateAbstractBase::image ( ) const

Image for the current state.

Definition at line 42 of file BackgroundStateAbstractBase.cpp.

◆ imageItem()

QGraphicsPixmapItem & BackgroundStateAbstractBase::imageItem ( ) const

Graphics image item for the current state.

Definition at line 47 of file BackgroundStateAbstractBase.cpp.

◆ scene() [1/2]

GraphicsScene & BackgroundStateAbstractBase::scene ( )

Reference to the GraphicsScene, without const.

Definition at line 52 of file BackgroundStateAbstractBase.cpp.

◆ scene() [2/2]

const GraphicsScene & BackgroundStateAbstractBase::scene ( ) const

Reference to the GraphicsScene, without const.

Definition at line 57 of file BackgroundStateAbstractBase.cpp.

◆ setCurveSelected()

virtual void BackgroundStateAbstractBase::setCurveSelected ( const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter colorFilter,
const QString &  curveSelected 
)
pure virtual

Update the currently selected curve name.

Implemented in BackgroundStateCurve, BackgroundStateNone, BackgroundStateOriginal, and BackgroundStateUnloaded.

◆ setImageVisible()

void BackgroundStateAbstractBase::setImageVisible ( bool  visible)
protected

Show/hide background image.

Definition at line 62 of file BackgroundStateAbstractBase.cpp.

◆ setPixmap()

virtual void BackgroundStateAbstractBase::setPixmap ( const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter modelColorFilter,
const QPixmap &  pixmap 
)
pure virtual

Update the image for this state, after the leaf class processes it appropriately.

Implemented in BackgroundStateNone, BackgroundStateOriginal, BackgroundStateUnloaded, and BackgroundStateCurve.

◆ setProcessedPixmap()

void BackgroundStateAbstractBase::setProcessedPixmap ( const QPixmap &  pixmap)
protected

Save the image for this state after it has been processed by the leaf class.

Definition at line 67 of file BackgroundStateAbstractBase.cpp.

◆ state()

virtual QString BackgroundStateAbstractBase::state ( ) const
pure virtual

◆ updateColorFilter()

virtual void BackgroundStateAbstractBase::updateColorFilter ( const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter modelColorFilter 
)
pure virtual

Apply color filter settings.

Implemented in BackgroundStateCurve, BackgroundStateNone, BackgroundStateOriginal, and BackgroundStateUnloaded.


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