Engauge Digitizer 2
Loading...
Searching...
No Matches
BackgroundStateUnloaded.cpp
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
7#include "BackgroundStateContext.h"
8#include "BackgroundStateUnloaded.h"
9#include "DocumentModelColorFilter.h"
10#include "DocumentModelGridRemoval.h"
11#include "GraphicsScene.h"
12#include "GraphicsView.h"
13#include "Logger.h"
14#include <QPixmap>
15
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
39 const DocumentModelGridRemoval & /* modelGridRemoval */,
40 const DocumentModelColorFilter & /* modelColorFilter */,
41 const QString & /* curveSelected */)
42{
43 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setCurveSelected";
44}
45
46void BackgroundStateUnloaded::setPixmap (const Transformation & /* transformation */,
47 const DocumentModelGridRemoval & /* modelGridRemoval */,
48 const DocumentModelColorFilter & /* modelColorFilter */,
49 const QPixmap & /* pixmap */)
50{
51 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::setPixmap";
52
53 // This state has no displayed image
54}
55
57{
58 return "BackgroundStateUnloaded";
59}
60
62 const DocumentModelGridRemoval & /* modelGridRemoval */,
63 const DocumentModelColorFilter & /* modelColorFilter */)
64{
65 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateUnloaded::updateColorFilter";
66}
Background image state machine state base class.
Context class that manages the background image state machine.
virtual void updateColorFilter(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter)
Apply color filter settings.
virtual void fitInView(GraphicsView &view)
Zoom so background fills the window.
virtual void setCurveSelected(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Update the currently selected curve name.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
virtual QString state() const
State name for debugging.
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
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.
BackgroundStateUnloaded(BackgroundStateContext &context, GraphicsScene &scene)
Single constructor.
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...
Affine transformation between screen and graph coordinates, based on digitized axis points.