qabstractseries.h
98 lines
| 2.6 KiB
| text/x-c
|
CLexer
/ src / qabstractseries.h
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
Miikka Heikkinen
|
r2432 | ** Copyright (C) 2013 Digia Plc | ||
Jani Honkonen
|
r794 | ** 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$ | ||||
** | ||||
****************************************************************************/ | ||||
Tero Ahola
|
r988 | #ifndef QABSTRACTSERIES_H | ||
#define QABSTRACTSERIES_H | ||||
Michal Klocek
|
r23 | |||
Jani Honkonen
|
r697 | #include <qchartglobal.h> | ||
Michal Klocek
|
r1588 | #include <qabstractaxis.h> | ||
Michal Klocek
|
r23 | #include <QObject> | ||
sauimone
|
r380 | #include <QPen> | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r988 | class QAbstractSeriesPrivate; | ||
Michal Klocek
|
r1062 | class QChart; | ||
Michal Klocek
|
r938 | |||
Tero Ahola
|
r988 | class QTCOMMERCIALCHART_EXPORT QAbstractSeries : public QObject | ||
Michal Klocek
|
r23 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
Tero Ahola
|
r1328 | Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) | ||
Tero Ahola
|
r1342 | Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) | ||
Tero Ahola
|
r2067 | Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) | ||
Tero Ahola
|
r1462 | Q_PROPERTY(SeriesType type READ type) | ||
Michal Klocek
|
r1107 | Q_ENUMS(SeriesType) | ||
Tero Ahola
|
r884 | |||
Michal Klocek
|
r23 | public: | ||
Michal Klocek
|
r1107 | enum SeriesType { | ||
Tero Ahola
|
r120 | SeriesTypeLine, | ||
Tero Ahola
|
r309 | SeriesTypeArea, | ||
sauimone
|
r56 | SeriesTypeBar, | ||
sauimone
|
r94 | SeriesTypeStackedBar, | ||
sauimone
|
r101 | SeriesTypePercentBar, | ||
Tero Ahola
|
r51 | SeriesTypePie, | ||
Tero Ahola
|
r309 | SeriesTypeScatter, | ||
sauimone
|
r1672 | SeriesTypeSpline, | ||
sauimone
|
r1687 | SeriesTypeHorizontalBar, | ||
sauimone
|
r1686 | SeriesTypeHorizontalStackedBar, | ||
Mika Salmela
|
r2470 | SeriesTypeHorizontalPercentBar, | ||
SeriesTypeBoxPlot | ||||
Tero Ahola
|
r30 | }; | ||
Michal Klocek
|
r23 | |||
protected: | ||||
Tero Ahola
|
r988 | QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent = 0); | ||
Michal Klocek
|
r23 | |||
public: | ||||
Tero Ahola
|
r988 | ~QAbstractSeries(); | ||
Michal Klocek
|
r1107 | virtual SeriesType type() const = 0; | ||
Michal Klocek
|
r1588 | |||
Jani Honkonen
|
r2104 | void setName(const QString &name); | ||
Michal Klocek
|
r938 | QString name() const; | ||
Tero Ahola
|
r1342 | void setVisible(bool visible = true); | ||
bool isVisible() const; | ||||
Tero Ahola
|
r2067 | qreal opacity() const; | ||
void setOpacity(qreal opacity); | ||||
Jani Honkonen
|
r2104 | QChart *chart() const; | ||
Jani Honkonen
|
r405 | |||
Michal Klocek
|
r2273 | bool attachAxis(QAbstractAxis* axis); | ||
bool detachAxis(QAbstractAxis* axis); | ||||
QList<QAbstractAxis*> attachedAxes(); | ||||
Michal Klocek
|
r1552 | void show(); | ||
void hide(); | ||||
Tero Ahola
|
r1328 | Q_SIGNALS: | ||
void nameChanged(); | ||||
Tero Ahola
|
r1342 | void visibleChanged(); | ||
Tero Ahola
|
r2067 | void opacityChanged(); | ||
Tero Ahola
|
r1328 | |||
Marek Rosa
|
r597 | protected: | ||
Tero Ahola
|
r988 | QScopedPointer<QAbstractSeriesPrivate> d_ptr; | ||
Michal Klocek
|
r943 | friend class ChartDataSet; | ||
friend class ChartPresenter; | ||||
Michal Klocek
|
r2273 | friend class ChartThemeManager; | ||
Michal Klocek
|
r950 | friend class QLegendPrivate; | ||
Tero Ahola
|
r1813 | friend class DeclarativeChart; | ||
Michal Klocek
|
r23 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r23 | |||
Jani Honkonen
|
r2046 | #endif // QABSTRACTSERIES_H | ||