7#ifndef BACKGROUND_STATE_CONTEXT_H
8#define BACKGROUND_STATE_CONTEXT_H
10#include "BackgroundImage.h"
11#include "BackgroundStateAbstractBase.h"
18class QGraphicsPixmapItem;
58 const QString &curveSelected);
64 const QPixmap &pixmapOriginal);
74 void completeRequestedStateTransitionIfExists ();
78 QVector<BackgroundStateAbstractBase*> m_states;
79 BackgroundState m_currentState;
80 BackgroundState m_requestedState;
Context class that manages the background image state machine.
void updateColorFilter(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter)
Apply color filter settings.
void setBackgroundImage(BackgroundImage backgroundImage)
Transition to the specified state. This method is used by classes outside of the state machine to tri...
QImage imageForCurveState() const
Image for the Curve state, even if the current state is different.
void fitInView(GraphicsView &view)
Zoom so background fills the window.
void setCurveSelected(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QString &curveSelected)
Update the selected curve.
void close()
Open Document is being closed so remove the background.
void setPixmap(const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QPixmap &pixmapOriginal)
Update the images of all states, rather than just the current state.
void requestStateTransition(BackgroundState backgroundState)
Initiate state transition to be performed later, when BackgroundState is off the stack.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...