Mercurial > minori
comparison src/include/statistics.h @ 7:07a9095eaeed
Update
Refactored some code, moved some around
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Thu, 24 Aug 2023 23:11:38 -0400 |
| parents | 23d0d9319a00 |
| children | b1f73678ef61 |
comparison
equal
deleted
inserted
replaced
| 6:1d82f6e04d7d | 7:07a9095eaeed |
|---|---|
| 1 #ifndef __statistics_h | 1 #ifndef __statistics_h |
| 2 #define __statistics_h | 2 #define __statistics_h |
| 3 class Statistics; | 3 #include <QWidget> |
| 4 #include <QFrame> | |
| 5 #include <QPlainTextEdit> | |
| 6 #include "anime_list.h" | |
| 4 | 7 |
| 5 class StatisticsTimer : public wxTimer { | 8 class StatisticsWidget : public QFrame { |
| 6 public: | 9 public: |
| 7 StatisticsTimer(Statistics* caller); | 10 StatisticsWidget(AnimeListWidget* listwidget, QWidget* parent = nullptr); |
| 8 virtual void Notify(); | |
| 9 | |
| 10 private: | |
| 11 Statistics* statistics; | |
| 12 }; | |
| 13 | |
| 14 class Statistics { | |
| 15 public: | |
| 16 Statistics(page_t* page, wxPanel* frame); | |
| 17 void UpdateStatistics(); | 11 void UpdateStatistics(); |
| 18 | 12 |
| 19 private: | 13 private: |
| 20 std::string MinutesToDateString(int minutes); | 14 std::string MinutesToDateString(int minutes); |
| 21 | 15 |
| 22 wxPanel* panel; | 16 AnimeListWidget* anime_list; |
| 23 AnimeListPage* anime_list; | 17 QPlainTextEdit* anime_list_data; |
| 24 wxStaticText* anime_list_data; | |
| 25 | 18 |
| 26 wxStaticText* score_distribution_title; | 19 //QPlainTextEdit* score_distribution_title; |
| 27 wxStaticText* score_distribution_labels; | 20 //QPlainTextEdit* score_distribution_labels; |
| 28 //wxStaticText* score_distribution_graph; // how am I gonna do this | 21 //wxStaticText* score_distribution_graph; // how am I gonna do this |
| 29 | 22 |
| 30 /* we don't HAVE a local database (yet ;)) */ | 23 /* we don't HAVE a local database (yet ;)) */ |
| 31 //wxStaticText* local_database_title; | 24 //wxStaticText* local_database_title; |
| 32 //wxStaticText* local_database_labels; | 25 //wxStaticText* local_database_labels; |
| 33 //wxStaticText* local_database_data; | 26 //wxStaticText* local_database_data; |
| 34 | 27 |
| 35 wxStaticText* application_title; | 28 QPlainTextEdit* application_data; |
| 36 wxStaticText* application_labels; | |
| 37 wxStaticText* application_data; | |
| 38 StatisticsTimer* timer; | |
| 39 }; | 29 }; |
| 40 #endif // __statistics_h | 30 #endif // __statistics_h |
