##// END OF EJS Templates
Documentation for stacked barchart drilldown example
Documentation for stacked barchart drilldown example

File last commit:

r454:06980850b7dd
r462:9d290192c2c6
Show More
qpieseries.h
134 lines | 3.0 KiB | text/x-c | CLexer
Jani Honkonen
Pie chart refactoring
r142 #ifndef PIESERIES_H
#define PIESERIES_H
Michal Klocek
Rename QChartSeries to QSeries
r360 #include "qseries.h"
Jani Honkonen
Pie chart refactoring
r142 #include <QObject>
#include <QRectF>
#include <QColor>
Jani Honkonen
Refactoring piechart API (and internals)
r174 #include <QPen>
#include <QBrush>
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #include <QSignalMapper>
Jani Honkonen
Pie chart refactoring
r142
class QGraphicsObject;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
Moved pie stuff to own .pri file and rename stuff
r146 class PiePresenter;
Jani Honkonen
Pie chart refactoring
r142 class PieSlice;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 class QPieSlice;
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157
Michal Klocek
Rename QChartSeries to QSeries
r360 class QTCOMMERCIALCHART_EXPORT QPieSeries : public QSeries
Jani Honkonen
Pie chart refactoring
r142 {
Q_OBJECT
public:
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
Jani Honkonen
Refactoring piechart API (and internals)
r174 class ChangeSet
{
public:
Jani Honkonen
Add documentation to pie
r314
// TODO: these should not really be exposed to the public API
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void appendAdded(QPieSlice* slice);
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 void appendAdded(QList<QPieSlice*> slices);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void appendChanged(QPieSlice* slice);
void appendRemoved(QPieSlice* slice);
QList<QPieSlice*> added() const;
QList<QPieSlice*> changed() const;
QList<QPieSlice*> removed() const;
bool isEmpty() const;
private:
QList<QPieSlice*> m_added;
QList<QPieSlice*> m_changed;
QList<QPieSlice*> m_removed;
Jani Honkonen
Refactoring piechart API (and internals)
r174 };
Jani Honkonen
Pie chart refactoring
r142 public:
QPieSeries(QObject *parent = 0);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 virtual ~QPieSeries();
Jani Honkonen
Pie chart refactoring
r142
public: // from QChartSeries
Michal Klocek
Rename QChartSeries to QSeries
r360 QSeriesType type() const;
Jani Honkonen
Pie chart refactoring
r142
public:
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
// slice setters
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void add(QPieSlice* slice);
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void add(QList<QPieSlice*> slices);
void replace(QList<QPieSlice*> slices);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void remove(QPieSlice* slice);
void clear();
Jani Honkonen
Pie chart refactoring
r142
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 // sluce getters
Jani Honkonen
Add documentation to pie
r314 QList<QPieSlice*> slices() const;
Jani Honkonen
Refactoring piechart API (and internals)
r174
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 // calculated data
int count() const;
qreal total() const;
// pie customization
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void setPositionFactors(qreal horizontalFactor, qreal verticalFactor);
qreal horizontalPositionFactor() const;
qreal verticalPositionFactor() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setSizeFactor(qreal sizeFactor);
qreal sizeFactor() const;
void setStartAngle(qreal startAngle);
qreal startAngle() const;
void setEndAngle(qreal endAngle);
qreal endAngle() const;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 // convenience function
QPieSeries& operator << (QPieSlice* slice);
QPieSlice* add(qreal value, QString name);
Jani Honkonen
Review corrections for pie
r386 void setLabelsVisible(bool visible = true);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 // TODO: find slices?
// QList<QPieSlice*> findByValue(qreal value);
// ...
// TODO: sorting slices?
// void sort(QPieSeries::SortByValue|label|??)
// TODO: general graphics customization
// setDrawStyle(2d|3d)
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 // setDropShadows
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 Q_SIGNALS:
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
Jani Honkonen
Refactoring piechart API (and internals)
r174 void changed(const QPieSeries::ChangeSet& changeSet);
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void clicked(QPieSlice* slice);
void hoverEnter(QPieSlice* slice);
void hoverLeave(QPieSlice* slice);
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157 void sizeFactorChanged();
void positionChanged();
Jani Honkonen
Implementing slice label
r181
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 private Q_SLOTS: // TODO: should be private and not visible in the interface at all
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 void sliceChanged();
void sliceClicked();
void sliceHoverEnter();
void sliceHoverLeave();
Jani Honkonen
Refactoring piechart API (and internals)
r174
private:
void updateDerivativeData();
Jani Honkonen
Use signals from pieseries, visible hover and exploding slices
r157
Jani Honkonen
Pie chart refactoring
r142 private:
Q_DISABLE_COPY(QPieSeries)
Jani Honkonen
Refactoring piechart API (and internals)
r174
Jani Honkonen
Pie chart refactoring
r142 // TODO: use PIML
Jani Honkonen
Refactoring piechart API (and internals)
r174 friend class PiePresenter;
friend class PieSlice;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QList<QPieSlice*> m_slices;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_hPositionFactor;
qreal m_vPositionFactor;
qreal m_pieSizeFactor;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 qreal m_pieStartAngle;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 qreal m_pieEndAngle;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_total;
Jani Honkonen
Pie chart refactoring
r142 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // PIESERIES_H