1 #ifndef SAKMESSAGEITEM_H_
2 #define SAKMESSAGEITEM_H_
6 class SakMessageItem
: public QObject
, public QGraphicsItem
9 SakMessageItem(const QString
& message
, const QPixmap
& p
);
11 //void setPixmap(const QPixmap &p);
13 void setGeometry(const QRect
&);
14 QRectF
boundingRect() const { return m_rect
; }
15 void paint( QPainter
* painter
, const QStyleOptionGraphicsItem
* option
, QWidget
* widget
= 0 );
17 QGraphicsPixmapItem
* m_p
;
19 QPixmap m_cachedPixmap
;
23 class SakExitItem
: public QObject
, public QGraphicsPixmapItem
27 SakExitItem(const QPixmap
&p
) : QGraphicsPixmapItem(p
) {}
31 void mousePressEvent ( QGraphicsSceneMouseEvent
* ) {}
32 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent
*) { emit
exit(); };