1 #ifndef BACKGROUND_STATE_ABSTRACT_BASE_H
2 #define BACKGROUND_STATE_ABSTRACT_BASE_H
4 #include <QGraphicsPixmapItem>
9 BACKGROUND_STATE_CURVE,
10 BACKGROUND_STATE_NONE,
11 BACKGROUND_STATE_ORIGINAL,
12 BACKGROUND_STATE_UNLOADED,
33 virtual void begin() = 0;
42 virtual void end() = 0;
48 QImage
image ()
const;
63 const QString &curveSelected) = 0;
69 const QPixmap &pixmap) = 0;
72 virtual QString
state()
const = 0;
95 QGraphicsPixmapItem *m_imageItem;
100 #endif // BACKGROUND_STATE_ABSTRACT_BASE_H
QImage image() const
Image for the current state.
virtual void updateColorFilter(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter)=0
Apply color filter settings.
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
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.
virtual void fitInView(GraphicsView &view)=0
Zoom so background fills the window.
BackgroundStateContext & context()
Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses...
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 void begin()=0
Method that is called at the exact moment a state is entered. Typically called just after end for the...
virtual void end()=0
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Context class that manages the background image state machine.
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Background image state machine state base class.
virtual QString state() const =0
State name for debugging.
virtual void setCurveSelected(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)=0
Update the currently selected curve name.
Add point and line handling to generic QGraphicsScene.
GraphicsScene & scene()
Reference to the GraphicsScene, without const.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...