Mercurial > minori
comparison include/gui/dialog/information.h @ 368:6d37a998cf91
gui/dialog: consolidate win32 dark theme cruft into a single class
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 25 Jul 2025 10:05:23 -0400 |
| parents | 91ac90a34003 |
| children |
comparison
equal
deleted
inserted
replaced
| 367:8d45d892be88 | 368:6d37a998cf91 |
|---|---|
| 1 #ifndef MINORI_GUI_DIALOG_INFORMATION_H_ | 1 #ifndef MINORI_GUI_DIALOG_INFORMATION_H_ |
| 2 #define MINORI_GUI_DIALOG_INFORMATION_H_ | 2 #define MINORI_GUI_DIALOG_INFORMATION_H_ |
| 3 | 3 |
| 4 #include "core/anime.h" | 4 #include "core/anime.h" |
| 5 #include "core/date.h" | 5 #include "core/date.h" |
| 6 #include <QDialog> | 6 #include "gui/dialog/dialog.h" |
| 7 #include <functional> | 7 #include <functional> |
| 8 | 8 |
| 9 class InformationDialog final : public QDialog { | 9 class InformationDialog final : public Dialog { |
| 10 Q_OBJECT | 10 Q_OBJECT |
| 11 | 11 |
| 12 public: | 12 public: |
| 13 enum Pages { | 13 enum Pages { |
| 14 PAGE_MAIN_INFO, | 14 PAGE_MAIN_INFO, |
| 15 PAGE_MY_LIST | 15 PAGE_MY_LIST |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 /* weird, the page should be first | |
| 19 * also this should take an anime ID, rather than a pointer --paper */ | |
| 18 InformationDialog(Anime::Anime* anime, std::function<void(Anime::Anime*)> accept = {}, enum Pages page = Pages::PAGE_MAIN_INFO, | 20 InformationDialog(Anime::Anime* anime, std::function<void(Anime::Anime*)> accept = {}, enum Pages page = Pages::PAGE_MAIN_INFO, |
| 19 QWidget* parent = nullptr); | 21 QWidget* parent = nullptr); |
| 20 | |
| 21 protected: | |
| 22 void showEvent(QShowEvent* event) override; | |
| 23 | 22 |
| 24 private: | 23 private: |
| 25 void SaveData(Anime::Anime* anime); | 24 void SaveData(Anime::Anime* anime); |
| 26 unsigned int _progress; | 25 unsigned int _progress; |
| 27 unsigned int _score; | 26 unsigned int _score; |
