Mercurial > minori
annotate include/gui/pages/statistics.h @ 118:39521c47c7a3
*: another huge megacommit, SORRY
The torrents page works a lot better now
Added the edit option to the anime list right click menu
Vectorized currently playing files
Available player and extensions are now loaded at runtime
 from files in (dotpath)/players.json and (dotpath)/extensions.json
 These paths are not permanent and will likely be moved to
 (dotpath)/recognition
...
...
...
| author | Paper <mrpapersonic@gmail.com> | 
|---|---|
| date | Tue, 07 Nov 2023 23:40:54 -0500 | 
| parents | bd68e4393e6f | 
| children | c130f47f6f48 | 
| rev | line source | 
|---|---|
| 9 | 1 #ifndef __gui__pages__statistics_h | 
| 2 #define __gui__pages__statistics_h | |
| 85 | 3 | 
| 9 | 4 #include <QFrame> | 
| 5 #include <QWidget> | |
| 96 
bd68e4393e6f
statistics: forward declare Graph
 Paper <mrpapersonic@gmail.com> parents: 
95diff
changeset | 6 | 
| 
bd68e4393e6f
statistics: forward declare Graph
 Paper <mrpapersonic@gmail.com> parents: 
95diff
changeset | 7 template<typename T> | 
| 
bd68e4393e6f
statistics: forward declare Graph
 Paper <mrpapersonic@gmail.com> parents: 
95diff
changeset | 8 class Graph; | 
| 9 | 9 | 
| 64 | 10 namespace TextWidgets { | 
| 93 | 11 class LabelledSection; | 
| 64 | 12 } | 
| 13 | |
| 95 
8043152ef9d4
include: set classes as final where appropriate
 Paper <mrpapersonic@gmail.com> parents: 
93diff
changeset | 14 class StatisticsPage final : public QFrame { | 
| 9 | 15 Q_OBJECT | 
| 16 | |
| 17 public: | |
| 64 | 18 StatisticsPage(QWidget* parent = nullptr); | 
| 9 | 19 void UpdateStatistics(); | 
| 20 | |
| 21 protected: | |
| 22 void showEvent(QShowEvent*) override; | |
| 23 | |
| 24 private: | |
| 25 std::string MinutesToDateString(int minutes); | |
| 26 std::string SecondsToDateString(int seconds); | |
| 27 | |
| 93 | 28 std::shared_ptr<TextWidgets::LabelledSection> _anime_list; | 
| 29 std::shared_ptr<Graph<int>> _score_distribution_graph; | |
| 30 std::shared_ptr<TextWidgets::LabelledSection> _application; | |
| 9 | 31 }; | 
| 85 | 32 | 
| 9 | 33 #endif // __gui__pages__statistics_h | 
