pieslice.h
32 lines
| 701 B
| text/x-c
|
CLexer
/ src / pieslice.h
Tero Ahola
|
r51 | #ifndef PIESLICE_H | ||
#define PIESLICE_H | ||||
#include "qchartglobal.h" | ||||
#include <QGraphicsItem> | ||||
#include <QRectF> | ||||
#include <QColor> | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class PieSlice : public QGraphicsItem | ||||
{ | ||||
public: | ||||
Tero Ahola
|
r60 | PieSlice(const QColor& color, qreal startAngle, qreal span, QRectF rect); | ||
Tero Ahola
|
r51 | ~PieSlice(); | ||
public: // from QGraphicsItem | ||||
QRectF boundingRect() const; | ||||
QPainterPath shape() const; | ||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); | ||||
void hoverEnterEvent(QGraphicsSceneHoverEvent * event); | ||||
Tero Ahola
|
r60 | public: | ||
Tero Ahola
|
r51 | QColor m_color; | ||
qreal m_startAngle; | ||||
qreal m_span; | ||||
Tero Ahola
|
r60 | QRectF m_rect; | ||
Tero Ahola
|
r51 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // PIESLICE_H | ||||