Go to the documentation of this file.
7 #ifndef BACKGROUND_STATE_ABSTRACT_BASE_H
8 #define BACKGROUND_STATE_ABSTRACT_BASE_H
10 #include <QGraphicsPixmapItem>
39 virtual void begin() = 0;
48 virtual void end() = 0;
54 QImage
image ()
const;
70 const QString &curveSelected) = 0;
77 const QPixmap &pixmap,
78 const QString &curveSelected) = 0;
81 virtual QString
state()
const = 0;
88 const QString &curveSelected) = 0;
106 QGraphicsPixmapItem *m_imageItem;
111 #endif // BACKGROUND_STATE_ABSTRACT_BASE_H
virtual ~BackgroundStateAbstractBase()
void setImageVisible(bool visible)
Show/hide background image.
BackgroundState
Set of possible states of background image.
virtual void setCurveSelected(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)=0
Update the currently selected curve name.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
Background image state machine state base class.
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Add point and line handling to generic QGraphicsScene.
BackgroundStateContext & context()
Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses,...
void setProcessedPixmap(const QPixmap &pixmap)
Save the image for this state after it has been processed by the leaf class.
virtual void end()=0
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
GraphicsScene & scene()
Reference to the GraphicsScene, without const.
virtual void begin()=0
Method that is called at the exact moment a state is entered. Typically called just after end for the...
virtual QString state() const =0
State name for debugging.
virtual void setPixmap(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QPixmap &pixmap, const QString &curveSelected)=0
Update the image for this state, after the leaf class processes it appropriately.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
QImage image() const
Image for the current state.
virtual void updateColorFilter(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QString &curveSelected)=0
Apply color filter settings.
virtual void fitInView(GraphicsView &view)=0
Zoom so background fills the window.
Context class that manages the background image state machine.