Mercurial > minori
diff include/gui/dialog/settings.h @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 01 Apr 2024 02:43:44 -0400 |
parents | 4d461ef7d424 |
children | 3ec7804abf17 |
line wrap: on
line diff
--- a/include/gui/dialog/settings.h Sun Feb 18 16:02:14 2024 -0500 +++ b/include/gui/dialog/settings.h Mon Apr 01 02:43:44 2024 -0400 @@ -5,9 +5,9 @@ #include "core/config.h" #include "core/session.h" #include <QDialog> -#include <QWidget> +#include <QListWidget> #include <QLocale> -#include <QListWidget> +#include <QWidget> class QLabel; class QTabWidget; @@ -31,110 +31,110 @@ }; class SettingsPage : public QWidget { - Q_OBJECT + Q_OBJECT - public: - SettingsPage(QWidget* parent = nullptr, QString title = ""); - void SetTitle(QString title); - virtual void SaveInfo() = 0; - void AddTab(QWidget* tab, QString title = ""); +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; +private: + QLabel* page_title; + QTabWidget* tab_widget; }; class SettingsPageServices final : public SettingsPage { - Q_OBJECT + Q_OBJECT - public: - SettingsPageServices(QWidget* parent = nullptr); - void SaveInfo() override; +public: + SettingsPageServices(QWidget* parent = nullptr); + void SaveInfo() override; - private: - QWidget* CreateMainPage(); - QWidget* CreateAniListPage(); +private: + QWidget* CreateMainPage(); + QWidget* CreateAniListPage(); - decltype(session.config.service) service; + decltype(session.config.service) service; }; class SettingsPageApplication final : public SettingsPage { - Q_OBJECT + Q_OBJECT - public: - SettingsPageApplication(QWidget* parent = nullptr); - void SaveInfo() override; +public: + SettingsPageApplication(QWidget* parent = nullptr); + void SaveInfo() override; - private: - QWidget* CreateAnimeListWidget(); - QWidget* CreateGeneralWidget(); +private: + QWidget* CreateAnimeListWidget(); + QWidget* CreateGeneralWidget(); - Themes theme; - QLocale locale; + Themes theme; + QLocale locale; - decltype(session.config.anime_list.score_format) format; - decltype(session.config.anime_list.language) language; - decltype(session.config.anime_list.display_aired_episodes) display_aired_episodes; - decltype(session.config.anime_list.display_available_episodes) display_available_episodes; - decltype(session.config.anime_list.highlight_anime_if_available) highlight_anime_if_available; - decltype(session.config.anime_list.highlighted_anime_above_others) highlighted_anime_above_others; + decltype(session.config.anime_list.score_format) format; + decltype(session.config.anime_list.language) language; + decltype(session.config.anime_list.display_aired_episodes) display_aired_episodes; + decltype(session.config.anime_list.display_available_episodes) display_available_episodes; + decltype(session.config.anime_list.highlight_anime_if_available) highlight_anime_if_available; + decltype(session.config.anime_list.highlighted_anime_above_others) highlighted_anime_above_others; }; class SettingsPageTorrents final : public SettingsPage { - Q_OBJECT + Q_OBJECT - public: - SettingsPageTorrents(QWidget* parent = nullptr); - void SaveInfo() override; +public: + SettingsPageTorrents(QWidget* parent = nullptr); + void SaveInfo() override; - private: - QWidget* CreateGeneralWidget(); +private: + QWidget* CreateGeneralWidget(); - decltype(session.config.torrents.feed_link) feed_link; + decltype(session.config.torrents.feed_link) feed_link; }; class SettingsPageRecognition final : public SettingsPage { - Q_OBJECT + Q_OBJECT - public: - SettingsPageRecognition(QWidget* parent = nullptr); - void SaveInfo() override; +public: + SettingsPageRecognition(QWidget* parent = nullptr); + void SaveInfo() override; - private: - QWidget* CreatePlayersWidget(); +private: + QWidget* CreatePlayersWidget(); - decltype(session.config.recognition.detect_media_players) detect_media_players; - decltype(session.config.recognition.players) players; + decltype(session.config.recognition.detect_media_players) detect_media_players; + decltype(session.config.recognition.players) players; }; class SettingsPageLibrary final : public SettingsPage { - Q_OBJECT + Q_OBJECT - public: - SettingsPageLibrary(QWidget* parent = nullptr); - void SaveInfo() override; +public: + SettingsPageLibrary(QWidget* parent = nullptr); + void SaveInfo() override; - private: - QWidget* CreateFoldersWidget(); +private: + QWidget* CreateFoldersWidget(); - decltype(session.config.library.paths) paths; - decltype(session.config.library.real_time_monitor) real_time_monitor; + decltype(session.config.library.paths) paths; + decltype(session.config.library.real_time_monitor) real_time_monitor; }; class SettingsDialog final : public QDialog { - Q_OBJECT + Q_OBJECT - public: - SettingsDialog(QWidget* parent = nullptr); - QWidget* CreateServicesMainPage(QWidget* parent); - void OnOK(); +public: + SettingsDialog(QWidget* parent = nullptr); + QWidget* CreateServicesMainPage(QWidget* parent); + void OnOK(); - protected: - void showEvent(QShowEvent* event) override; +protected: + void showEvent(QShowEvent* event) override; - private: - SideBar* sidebar; - QStackedWidget* stacked; +private: + SideBar* sidebar; + QStackedWidget* stacked; }; #endif // __gui__dialog__settings_h