blob: 5e48d4c32f32dcff522c64856a537c176aa07115 (
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
33
|
#ifndef TIME_CHART_PAGE_H
#define TIME_CHART_PAGE_H
#include <QtWidgets>
#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<QDateTime> getDates(const CardPack* pack) const = 0;
virtual int getDataDirection() const = 0;
QWidget* createChart();
private:
int getStudyPeriodLength(const QList<QDateTime>& dates) const;
int getReviewsNum(const QList<QDateTime>& dates, int period) const;
private:
TimeChart* chart;
};
#endif
|