Engauge Digitizer  2
BackgroundStateUnloaded.cpp
1 #include "BackgroundStateContext.h"
2 #include "BackgroundStateUnloaded.h"
3 #include "DocumentModelColorFilter.h"
4 #include "DocumentModelGridRemoval.h"
5 #include "GraphicsScene.h"
6 #include "GraphicsView.h"
7 #include "Logger.h"
8 #include <QPixmap>
9 
11  GraphicsScene &scene) :
13  scene)
14 {
15 }
16 
18 {
19  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::begin";
20 }
21 
23 {
24  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::end";
25 }
26 
28 {
29  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::fitInView";
30 }
31 
32 void BackgroundStateUnloaded::setCurveSelected (const Transformation & /* transformation */,
33  const DocumentModelGridRemoval & /* modelGridRemoval */,
34  const DocumentModelColorFilter & /* modelColorFilter */,
35  const QString & /* curveSelected */)
36 {
37  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setCurveSelected";
38 }
39 
40 void BackgroundStateUnloaded::setPixmap (const Transformation & /* transformation */,
41  const DocumentModelGridRemoval & /* modelGridRemoval */,
42  const DocumentModelColorFilter & /* modelColorFilter */,
43  const QPixmap & /* pixmap */)
44 {
45  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setPixmap";
46 
47  // This state has no displayed image
48 }
49 
51 {
52  return "BackgroundStateUnloaded";
53 }
54 
56  const DocumentModelGridRemoval & /* modelGridRemoval */,
57  const DocumentModelColorFilter & /* modelColorFilter */)
58 {
59  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::updateColorFilter";
60 }
virtual void fitInView(GraphicsView &view)
Zoom so background fills the window.
BackgroundStateUnloaded(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...
Affine transformation between screen and graph coordinates, based on digitized axis points...
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...
Definition: GraphicsView.h:13
Background image state machine state base class.
virtual QString state() const
State name for debugging.
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 void updateColorFilter(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter)
Apply color filter settings.
Add point and line handling to generic QGraphicsScene.
Definition: GraphicsScene.h:25
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
virtual void setCurveSelected(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Update the currently selected curve name.