##// END OF EJS Templates
Fix grid animation to do not go out of bound
Fix grid animation to do not go out of bound

File last commit:

r454:06980850b7dd
r504:142210a64aff
Show More
piepresenter_p.h
48 lines | 1.2 KiB | 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"
Jani Honkonen
Refactoring piechart API (and internals)
r174 #include <QSignalMapper>
Jani Honkonen
Pie chart refactoring
r142
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; }
Jani Honkonen
Refactoring piechart API (and internals)
r174 void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
Jani Honkonen
Pie chart refactoring
r142
public Q_SLOTS:
Jani Honkonen
Refactoring piechart API (and internals)
r174 void handleSeriesChanged(const QPieSeries::ChangeSet& 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
Jani Honkonen
Refactoring piechart API (and internals)
r174 private:
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void addSlice(QPieSlice* sliceData);
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 void updateSlice(QPieSlice* sliceData);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void deleteSlice(QPieSlice* sliceData);
Jani Honkonen
Refactoring piechart API (and internals)
r174
Jani Honkonen
Pie chart refactoring
r142 private:
friend class PieSlice;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QHash<QPieSlice*, PieSlice*> m_slices;
Jani Honkonen
Refactoring piechart API (and internals)
r174 QPieSeries *m_series;
Jani Honkonen
Pie chart refactoring
r142 QRectF m_rect;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 QPointF m_pieCenter;
qreal m_pieRadius;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 QRectF m_debugRect;
Jani Honkonen
Pie chart refactoring
r142 };
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 #endif // PIEPRESENTER_H