Engauge Digitizer  2
BackgroundStateUnloaded.cpp
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
11 #include "GraphicsScene.h"
12 #include "GraphicsView.h"
13 #include "Logger.h"
14 #include <QPixmap>
15 
17  GraphicsScene &scene) :
19  scene)
20 {
21 }
22 
24 {
25  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::begin";
26 }
27 
29 {
30  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::end";
31 }
32 
34 {
35  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::fitInView";
36 }
37 
38 void BackgroundStateUnloaded::setCurveSelected (bool /* isGnuplot */,
39  const Transformation & /* transformation */,
40  const DocumentModelGridRemoval & /* modelGridRemoval */,
41  const DocumentModelColorFilter & /* modelColorFilter */,
42  const QString & /* curveSelected */)
43 {
44  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setCurveSelected";
45 }
46 
47 void BackgroundStateUnloaded::setPixmap (bool /* isGnuplot */,
48  const Transformation & /* transformation */,
49  const DocumentModelGridRemoval & /* modelGridRemoval */,
50  const DocumentModelColorFilter & /* modelColorFilter */,
51  const QPixmap & /* pixmap */,
52  const QString & /* curveSelected */)
53 {
54  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setPixmap";
55 
56  // This state has no displayed image
57 }
58 
59 QString BackgroundStateUnloaded::state () const
60 {
61  return "BackgroundStateUnloaded";
62 }
63 
64 void BackgroundStateUnloaded::updateColorFilter (bool /* isGnuplot */,
65  const Transformation & /* transformation */,
66  const DocumentModelGridRemoval & /* modelGridRemoval */,
67  const DocumentModelColorFilter & /* modelColorFilter */,
68  const QString & /* curveSelected */)
69 {
70  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::updateColorFilter";
71 }
DocumentModelGridRemoval.h
BackgroundStateUnloaded::setPixmap
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.
Definition: BackgroundStateUnloaded.cpp:46
BackgroundStateUnloaded::setCurveSelected
virtual void setCurveSelected(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Update the currently selected curve name.
Definition: BackgroundStateUnloaded.cpp:37
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition: Transformation.h:30
BackgroundStateUnloaded.h
DocumentModelColorFilter
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Definition: DocumentModelColorFilter.h:20
BackgroundStateAbstractBase
Background image state machine state base class.
Definition: BackgroundStateAbstractBase.h:29
GraphicsView
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Definition: GraphicsView.h:19
BackgroundStateUnloaded::fitInView
virtual void fitInView(GraphicsView &view)
Zoom so background fills the window.
Definition: BackgroundStateUnloaded.cpp:32
BackgroundStateUnloaded::BackgroundStateUnloaded
BackgroundStateUnloaded(BackgroundStateContext &context, GraphicsScene &scene)
Single constructor.
Definition: BackgroundStateUnloaded.cpp:15
BackgroundStateUnloaded::end
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Definition: BackgroundStateUnloaded.cpp:27
Logger.h
BackgroundStateUnloaded::begin
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
Definition: BackgroundStateUnloaded.cpp:22
BackgroundStateContext.h
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
GraphicsScene
Add point and line handling to generic QGraphicsScene.
Definition: GraphicsScene.h:35
BackgroundStateUnloaded::updateColorFilter
virtual void updateColorFilter(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Apply color filter settings.
Definition: BackgroundStateUnloaded.cpp:63
mainCat
log4cpp::Category * mainCat
Definition: Logger.cpp:14
GraphicsScene.h
BackgroundStateUnloaded::state
virtual QString state() const
State name for debugging.
Definition: BackgroundStateUnloaded.cpp:58
DocumentModelGridRemoval
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
Definition: DocumentModelGridRemoval.h:16
DocumentModelColorFilter.h
BackgroundStateContext
Context class that manages the background image state machine.
Definition: BackgroundStateContext.h:31
GraphicsView.h