pieslice.h
36 lines
| 850 B
| text/x-c
|
CLexer
Tero Ahola
|
r51 | #ifndef PIESLICE_H | ||
#define PIESLICE_H | ||||
#include "qchartglobal.h" | ||||
Tero Ahola
|
r103 | #include "charttheme_p.h" | ||
Tero Ahola
|
r51 | #include <QGraphicsItem> | ||
#include <QRectF> | ||||
#include <QColor> | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Jani Honkonen
|
r146 | class PiePresenter; | ||
Tero Ahola
|
r51 | |||
class PieSlice : public QGraphicsItem | ||||
{ | ||||
public: | ||||
Jani Honkonen
|
r146 | PieSlice(PiePresenter *piePresentation, int seriesIndex, qreal startAngle, qreal span); | ||
Tero Ahola
|
r51 | ~PieSlice(); | ||
public: // from QGraphicsItem | ||||
QRectF boundingRect() const; | ||||
QPainterPath shape() const; | ||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); | ||||
Jani Honkonen
|
r142 | void hoverEnterEvent(QGraphicsSceneHoverEvent *event); | ||
void mousePressEvent(QGraphicsSceneMouseEvent *event); | ||||
Tero Ahola
|
r51 | |||
Jani Honkonen
|
r142 | private: | ||
int m_seriesIndex; | ||||
Tero Ahola
|
r51 | qreal m_startAngle; | ||
qreal m_span; | ||||
Michal Klocek
|
r143 | QRectF m_rect; | ||
Jani Honkonen
|
r142 | //SeriesTheme m_theme; | ||
Tero Ahola
|
r51 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // PIESLICE_H | ||||