##// END OF EJS Templates
Use light outline color instead of dark for bar, area and scatter
Use light outline color instead of dark for bar, area and scatter

File last commit:

r618:249071e508d1
r653:f4e416c6727f
Show More
qpieslice.h
88 lines | 2.0 KiB | text/x-c | CLexer
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #ifndef QPIESLICE_H
#define QPIESLICE_H
#include <qchartglobal.h>
#include <QObject>
#include <QPen>
#include <QBrush>
#include <QFont>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 class QPieSeries;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
class QTCOMMERCIALCHART_EXPORT QPieSlice : public QObject
{
Q_OBJECT
Jani Honkonen
Add documentation to pie
r314 Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY changed)
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
public:
QPieSlice(QObject *parent = 0);
Jani Honkonen
Add documentation to pie
r314 QPieSlice(qreal value, QString label, 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 ~QPieSlice();
// data
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setValue(qreal value);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 qreal value() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setLabel(QString label);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QString label() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setLabelVisible(bool visible);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool isLabelVisible() const;
Jani Honkonen
Added a pie chart customization example and refactoring the pie interface.
r437 void setExploded(bool exploded);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 bool isExploded() const;
// generated data
qreal percentage() const;
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 qreal startAngle() const;
qreal endAngle() const;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
// customization
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 void setSlicePen(const QPen &pen);
QPen slicePen() const;
void setSliceBrush(const QBrush &brush);
QBrush sliceBrush() const;
void setLabelArmPen(const QPen &pen);
QPen labelArmPen() const;
void setLabelFont(const QFont &font);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QFont labelFont() const;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 void setLabelArmLengthFactor(qreal factor);
qreal labelArmLengthFactor() const;
Jani Honkonen
Add animations to pie. Works but has some visual issues when adding slices.
r618 void setExplodeDistanceFactor(qreal factor);
qreal explodeDistanceFactor() const;
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 Q_SIGNALS:
void clicked();
void hoverEnter();
void hoverLeave();
void changed();
private:
// TODO: use private class
friend class QPieSeries;
Jani Honkonen
Rename piepresenter -> piechartitem
r568 friend class PieChartItem;
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 friend class PieSlice;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
// data
qreal m_value;
QString m_label;
bool m_isLabelVisible;
bool m_isExploded;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_explodeDistanceFactor;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
// generated data
qreal m_percentage;
Jani Honkonen
QPieSlice: angle() -> startAngle(), angleSpan() -> endAngle()
r355 qreal m_startAngle;
Jani Honkonen
Make pie fit better inside its given rectangle. Label texts still go outside. Needs a bit more work...
r289 qreal m_angleSpan;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
// customization
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 QPen m_slicePen;
QBrush m_sliceBrush;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QFont m_labelFont;
Jani Honkonen
Renaming pen & brush functions for pie and adding const
r469 QPen m_labelArmPen;
Jani Honkonen
Introducing vertical and horizontal factors to control the position of the pie.
r454 qreal m_labelArmLengthFactor;
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QPIESLICE_H