Mercurial > minori
comparison include/gui/window.h @ 202:71832ffe425a
animia: re-add kvm fd source
this is all being merged from my wildly out-of-date laptop. SORRY!
in other news, I edited the CI file to install the wayland client
as well, so the linux CI build might finally get wayland stuff.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 02 Jan 2024 06:05:06 -0500 |
parents | c8375765f0fc |
children | 4d461ef7d424 |
comparison
equal
deleted
inserted
replaced
201:8f6f8dd2eb23 | 202:71832ffe425a |
---|---|
8 any file that #includes this to have to #include | 8 any file that #includes this to have to #include |
9 these as well due to unique_ptr */ | 9 these as well due to unique_ptr */ |
10 #include <QWidget> | 10 #include <QWidget> |
11 #include <QStackedWidget> | 11 #include <QStackedWidget> |
12 #include <QCloseEvent> | 12 #include <QCloseEvent> |
13 #include <QThread> | |
13 #include "gui/widgets/sidebar.h" | 14 #include "gui/widgets/sidebar.h" |
15 | |
16 Q_DECLARE_METATYPE(std::vector<std::string>); | |
17 | |
18 class PlayingThread : public QThread { | |
19 Q_OBJECT | |
20 | |
21 public: | |
22 PlayingThread(QObject* object = nullptr) : QThread(object) {} | |
23 | |
24 private: | |
25 void run() override; | |
26 | |
27 signals: | |
28 void Done(const std::vector<std::string>& files); | |
29 }; | |
14 | 30 |
15 class MainWindow final : public QMainWindow { | 31 class MainWindow final : public QMainWindow { |
16 Q_OBJECT | 32 Q_OBJECT |
17 | 33 |
18 public: | 34 public: |
28 | 44 |
29 private: | 45 private: |
30 std::unique_ptr<QWidget> main_widget = nullptr; | 46 std::unique_ptr<QWidget> main_widget = nullptr; |
31 std::unique_ptr<QStackedWidget> stack = nullptr; | 47 std::unique_ptr<QStackedWidget> stack = nullptr; |
32 std::unique_ptr<SideBar> sidebar = nullptr; | 48 std::unique_ptr<SideBar> sidebar = nullptr; |
49 | |
50 std::unique_ptr<PlayingThread> thread = nullptr; | |
33 }; | 51 }; |
34 | 52 |
35 #endif // __window_h | 53 #endif // __window_h |