33 #ifndef PAINTERGRAPHICSSCENE_H
34 #define PAINTERGRAPHICSSCENE_H
38 #include <QtGui/QGraphicsScene>
39 #include <QtGui/QGraphicsItem>
41 namespace PainterPanel {
42 using namespace Frapper;
69 void setBackground( QImage image )
76 m_background =
new QGraphicsPixmapItem( QPixmap::fromImage(image));
77 m_background->setZValue(-1000.0f);
78 m_background->setFlag( QGraphicsItem::ItemIsSelectable,
false );
80 this->addItem(m_background);
92 void renderToImage( QImage &image )
94 QPainter painter( &image );
96 this->render( &painter, image.rect(), m_background->boundingRect());
98 this->render( &painter, image.rect());
106 Q_FOREACH( QGraphicsItem *item, this->items() ) {
107 if( item != m_background)
121 #endif // PAINTERGRAPHICSSCENE_H