diff include/gui/window.h @ 291:9a88e1725fd2

*: refactor lots of stuff I forgot to put this into different commits, oops! anyway, it doesn't really matter *that* much since this is an unfinished hobby project anyway. once it starts getting stable commit history will be more important, but for now it's not that big of a deal
author Paper <paper@paper.us.eu.org>
date Sun, 12 May 2024 16:31:07 -0400
parents f31305b9f60a
children 34347fd2a2de
line wrap: on
line diff
--- a/include/gui/window.h	Wed May 08 17:32:28 2024 -0400
+++ b/include/gui/window.h	Sun May 12 16:31:07 2024 -0400
@@ -1,22 +1,31 @@
 #ifndef MINORI_WINDOW_H_
 #define MINORI_WINDOW_H_
+
 #include "core/config.h"
-#include <QMainWindow>
-#include <memory>
+#include "gui/widgets/sidebar.h"
 
-/* *could* be forward-declared, but this causes
-   any file that #includes this to have to #include
-   these as well due to unique_ptr */
-#include "gui/widgets/sidebar.h"
+/* pages; these should really be in a namespace */
+#include "gui/pages/anime_list.h"
+#include "gui/pages/history.h"
+#include "gui/pages/now_playing.h"
+#include "gui/pages/search.h"
+#include "gui/pages/seasons.h"
+#include "gui/pages/statistics.h"
+#include "gui/pages/torrents.h"
+
+#include <QMainWindow>
 #include <QCloseEvent>
 #include <QStackedWidget>
 #include <QThread>
 #include <QTimer>
 #include <QWidget>
 
+#include <memory>
+
 class QMenu;
 class AnimeListPage;
 
+/* ... :) */
 Q_DECLARE_METATYPE(std::vector<std::string>);
 
 class MainWindowPlayingThread final : public QThread {
@@ -80,6 +89,14 @@
 	QStackedWidget stack_;
 	SideBar sidebar_;
 
+	AnimeListPage anime_list_page_;
+	HistoryPage history_page_;
+	NowPlayingPage now_playing_page_;
+	SearchPage search_page_;
+	SeasonsPage seasons_page_;
+	StatisticsPage statistics_page_;
+	TorrentsPage torrents_page_;
+
 	MainWindowPlayingThread playing_thread_;
 	QTimer playing_thread_timer_;