Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
290:9347e2eaf6e5 | 291:9a88e1725fd2 |
---|---|
1 #ifndef MINORI_WINDOW_H_ | 1 #ifndef MINORI_WINDOW_H_ |
2 #define MINORI_WINDOW_H_ | 2 #define MINORI_WINDOW_H_ |
3 | |
3 #include "core/config.h" | 4 #include "core/config.h" |
5 #include "gui/widgets/sidebar.h" | |
6 | |
7 /* pages; these should really be in a namespace */ | |
8 #include "gui/pages/anime_list.h" | |
9 #include "gui/pages/history.h" | |
10 #include "gui/pages/now_playing.h" | |
11 #include "gui/pages/search.h" | |
12 #include "gui/pages/seasons.h" | |
13 #include "gui/pages/statistics.h" | |
14 #include "gui/pages/torrents.h" | |
15 | |
4 #include <QMainWindow> | 16 #include <QMainWindow> |
5 #include <memory> | |
6 | |
7 /* *could* be forward-declared, but this causes | |
8 any file that #includes this to have to #include | |
9 these as well due to unique_ptr */ | |
10 #include "gui/widgets/sidebar.h" | |
11 #include <QCloseEvent> | 17 #include <QCloseEvent> |
12 #include <QStackedWidget> | 18 #include <QStackedWidget> |
13 #include <QThread> | 19 #include <QThread> |
14 #include <QTimer> | 20 #include <QTimer> |
15 #include <QWidget> | 21 #include <QWidget> |
16 | 22 |
23 #include <memory> | |
24 | |
17 class QMenu; | 25 class QMenu; |
18 class AnimeListPage; | 26 class AnimeListPage; |
19 | 27 |
28 /* ... :) */ | |
20 Q_DECLARE_METATYPE(std::vector<std::string>); | 29 Q_DECLARE_METATYPE(std::vector<std::string>); |
21 | 30 |
22 class MainWindowPlayingThread final : public QThread { | 31 class MainWindowPlayingThread final : public QThread { |
23 Q_OBJECT | 32 Q_OBJECT |
24 | 33 |
78 private: | 87 private: |
79 QWidget main_widget_; | 88 QWidget main_widget_; |
80 QStackedWidget stack_; | 89 QStackedWidget stack_; |
81 SideBar sidebar_; | 90 SideBar sidebar_; |
82 | 91 |
92 AnimeListPage anime_list_page_; | |
93 HistoryPage history_page_; | |
94 NowPlayingPage now_playing_page_; | |
95 SearchPage search_page_; | |
96 SeasonsPage seasons_page_; | |
97 StatisticsPage statistics_page_; | |
98 TorrentsPage torrents_page_; | |
99 | |
83 MainWindowPlayingThread playing_thread_; | 100 MainWindowPlayingThread playing_thread_; |
84 QTimer playing_thread_timer_; | 101 QTimer playing_thread_timer_; |
85 | 102 |
86 MainWindowAsyncSynchronizeThread async_synchronize_thread_; | 103 MainWindowAsyncSynchronizeThread async_synchronize_thread_; |
87 | 104 |