comparison include/gui/dialog/settings.h @ 108:2004b41d4a59

*: huge commit 1. WORKING LOCALIZATION + translation for Spanish and British English 2. idk like 2 changes for the dark theme :)
author Paper <mrpapersonic@gmail.com>
date Sun, 05 Nov 2023 23:31:49 -0500
parents c537996cf67b
children 254b1d2b7096
comparison
equal deleted inserted replaced
107:49c8d1976869 108:2004b41d4a59
3 3
4 #include "core/anime.h" 4 #include "core/anime.h"
5 #include "core/config.h" 5 #include "core/config.h"
6 #include <QDialog> 6 #include <QDialog>
7 #include <QWidget> 7 #include <QWidget>
8 #include <QLocale>
8 9
9 class QLabel; 10 class QLabel;
10 class QTabWidget; 11 class QTabWidget;
11 class QStackedWidget; 12 class QStackedWidget;
12 class SideBar; 13 class SideBar;
24 QLabel* page_title; 25 QLabel* page_title;
25 QTabWidget* tab_widget; 26 QTabWidget* tab_widget;
26 }; 27 };
27 28
28 class SettingsPageServices final : public SettingsPage { 29 class SettingsPageServices final : public SettingsPage {
30 Q_OBJECT
31
29 public: 32 public:
30 SettingsPageServices(QWidget* parent = nullptr); 33 SettingsPageServices(QWidget* parent = nullptr);
31 void SaveInfo() override; 34 void SaveInfo() override;
32 35
33 private: 36 private:
36 QString username; 39 QString username;
37 Anime::Services service; 40 Anime::Services service;
38 }; 41 };
39 42
40 class SettingsPageApplication final : public SettingsPage { 43 class SettingsPageApplication final : public SettingsPage {
44 Q_OBJECT
45
41 public: 46 public:
42 SettingsPageApplication(QWidget* parent = nullptr); 47 SettingsPageApplication(QWidget* parent = nullptr);
43 void SaveInfo() override; 48 void SaveInfo() override;
44 49
45 private: 50 private:
46 QWidget* CreateAnimeListWidget(); 51 QWidget* CreateAnimeListWidget();
47 Themes theme; 52 Themes theme;
53 QLocale locale;
48 Anime::TitleLanguage language; 54 Anime::TitleLanguage language;
49 bool display_aired_episodes; 55 bool display_aired_episodes;
50 bool display_available_episodes; 56 bool display_available_episodes;
51 bool highlight_anime_if_available; 57 bool highlight_anime_if_available;
52 bool highlighted_anime_above_others; 58 bool highlighted_anime_above_others;
58 public: 64 public:
59 SettingsDialog(QWidget* parent = nullptr); 65 SettingsDialog(QWidget* parent = nullptr);
60 QWidget* CreateServicesMainPage(QWidget* parent); 66 QWidget* CreateServicesMainPage(QWidget* parent);
61 void OnOK(); 67 void OnOK();
62 68
69 protected:
70 void showEvent(QShowEvent* event) override;
71
63 private: 72 private:
64 SideBar* sidebar; 73 SideBar* sidebar;
65 QStackedWidget* stacked; 74 QStackedWidget* stacked;
66 }; 75 };
67 76