diff include/gui/dialog/settings.h @ 9:5c0397762b53

INCOMPLETE: megacommit :)
author Paper <mrpapersonic@gmail.com>
date Sun, 10 Sep 2023 03:59:16 -0400
parents src/include/settings.h@07a9095eaeed
children d0adc4aedfc8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/gui/dialog/settings.h	Sun Sep 10 03:59:16 2023 -0400
@@ -0,0 +1,65 @@
+#ifndef __gui__dialog__settings_h
+#define __gui__dialog__settings_h
+#include "core/anime.h"
+#include "gui/sidebar.h"
+#include <QComboBox>
+#include <QDialog>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QWidget>
+
+class SettingsPage : public QWidget {
+		Q_OBJECT
+
+	public:
+		SettingsPage(QWidget* parent = nullptr, QString title = "");
+		void SetTitle(QString title);
+		virtual void SaveInfo();
+		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:
+		QHBoxLayout* layout;
+		SideBar* sidebar;
+};
+#endif // __gui__dialog__settings_h
\ No newline at end of file