qchartwidget.h
40 lines
| 1.0 KiB
| text/x-c
|
CLexer
/ src / qchartwidget.h
Tero Ahola
|
r19 | #ifndef QCHARTWIDGET_H | ||
#define QCHARTWIDGET_H | ||||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Tero Ahola
|
r19 | #include "qchart.h" | ||
Tero Ahola
|
r55 | #include <QGraphicsView> | ||
Tero Ahola
|
r19 | |||
Michal Klocek
|
r53 | class QGraphicsScene; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Tero Ahola
|
r19 | |||
Michal Klocek
|
r21 | class QChartSeries; | ||
Tero Ahola
|
r19 | class QChartWidgetPrivate; | ||
Tero Ahola
|
r55 | class QTCOMMERCIALCHART_EXPORT QChartWidget : public QGraphicsView | ||
Tero Ahola
|
r19 | { | ||
Q_OBJECT | ||||
public: | ||||
explicit QChartWidget(QWidget *parent = 0); | ||||
~QChartWidget(); | ||||
Michal Klocek
|
r21 | //implement from QWidget | ||
void resizeEvent(QResizeEvent *event); | ||||
Tero Ahola
|
r29 | QSize sizeHint() const; | ||
Tero Ahola
|
r19 | |||
Tero Ahola
|
r42 | // TODO: addSeries and createSeries are optional solutions | ||
sauimone
|
r56 | // TODO: currently createSeries assumes x, y value pairs. This isn't case with all charts. So is there another createSeries for other types (for example one list of ints)? | ||
Michal Klocek
|
r21 | void addSeries(QChartSeries* series); | ||
Tero Ahola
|
r42 | QChartSeries* createSeries(QList<qreal> x, QList<qreal> y, QChartSeries::QChartSeriesType type); | ||
Tero Ahola
|
r19 | |||
private: | ||||
Q_DISABLE_COPY(QChartWidget) | ||||
Michal Klocek
|
r53 | QGraphicsScene *m_scene; | ||
QChart* m_chart; | ||||
Michal Klocek
|
r21 | |||
Tero Ahola
|
r19 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Tero Ahola
|
r19 | |||
#endif // QCHARTWIDGET_H | ||||