qabstractseries.h
77 lines
| 2.0 KiB
| text/x-c
|
CLexer
/ src / qabstractseries.h
|
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$ | ||||
** | ||||
****************************************************************************/ | ||||
|
r988 | #ifndef QABSTRACTSERIES_H | ||
#define QABSTRACTSERIES_H | ||||
|
r23 | |||
|
r697 | #include <qchartglobal.h> | ||
|
r23 | #include <QObject> | ||
|
r380 | #include <QPen> | ||
|
r23 | |||
|
r862 | class QAbstractItemModel; | ||
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r23 | |||
|
r988 | class QAbstractSeriesPrivate; | ||
|
r1062 | class QChart; | ||
|
r938 | |||
|
r988 | class QTCOMMERCIALCHART_EXPORT QAbstractSeries : public QObject | ||
|
r23 | { | ||
|
r71 | Q_OBJECT | ||
|
r884 | Q_PROPERTY(QString name READ name WRITE setName) | ||
|
r938 | Q_ENUMS(QSeriesType) | ||
|
r884 | |||
|
r23 | public: | ||
|
r360 | enum QSeriesType { | ||
|
r120 | SeriesTypeLine, | ||
|
r309 | SeriesTypeArea, | ||
|
r56 | SeriesTypeBar, | ||
|
r94 | SeriesTypeStackedBar, | ||
|
r101 | SeriesTypePercentBar, | ||
|
r51 | SeriesTypePie, | ||
|
r309 | SeriesTypeScatter, | ||
SeriesTypeSpline | ||||
|
r30 | }; | ||
|
r23 | |||
protected: | ||||
|
r988 | QAbstractSeries(QAbstractSeriesPrivate &d, QObject *parent = 0); | ||
|
r23 | |||
public: | ||||
|
r988 | ~QAbstractSeries(); | ||
|
r360 | virtual QSeriesType type() const = 0; | ||
|
r938 | virtual bool setModel(QAbstractItemModel* model) = 0; | ||
QAbstractItemModel* model() const; | ||||
|
r1054 | int mapFirst() const; | ||
int mapCount() const; | ||||
|
r1055 | int mapOrientation() const; | ||
|
r938 | void setName(const QString& name); | ||
QString name() const; | ||||
|
r1062 | QChart* chart() const; | ||
|
r405 | |||
|
r597 | protected: | ||
|
r988 | QScopedPointer<QAbstractSeriesPrivate> d_ptr; | ||
|
r943 | friend class ChartDataSet; | ||
friend class ChartPresenter; | ||||
|
r950 | friend class QLegendPrivate; | ||
|
r23 | }; | ||
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r23 | |||
#endif | ||||