comparison include/gui/dialog/settings.h @ 232:ff0061e75f0f

theme: add OS detection with glib
author Paper <mrpapersonic@gmail.com>
date Sat, 13 Jan 2024 11:06:16 -0500
parents f784b5b1914c
children 4d461ef7d424
comparison
equal deleted inserted replaced
231:69f4768a820c 232:ff0061e75f0f
35 void SaveInfo() override; 35 void SaveInfo() override;
36 36
37 private: 37 private:
38 QWidget* CreateMainPage(); 38 QWidget* CreateMainPage();
39 QWidget* CreateAniListPage(); 39 QWidget* CreateAniListPage();
40 QString username; 40
41 Anime::Services service; 41 decltype(session.config.service) service;
42 }; 42 };
43 43
44 class SettingsPageApplication final : public SettingsPage { 44 class SettingsPageApplication final : public SettingsPage {
45 Q_OBJECT 45 Q_OBJECT
46 46
49 void SaveInfo() override; 49 void SaveInfo() override;
50 50
51 private: 51 private:
52 QWidget* CreateAnimeListWidget(); 52 QWidget* CreateAnimeListWidget();
53 QWidget* CreateGeneralWidget(); 53 QWidget* CreateGeneralWidget();
54 decltype(session.config.anime_list.score_format) format; 54
55 Themes theme; 55 Themes theme;
56 QLocale locale; 56 QLocale locale;
57 Anime::TitleLanguage language; 57
58 bool display_aired_episodes; 58 decltype(session.config.anime_list.score_format) format;
59 bool display_available_episodes; 59 decltype(session.config.anime_list.language) language;
60 bool highlight_anime_if_available; 60 decltype(session.config.anime_list.display_aired_episodes) display_aired_episodes;
61 bool highlighted_anime_above_others; 61 decltype(session.config.anime_list.display_available_episodes) display_available_episodes;
62 decltype(session.config.anime_list.highlight_anime_if_available) highlight_anime_if_available;
63 decltype(session.config.anime_list.highlighted_anime_above_others) highlighted_anime_above_others;
62 }; 64 };
63 65
64 class SettingsPageTorrents final : public SettingsPage { 66 class SettingsPageTorrents final : public SettingsPage {
65 Q_OBJECT 67 Q_OBJECT
66 68
68 SettingsPageTorrents(QWidget* parent = nullptr); 70 SettingsPageTorrents(QWidget* parent = nullptr);
69 void SaveInfo() override; 71 void SaveInfo() override;
70 72
71 private: 73 private:
72 QWidget* CreateGeneralWidget(); 74 QWidget* CreateGeneralWidget();
75
73 decltype(session.config.torrents.feed_link) feed_link; 76 decltype(session.config.torrents.feed_link) feed_link;
74 }; 77 };
75 78
76 class SettingsPageRecognition final : public SettingsPage { 79 class SettingsPageRecognition final : public SettingsPage {
77 Q_OBJECT 80 Q_OBJECT
80 SettingsPageRecognition(QWidget* parent = nullptr); 83 SettingsPageRecognition(QWidget* parent = nullptr);
81 void SaveInfo() override; 84 void SaveInfo() override;
82 85
83 private: 86 private:
84 QWidget* CreatePlayersWidget(); 87 QWidget* CreatePlayersWidget();
88
85 decltype(session.config.recognition.detect_media_players) detect_media_players; 89 decltype(session.config.recognition.detect_media_players) detect_media_players;
86 decltype(session.config.recognition.players) players; 90 decltype(session.config.recognition.players) players;
87 }; 91 };
88 92
89 class SettingsPageLibrary final : public SettingsPage { 93 class SettingsPageLibrary final : public SettingsPage {
93 SettingsPageLibrary(QWidget* parent = nullptr); 97 SettingsPageLibrary(QWidget* parent = nullptr);
94 void SaveInfo() override; 98 void SaveInfo() override;
95 99
96 private: 100 private:
97 QWidget* CreateFoldersWidget(); 101 QWidget* CreateFoldersWidget();
102
98 decltype(session.config.library.paths) paths; 103 decltype(session.config.library.paths) paths;
99 decltype(session.config.library.real_time_monitor) real_time_monitor; 104 decltype(session.config.library.real_time_monitor) real_time_monitor;
100 }; 105 };
101 106
102 class SettingsDialog final : public QDialog { 107 class SettingsDialog final : public QDialog {