Mercurial > minori
view include/gui/dialog/settings.h @ 83:d02fdf1d6708
*: huuuge update
1. make the now playing page function correctly
2. de-constructorfy many of our custom widgets,
allowing them to be changed on-the-fly from
the Now Playing page
3. ... :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 24 Oct 2023 22:01:02 -0400 |
parents | 27a19dd6cba1 |
children | c69230dc2b5d |
line wrap: on
line source
#ifndef __gui__dialog__settings_h #define __gui__dialog__settings_h #include "core/anime.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 : public SettingsPage { public: SettingsPageServices(QWidget* parent = nullptr); void SaveInfo() override; private: QWidget* CreateMainPage(); QWidget* CreateAniListPage(); QString username; Anime::Services service; }; class SettingsPageApplication : public SettingsPage { public: SettingsPageApplication(QWidget* parent = nullptr); void SaveInfo() override; private: QWidget* CreateAnimeListWidget(); Anime::TitleLanguage language; bool display_aired_episodes; bool display_available_episodes; bool highlight_anime_if_available; bool highlighted_anime_above_others; }; class SettingsDialog : 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