1 #include "BackgroundStateAbstractBase.h"
3 #include "EngaugeAssert.h"
4 #include "GraphicsItemType.h"
5 #include "GraphicsScene.h"
16 m_imageItem = m_scene.addPixmap (dummy);
17 m_imageItem->setVisible (
false);
18 m_imageItem->setData (DATA_KEY_IDENTIFIER,
"view");
19 m_imageItem->setData (DATA_KEY_GRAPHICS_ITEM_TYPE, GRAPHICS_ITEM_TYPE_IMAGE);
22 BackgroundStateAbstractBase::~BackgroundStateAbstractBase()
58 m_imageItem->setVisible (visible);
63 LOG4CPP_INFO_S ((*mainCat)) <<
"BackgroundStateAbstractBase::setProcessedPixmap"
64 <<
" map=(" << pixmap.width() <<
"x" << pixmap.height() <<
")";
66 ENGAUGE_CHECK_PTR (m_imageItem);
68 m_imageItem->setPixmap (pixmap);
71 m_scene.setSceneRect (m_imageItem->boundingRect ());
73 m_image = pixmap.toImage();
QImage image() const
Image for the current state.
QGraphicsPixmapItem & imageItem() const
Graphics image item for the current state.
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.
BackgroundStateAbstractBase(BackgroundStateContext &context, GraphicsScene &scene)
Single constructor.
BackgroundStateContext & context()
Reference to the BackgroundStateContext that contains all the BackgroundStateAbstractBase subclasses...
Context class that manages the background image state machine.
Add point and line handling to generic QGraphicsScene.
GraphicsScene & scene()
Reference to the GraphicsScene, without const.