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/StatisticsView.h | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/statistics/StatisticsView.h (limited to 'src/statistics/StatisticsView.h') diff --git a/src/statistics/StatisticsView.h b/src/statistics/StatisticsView.h new file mode 100644 index 0000000..560f8b8 --- /dev/null +++ b/src/statistics/StatisticsView.h @@ -0,0 +1,53 @@ +#ifndef STATISTICS_VIEW_H +#define STATISTICS_VIEW_H + +#include +#include + +#include "StatisticsParams.h" + +class Dictionary; +class CardPack; + +class StatisticsView: public QDialog, public StatisticsParams +{ + Q_OBJECT +public: + StatisticsView(const Dictionary* dict); + +private: + static QList> getPeriodsList(); + +private: + void init(); + void closeEvent(QCloseEvent *event); + void createPages(); + void createContentsList(); + void createListItems(); + void createUi(); + void loadSettings(); + void saveSettings(); + QBoxLayout* createControlLayout(); + QComboBox* createPacksBox(); + QComboBox* createPeriodBox(); + void updateChart(); + void updatePeriodBox(); + +private slots: + void changePage(QListWidgetItem* curPage, QListWidgetItem* prevPage); + void setPack(int packIndex); + void setPeriod(int index); + +private: + static const QSize GridSize; + static const int IconSize = 75; + +private: + const Dictionary* dict; + QListWidget* contentsWidget; + QLabel* periodLabel; + QComboBox* periodBox; + QStackedWidget* pagesWidget; +}; + +#endif -- cgit