summaryrefslogtreecommitdiff
path: root/src/statistics/BaseStatPage.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/statistics/BaseStatPage.h
Initial mirror commitHEADmaster
Diffstat (limited to 'src/statistics/BaseStatPage.h')
-rw-r--r--src/statistics/BaseStatPage.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/statistics/BaseStatPage.h b/src/statistics/BaseStatPage.h
new file mode 100644
index 0000000..7ef91bd
--- /dev/null
+++ b/src/statistics/BaseStatPage.h
@@ -0,0 +1,31 @@
+#ifndef STATISTICS_PAGE_H
+#define STATISTICS_PAGE_H
+
+#include <QtWidgets>
+
+class StatisticsParams;
+
+class BaseStatPage: public QWidget
+{
+ Q_OBJECT
+public:
+ BaseStatPage(const StatisticsParams* statParams);
+ virtual void updateDataSet() = 0;
+ virtual QString getTitle() const = 0;
+ virtual bool usesTimePeriod() const = 0;
+
+protected:
+ void init();
+ virtual QWidget* createChart() = 0;
+
+private:
+ void createUi();
+ QLabel* createTitleLabel();
+ QWidget* createTotalReviewsLabel();
+
+protected:
+ const StatisticsParams* statParams;
+ QLabel* totalReviewsLabel;
+};
+
+#endif