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

Background image state for showing no image. More...

#include <BackgroundStateNone.h>

Inheritance diagram for BackgroundStateNone:
Inheritance graph
Collaboration diagram for BackgroundStateNone:
Collaboration graph

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from BackgroundStateAbstractBase
void setImageVisible (bool visible)
 Show/hide background image. More...
 
void setProcessedPixmap (const QPixmap &pixmap)
 Save the image for this state after it has been processed by the leaf class. More...
 

Detailed Description

Background image state for showing no image.

Definition at line 12 of file BackgroundStateNone.h.

Constructor & Destructor Documentation

◆ BackgroundStateNone()

BackgroundStateNone::BackgroundStateNone ( BackgroundStateContext context,
GraphicsScene scene 
)

Single constructor.

Definition at line 15 of file BackgroundStateNone.cpp.

17  :
19  scene)
20 {

Member Function Documentation

◆ begin()

void BackgroundStateNone::begin ( )
virtual

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

Implements BackgroundStateAbstractBase.

Definition at line 22 of file BackgroundStateNone.cpp.

24 {
25  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::begin";
26 
27  setImageVisible (true);

◆ end()

void BackgroundStateNone::end ( )
virtual

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

Implements BackgroundStateAbstractBase.

Definition at line 29 of file BackgroundStateNone.cpp.

31 {
32  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::end";
33 
34  setImageVisible (false);

◆ fitInView()

void BackgroundStateNone::fitInView ( GraphicsView view)
virtual

Zoom so background fills the window.

Implements BackgroundStateAbstractBase.

Definition at line 36 of file BackgroundStateNone.cpp.

38 {
39  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::fitInView";
40 
41  view.fitInView (imageItem ().boundingRect());

◆ setCurveSelected()

void BackgroundStateNone::setCurveSelected ( bool  isGnuplot,
const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter colorFilter,
const QString &  curveSelected 
)
virtual

Update the currently selected curve name.

Implements BackgroundStateAbstractBase.

Definition at line 43 of file BackgroundStateNone.cpp.

49 {
50  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::setCurveSelected";

◆ setPixmap()

void BackgroundStateNone::setPixmap ( bool  isGnuplot,
const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter modelColorFilter,
const QPixmap &  pixmap,
const QString &  curveSelected 
)
virtual

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

Implements BackgroundStateAbstractBase.

Definition at line 52 of file BackgroundStateNone.cpp.

59 {
60  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::setPixmap";
61 
62  // Empty background
63  QPixmap pixmapNone (pixmapOriginal);
64  pixmapNone.fill (Qt::white);
65  setProcessedPixmap (pixmapNone);
66 

◆ state()

QString BackgroundStateNone::state ( ) const
virtual

State name for debugging.

Implements BackgroundStateAbstractBase.

Definition at line 68 of file BackgroundStateNone.cpp.

70 {
71  return "BackgroundStateNone";

◆ updateColorFilter()

void BackgroundStateNone::updateColorFilter ( bool  isGnuplot,
const Transformation transformation,
const DocumentModelGridRemoval modelGridRemoval,
const DocumentModelColorFilter modelColorFilter,
const QString &  curveSelected 
)
virtual

Apply color filter settings.

Implements BackgroundStateAbstractBase.

Definition at line 73 of file BackgroundStateNone.cpp.

79 {
80  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::updateColorFilter";

The documentation for this class was generated from the following files:
BackgroundStateAbstractBase::setImageVisible
void setImageVisible(bool visible)
Show/hide background image.
Definition: BackgroundStateAbstractBase.cpp:64
BackgroundStateAbstractBase::imageItem
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
Definition: BackgroundStateAbstractBase.cpp:49
BackgroundStateAbstractBase
Background image state machine state base class.
Definition: BackgroundStateAbstractBase.h:29
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
BackgroundStateAbstractBase::context
BackgroundStateContext & context()
Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses,...
Definition: BackgroundStateAbstractBase.cpp:34
BackgroundStateAbstractBase::setProcessedPixmap
void setProcessedPixmap(const QPixmap &pixmap)
Save the image for this state after it has been processed by the leaf class.
Definition: BackgroundStateAbstractBase.cpp:69
mainCat
log4cpp::Category * mainCat
Definition: Logger.cpp:14
BackgroundStateAbstractBase::scene
GraphicsScene & scene()
Reference to the GraphicsScene, without const.
Definition: BackgroundStateAbstractBase.cpp:54