view 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
line wrap: on
line source

#ifndef __gui__pages__statistics_h
#define __gui__pages__statistics_h

#include <QFrame>
#include <QWidget>

template<typename T>
class Graph;

namespace TextWidgets {
class LabelledSection;
}

class StatisticsPage final : public QFrame {
		Q_OBJECT

	public:
		StatisticsPage(QWidget* parent = nullptr);
		void UpdateStatistics();

	protected:
		void showEvent(QShowEvent*) override;

	private:
		std::string MinutesToDateString(int minutes);
		std::string SecondsToDateString(int seconds);

		std::shared_ptr<TextWidgets::LabelledSection> _anime_list;
		std::shared_ptr<Graph<int>> _score_distribution_graph;
		std::shared_ptr<TextWidgets::LabelledSection> _application;
};

#endif // __gui__pages__statistics_h