qseries.h
66 lines
| 1.7 KiB
| text/x-c
|
CLexer
/ src / qseries.h
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$ | ||||
** | ||||
****************************************************************************/ | ||||
Michal Klocek
|
r360 | #ifndef QSERIES_H | ||
#define QSERIES_H | ||||
Michal Klocek
|
r23 | |||
Jani Honkonen
|
r697 | #include <qchartglobal.h> | ||
Michal Klocek
|
r23 | #include <QObject> | ||
sauimone
|
r71 | #include <QAbstractItemModel> | ||
sauimone
|
r380 | #include <QPen> | ||
Michal Klocek
|
r23 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r23 | |||
Michal Klocek
|
r360 | class QTCOMMERCIALCHART_EXPORT QSeries : public QObject | ||
Michal Klocek
|
r23 | { | ||
sauimone
|
r71 | Q_OBJECT | ||
Michal Klocek
|
r23 | public: | ||
Michal Klocek
|
r360 | enum QSeriesType { | ||
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, | ||
SeriesTypeSpline | ||||
Tero Ahola
|
r30 | }; | ||
Michal Klocek
|
r23 | |||
protected: | ||||
Jani Honkonen
|
r823 | QSeries(QObject *parent = 0) : QObject(parent) {m_model = 0;} | ||
Michal Klocek
|
r23 | |||
public: | ||||
Michal Klocek
|
r360 | virtual ~QSeries() {} | ||
virtual QSeriesType type() const = 0; | ||||
Tero Ahola
|
r309 | // TODO | ||
sauimone
|
r175 | virtual bool setModel(QAbstractItemModel* /*model*/) { return false; } | ||
Tero Ahola
|
r731 | void setName(QString name) { m_name = name; } | ||
sauimone
|
r777 | QString name() const { return m_name; } | ||
Jani Honkonen
|
r405 | |||
Marek Rosa
|
r597 | protected: | ||
QAbstractItemModel* m_model; | ||||
Jani Honkonen
|
r405 | private: | ||
Tero Ahola
|
r731 | QString m_name; | ||
Michal Klocek
|
r23 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r23 | |||
#endif | ||||