summaryrefslogtreecommitdiff
path: root/src/charts/Chart.h
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/charts/Chart.h
Initial mirror commitHEADmaster
Diffstat (limited to 'src/charts/Chart.h')
-rw-r--r--src/charts/Chart.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/charts/Chart.h b/src/charts/Chart.h
new file mode 100644
index 0000000..a613b06
--- /dev/null
+++ b/src/charts/Chart.h
@@ -0,0 +1,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