qpieseries.h
107 lines
| 3.2 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
Jani Honkonen
|
r142 | #ifndef PIESERIES_H | ||
#define PIESERIES_H | ||||
Tero Ahola
|
r988 | #include <qabstractseries.h> | ||
Marek Rosa
|
r1712 | #include <QPieSlice> | ||
Jani Honkonen
|
r142 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Jani Honkonen
|
r669 | class QPieSeriesPrivate; | ||
Marek Rosa
|
r1712 | //class QPieSlice; | ||
Jani Honkonen
|
r157 | |||
Tero Ahola
|
r988 | class QTCOMMERCIALCHART_EXPORT QPieSeries : public QAbstractSeries | ||
Jani Honkonen
|
r142 | { | ||
Q_OBJECT | ||||
Tero Ahola
|
r1482 | Q_PROPERTY(qreal horizontalPosition READ horizontalPosition WRITE setHorizontalPosition) | ||
Q_PROPERTY(qreal verticalPosition READ verticalPosition WRITE setVerticalPosition) | ||||
Q_PROPERTY(qreal size READ pieSize WRITE setPieSize) | ||||
Q_PROPERTY(qreal startAngle READ pieStartAngle WRITE setPieStartAngle) | ||||
Q_PROPERTY(qreal endAngle READ pieEndAngle WRITE setPieEndAngle) | ||||
Jani Honkonen
|
r1255 | Q_PROPERTY(int count READ count NOTIFY countChanged) | ||
Q_PROPERTY(qreal sum READ sum NOTIFY sumChanged) | ||||
Marek Rosa
|
r1731 | Q_PROPERTY(qreal donutInnerSize READ donutInnerSize WRITE setDonutInnerSize) | ||
Q_PROPERTY(bool donut READ donut WRITE setDonut) | ||||
Jani Honkonen
|
r142 | |||
public: | ||||
Michal Klocek
|
r970 | explicit QPieSeries(QObject *parent = 0); | ||
Jani Honkonen
|
r203 | virtual ~QPieSeries(); | ||
Jani Honkonen
|
r142 | |||
Michal Klocek
|
r1107 | QAbstractSeries::SeriesType type() const; | ||
Jani Honkonen
|
r142 | |||
Jani Honkonen
|
r1104 | bool append(QPieSlice* slice); | ||
bool append(QList<QPieSlice*> slices); | ||||
Jani Honkonen
|
r1009 | QPieSeries& operator << (QPieSlice* slice); | ||
Jani Honkonen
|
r1206 | QPieSlice* append(QString label, qreal value); | ||
Jani Honkonen
|
r1255 | |||
Jani Honkonen
|
r1104 | bool insert(int index, QPieSlice* slice); | ||
Jani Honkonen
|
r1255 | |||
Jani Honkonen
|
r1104 | bool remove(QPieSlice* slice); | ||
Jani Honkonen
|
r1798 | bool take(QPieSlice* slice); | ||
Jani Honkonen
|
r203 | void clear(); | ||
Jani Honkonen
|
r142 | |||
Jani Honkonen
|
r314 | QList<QPieSlice*> slices() const; | ||
Jani Honkonen
|
r437 | int count() const; | ||
Jani Honkonen
|
r1255 | |||
Jani Honkonen
|
r621 | bool isEmpty() const; | ||
Jani Honkonen
|
r1009 | |||
Jani Honkonen
|
r939 | qreal sum() const; | ||
Jani Honkonen
|
r437 | |||
Marek Rosa
|
r1670 | void setDonut(bool donut = true); | ||
bool donut() const; | ||||
Marek Rosa
|
r1671 | void setDonutInnerSize(qreal innerSize); | ||
qreal donutInnerSize() const; | ||||
Tero Ahola
|
r884 | void setHorizontalPosition(qreal relativePosition); | ||
qreal horizontalPosition() const; | ||||
Jani Honkonen
|
r1255 | |||
Tero Ahola
|
r884 | void setVerticalPosition(qreal relativePosition); | ||
qreal verticalPosition() const; | ||||
Jani Honkonen
|
r1009 | |||
Jani Honkonen
|
r498 | void setPieSize(qreal relativeSize); | ||
qreal pieSize() const; | ||||
Jani Honkonen
|
r1009 | |||
Jani Honkonen
|
r498 | void setPieStartAngle(qreal startAngle); | ||
qreal pieStartAngle() const; | ||||
Jani Honkonen
|
r1255 | |||
Jani Honkonen
|
r498 | void setPieEndAngle(qreal endAngle); | ||
qreal pieEndAngle() const; | ||||
Jani Honkonen
|
r203 | |||
Jani Honkonen
|
r386 | void setLabelsVisible(bool visible = true); | ||
Marek Rosa
|
r1712 | void setLabelsPosition(QPieSlice::LabelPosition position); | ||
Jani Honkonen
|
r203 | |||
Jani Honkonen
|
r157 | Q_SIGNALS: | ||
Jani Honkonen
|
r1213 | void added(QList<QPieSlice*> slices); | ||
void removed(QList<QPieSlice*> slices); | ||||
Jani Honkonen
|
r1009 | void clicked(QPieSlice* slice); | ||
void hovered(QPieSlice* slice, bool state); | ||||
Jani Honkonen
|
r1255 | void countChanged(); | ||
void sumChanged(); | ||||
Jani Honkonen
|
r181 | |||
Jani Honkonen
|
r174 | private: | ||
Jani Honkonen
|
r669 | Q_DECLARE_PRIVATE(QPieSeries) | ||
Q_DISABLE_COPY(QPieSeries) | ||||
Jani Honkonen
|
r142 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // PIESERIES_H | ||||