From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/statistics/TimeChartPage.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/statistics/TimeChartPage.h (limited to 'src/statistics/TimeChartPage.h') diff --git a/src/statistics/TimeChartPage.h b/src/statistics/TimeChartPage.h new file mode 100644 index 0000000..5e48d4c --- /dev/null +++ b/src/statistics/TimeChartPage.h @@ -0,0 +1,33 @@ +#ifndef TIME_CHART_PAGE_H +#define TIME_CHART_PAGE_H + +#include +#include "BaseStatPage.h" +#include "../charts/DataPoint.h" + +class TimeChart; +class StatisticsParams; +class CardPack; + +class TimeChartPage: public BaseStatPage +{ + Q_OBJECT +public: + TimeChartPage(const StatisticsParams* statParams); + void updateDataSet(); + bool usesTimePeriod() const {return true;} + +protected: + virtual QList getDates(const CardPack* pack) const = 0; + virtual int getDataDirection() const = 0; + QWidget* createChart(); + +private: + int getStudyPeriodLength(const QList& dates) const; + int getReviewsNum(const QList& dates, int period) const; + +private: + TimeChart* chart; +}; + +#endif -- cgit