43 view.fitInView (
imageItem ().boundingRect());
46 void BackgroundStateCurve::processImageFromSavedInputs (
bool isGnuplot,
50 const QString &curveSelected)
55 if (!curveSelected.isEmpty()) {
59 QPixmap pixmapFiltered = filterImage.
filter (isGnuplot,
60 m_pixmapOriginal.toImage(),
80 const QString &curveSelected)
83 <<
" curve=" << curveSelected.toLatin1().data();
87 processImageFromSavedInputs (isGnuplot,
98 const QPixmap &pixmapOriginal,
99 const QString &curveSelected)
103 m_pixmapOriginal = pixmapOriginal;
104 processImageFromSavedInputs (isGnuplot,
113 return "BackgroundStateCurve";
120 const QString &curveSelected)
124 processImageFromSavedInputs (isGnuplot,
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
QPixmap filter(bool isGnuplot, const QImage &imageUnfiltered, const Transformation &transformation, const QString &curveSelected, const DocumentModelColorFilter &modelColorFilter, const DocumentModelGridRemoval &modelGridRemoval) const
Filter original unfiltered image into filtered pixmap.
#define LOG4CPP_INFO_S(logger)
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.
virtual QString state() const
State name for debugging.
BackgroundStateCurve(BackgroundStateContext &context, GraphicsScene &scene)
Single constructor.
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...
Background image state machine state base class.
virtual void updateColorFilter(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &colorFilter, const QString &curveSelected)
Apply color filter settings.
virtual void fitInView(GraphicsView &view)
Zoom so background fills the window.
Filters an image using a combination of color filtering and grid removal.
log4cpp::Category * mainCat
virtual void setCurveSelected(bool isGnuplot, 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...
Add point and line handling to generic QGraphicsScene.
virtual void setPixmap(bool isGnuplot, const Transformation &transformation, const DocumentModelGridRemoval &modelGridRemoval, const DocumentModelColorFilter &modelColorFilter, const QPixmap &pixmapOriginal, const QString &curveSelected)
Update the image for this state, after the leaf class processes it appropriately. ...
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...