blob: a613b069f67662400da8d9287fb7b54f54602c34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef CHART_H
#define CHART_H
#include <QtCore>
#include <QtWidgets>
#include "DataPoint.h"
class ChartView;
class ChartScene;
class Chart: public QWidget
{
public:
Chart();
void setLabels(const QString& xLabel, const QString& yLabel)
{ this->xLabel = xLabel; this->yLabel = yLabel; }
QString getXLabel() const { return xLabel; }
QString getYLabel() const { return yLabel; }
void setDataSet(const QList<DataPoint>& dataSet);
private:
void createChartView();
protected:
ChartScene* scene;
ChartView* view;
QString xLabel;
QString yLabel;
};
#endif
|