17 class SakWidget
: public QObject
, public QGraphicsItem
21 SakWidget(const Task
& task
);
23 void setGeometry(const QRect
&);
24 void setStatistics(double dailyWorked
, double weeklyWorked
, double monthlyWorked
, double dailyPercentage
, double weeklyPercentage
, double monthlyPercentage
);
25 QRectF
boundingRect() const { return m_rect
; }
27 void showDetails(bool show
= true);
29 void clicked(const QString
& taskName
);
30 void clicked(const QString
& taskName
, const QString
& subtaskName
);
32 void keyPressEvent (QKeyEvent
* event
);
33 void mousePressEvent(QGraphicsSceneMouseEvent
* e
);
34 void mouseReleaseEvent(QGraphicsSceneMouseEvent
* e
);
35 void mouseMoveEvent(QGraphicsSceneMouseEvent
* e
);
36 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent
* e
);
37 void timerEvent(QTimerEvent
* e
);
46 QString m_tooltipText
;
48 void drawBasicShape(QPixmap
& p
);
49 void paint ( QPainter
* painter
, const QStyleOptionGraphicsItem
* option
, QWidget
* widget
= 0 );
50 QRectF m_rect
, m_boundingRect
;
51 static QBitmap
* m_mask
;
53 static int m_maxzvalue
;
54 QTextDocument
* m_text
;
55 QPixmap m_cachedPixmap
;
56 QPixmap m_cachedPixmapB
;
58 bool m_redrawCachedPixmap
, m_redrawCachedPixmapB
;
61 // is painting side B??
64 bool m_showingDetails
;
66 double m_dailyWorked
, m_weeklyWorked
, m_monthlyWorked
, m_dailyPercentage
, m_weeklyPercentage
, m_monthlyPercentage
;