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

Background image state for showing original (=unfiltered) image. More...

#include <BackgroundStateOriginal.h>

Inheritance diagram for BackgroundStateOriginal:
Inheritance graph
Collaboration diagram for BackgroundStateOriginal:
Collaboration graph

Public Member Functions

 BackgroundStateOriginal (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 original (=unfiltered) image.

Definition at line 13 of file BackgroundStateOriginal.h.

Constructor & Destructor Documentation

◆ BackgroundStateOriginal()

BackgroundStateOriginal::BackgroundStateOriginal ( BackgroundStateContext context,
GraphicsScene scene 
)

Single constructor.

Definition at line 17 of file BackgroundStateOriginal.cpp.

18  :
20  scene)
21 {
22 }
BackgroundStateContext & context()
Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses,...
Background image state machine state base class.
GraphicsScene & scene()
Reference to the GraphicsScene, without const.

Member Function Documentation

◆ begin()

void BackgroundStateOriginal::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 24 of file BackgroundStateOriginal.cpp.

25 {
26  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::begin";
27 
28  setImageVisible (true);
29 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
void setImageVisible(bool visible)
Show/hide background image.
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ end()

void BackgroundStateOriginal::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 31 of file BackgroundStateOriginal.cpp.

32 {
33  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::end";
34 
35  setImageVisible (false);
36 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
void setImageVisible(bool visible)
Show/hide background image.
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ fitInView()

void BackgroundStateOriginal::fitInView ( GraphicsView view)
virtual

Zoom so background fills the window.

Implements BackgroundStateAbstractBase.

Definition at line 38 of file BackgroundStateOriginal.cpp.

39 {
40  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::fitInView";
41 
42  view.fitInView (imageItem ().boundingRect());
43 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ setCurveSelected()

void BackgroundStateOriginal::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 45 of file BackgroundStateOriginal.cpp.

50 {
51  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::setCurveSelected";
52 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ setPixmap()

void BackgroundStateOriginal::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 54 of file BackgroundStateOriginal.cpp.

60 {
61  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::setPixmap";
62 
63  // Unfiltered original image
64  setProcessedPixmap (pixmapOriginal);
65 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
void setProcessedPixmap(const QPixmap &pixmap)
Save the image for this state after it has been processed by the leaf class.
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ state()

QString BackgroundStateOriginal::state ( ) const
virtual

State name for debugging.

Implements BackgroundStateAbstractBase.

Definition at line 67 of file BackgroundStateOriginal.cpp.

68 {
69  return "BackgroundStateOriginal";
70 }

◆ updateColorFilter()

void BackgroundStateOriginal::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 72 of file BackgroundStateOriginal.cpp.

77 {
78  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::updateColorFilter";
79 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14

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