Mercurial > minori
view include/gui/dialog/settings.h @ 101:c537996cf67b
*: multitude of config changes
1. theme is now configurable from the settings menu
(but you have to restart for it to apply)
2. config is now stored in an INI file, with no method of
conversion from json (this repo is private-ish anyway)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 03 Nov 2023 14:06:02 -0400 |
parents | 8043152ef9d4 |
children | 2004b41d4a59 |
line wrap: on
line source
#ifndef __gui__dialog__settings_h #define __gui__dialog__settings_h #include "core/anime.h" #include "core/config.h" #include <QDialog> #include <QWidget> class QLabel; class QTabWidget; class QStackedWidget; class SideBar; class SettingsPage : public QWidget { Q_OBJECT public: SettingsPage(QWidget* parent = nullptr, QString title = ""); void SetTitle(QString title); virtual void SaveInfo() = 0; void AddTab(QWidget* tab, QString title = ""); private: QLabel* page_title; QTabWidget* tab_widget; }; class SettingsPageServices final : public SettingsPage { public: SettingsPageServices(QWidget* parent = nullptr); void SaveInfo() override; private: QWidget* CreateMainPage(); QWidget* CreateAniListPage(); QString username; Anime::Services service; }; class SettingsPageApplication final : public SettingsPage { public: SettingsPageApplication(QWidget* parent = nullptr); void SaveInfo() override; private: QWidget* CreateAnimeListWidget(); Themes theme; Anime::TitleLanguage language; bool display_aired_episodes; bool display_available_episodes; bool highlight_anime_if_available; bool highlighted_anime_above_others; }; class SettingsDialog final : public QDialog { Q_OBJECT public: SettingsDialog(QWidget* parent = nullptr); QWidget* CreateServicesMainPage(QWidget* parent); void OnOK(); private: SideBar* sidebar; QStackedWidget* stacked; }; #endif // __gui__dialog__settings_h