Mercurial > minori
comparison include/gui/dialog/settings.h @ 9:5c0397762b53
INCOMPLETE: megacommit :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 10 Sep 2023 03:59:16 -0400 |
parents | src/include/settings.h@07a9095eaeed |
children | d0adc4aedfc8 |
comparison
equal
deleted
inserted
replaced
8:b1f73678ef61 | 9:5c0397762b53 |
---|---|
1 #ifndef __gui__dialog__settings_h | |
2 #define __gui__dialog__settings_h | |
3 #include "core/anime.h" | |
4 #include "gui/sidebar.h" | |
5 #include <QComboBox> | |
6 #include <QDialog> | |
7 #include <QHBoxLayout> | |
8 #include <QLabel> | |
9 #include <QLineEdit> | |
10 #include <QTabWidget> | |
11 #include <QWidget> | |
12 | |
13 class SettingsPage : public QWidget { | |
14 Q_OBJECT | |
15 | |
16 public: | |
17 SettingsPage(QWidget* parent = nullptr, QString title = ""); | |
18 void SetTitle(QString title); | |
19 virtual void SaveInfo(); | |
20 void AddTab(QWidget* tab, QString title = ""); | |
21 | |
22 private: | |
23 QLabel* page_title; | |
24 QTabWidget* tab_widget; | |
25 }; | |
26 | |
27 class SettingsPageServices : public SettingsPage { | |
28 public: | |
29 SettingsPageServices(QWidget* parent = nullptr); | |
30 void SaveInfo() override; | |
31 | |
32 private: | |
33 QWidget* CreateMainPage(); | |
34 QWidget* CreateAniListPage(); | |
35 QString username; | |
36 Anime::Services service; | |
37 }; | |
38 | |
39 class SettingsPageApplication : public SettingsPage { | |
40 public: | |
41 SettingsPageApplication(QWidget* parent = nullptr); | |
42 void SaveInfo() override; | |
43 | |
44 private: | |
45 QWidget* CreateAnimeListWidget(); | |
46 Anime::TitleLanguage language; | |
47 bool display_aired_episodes; | |
48 bool display_available_episodes; | |
49 bool highlight_anime_if_available; | |
50 bool highlighted_anime_above_others; | |
51 }; | |
52 | |
53 class SettingsDialog : public QDialog { | |
54 Q_OBJECT | |
55 | |
56 public: | |
57 SettingsDialog(QWidget* parent = nullptr); | |
58 QWidget* CreateServicesMainPage(QWidget* parent); | |
59 void OnOK(); | |
60 | |
61 private: | |
62 QHBoxLayout* layout; | |
63 SideBar* sidebar; | |
64 }; | |
65 #endif // __gui__dialog__settings_h |