7#include "BackgroundStateContext.h"
8#include "BackgroundStateNone.h"
9#include "DocumentModelColorFilter.h"
10#include "DocumentModelGridRemoval.h"
11#include "GraphicsScene.h"
12#include "GraphicsView.h"
25 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::begin";
32 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::end";
39 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::fitInView";
41 view.fitInView (
imageItem ().boundingRect());
49 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::setCurveSelected";
55 const QPixmap &pixmapOriginal)
57 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::setPixmap";
60 QPixmap pixmapNone (pixmapOriginal);
61 pixmapNone.fill (Qt::white);
68 return "BackgroundStateNone";
75 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateNone::updateColorFilter";
Background image state machine state base class.
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.
Context class that manages the background image state machine.
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
virtual void setCurveSelected(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Update the currently selected curve name.
virtual void setPixmap(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QPixmap &pixmap)
Update the image for this state, after the leaf class processes it appropriately.
virtual QString state() const
State name for debugging.
virtual void updateColorFilter(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter)
Apply color filter settings.
BackgroundStateNone(BackgroundStateContext &context, GraphicsScene &scene)
Single constructor.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
virtual void fitInView(GraphicsView &view)
Zoom so background fills the window.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
Add point and line handling to generic QGraphicsScene.
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...