##// END OF EJS Templates
integrating bar charts to test app.. crashes for now
integrating bar charts to test app.. crashes for now

File last commit:

r163:daab1c215b03
r164:8e580b305fe6
Show More
piepresenter.h
43 lines | 1010 B | text/x-c | CLexer
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 #ifndef PIEPRESENTER_H
#define PIEPRESENTER_H
Jani Honkonen
Pie chart refactoring
r142
#include "chartitem_p.h"
#include "qpieseries.h"
class QGraphicsItem;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class PieSlice;
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 class PiePresenter : public QObject, public ChartItem
Jani Honkonen
Pie chart refactoring
r142 {
Q_OBJECT
public:
// TODO: use a generic data class instead of x and y
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 PiePresenter(QGraphicsItem *parent, QPieSeries *series);
~PiePresenter();
Jani Honkonen
Pie chart refactoring
r142
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 public: // from QGraphicsItem
Jani Honkonen
Pie chart refactoring
r142 QRectF boundingRect() const { return m_rect; }
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {}
public:
QRectF pieRect() const { return m_pieRect; }
public Q_SLOTS:
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 void handleSeriesChanged(const PieChangeSet& changeSet);
Jani Honkonen
Pie chart refactoring
r142 void handleDomainChanged(const Domain& domain);
void handleGeometryChanged(const QRectF& rect);
Jani Honkonen
Make pie work better with chartwidgettest
r163 void updateGeometry();
Jani Honkonen
Pie chart refactoring
r142
private:
friend class PieSlice;
QList<PieSlice*> m_slices;
QPieSeries *m_pieSeries;
QRectF m_rect;
QRectF m_pieRect;
};
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 #endif // PIEPRESENTER_H