summaryrefslogtreecommitdiff
path: root/src/statistics/BaseStatPage.h
blob: 7ef91bd9fef7c045fea17ca003ab4be7cc8a8118 (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
#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