qpieseries_p.h
45 lines
| 1.2 KiB
| text/x-c
|
CLexer
/ src / qpieseries_p.h
Tero Ahola
|
r103 | #ifndef PIESERIESPRIVATE_H | ||
#define PIESERIESPRIVATE_H | ||||
Tero Ahola
|
r108 | #include "chartitem_p.h" | ||
#include "charttheme_p.h" | ||||
Tero Ahola
|
r103 | #include "qpieseries.h" | ||
#include <QRectF> | ||||
#include <QColor> | ||||
class QGraphicsItem; | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class PieSlice; | ||||
Tero Ahola
|
r108 | class QPieSeriesPrivate : public ChartItem, public ChartThemeObserver | ||
Tero Ahola
|
r103 | { | ||
public: | ||||
// TODO: use a generic data class instead of x and y | ||||
Tero Ahola
|
r108 | QPieSeriesPrivate(QGraphicsItem *parent); | ||
Tero Ahola
|
r103 | ~QPieSeriesPrivate(); | ||
Tero Ahola
|
r108 | public: // from ChartItem | ||
Michal Klocek
|
r115 | void setSize(const QSizeF &size); | ||
Tero Ahola
|
r103 | void setPlotDomain(const PlotDomain& data); | ||
Tero Ahola
|
r108 | // This is a dummy QGraphicsItem; dummy implementation | ||
QRectF boundingRect() const { return parentItem()->boundingRect(); } | ||||
// This is a dummy QGraphicsItem; no implementation | ||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {} | ||||
public: // from ChartThemeObserver | ||||
void themeChanged(ChartTheme *theme); | ||||
Tero Ahola
|
r103 | |||
public: | ||||
bool setData(QList<qreal> data); | ||||
void resizeSlices(QRectF rect); | ||||
QList<qreal> m_data; | ||||
QList<PieSlice*> m_slices; | ||||
QRectF m_chartSize; | ||||
qreal m_sizeFactor; | ||||
QPieSeries::PiePosition m_position; | ||||
ChartTheme *m_chartTheme; | ||||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // PIESERIESPRIVATE_H | ||||