Mercurial > minori
annotate include/gui/pages/now_playing.h @ 337:a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
1: animone now has its own syntax divergent from anisthesia,
making different platforms actually have their own sections
2: process names in animone are now called `comm' (this will
probably break things). this is what its called in bsd/linux
so I'm just going to use it everywhere
3: the X11 code now checks for the existence of a UTF-8 window title
and passes it if available
4: ANYTHING THATS NOT LINUX IS 100% UNTESTED AND CAN AND WILL BREAK!
I still actually need to test the bsd code. to be honest I'm probably
going to move all of the bsds into separate files because they're
all essentially different operating systems at this point
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 19 Jun 2024 12:51:15 -0400 |
parents | 3ec7804abf17 |
children | 6b0768158dcd |
rev | line source |
---|---|
261
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
1 #ifndef MINORI_GUI_PAGES_NOW_PLAYING_H_ |
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
2 #define MINORI_GUI_PAGES_NOW_PLAYING_H_ |
85 | 3 |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
4 #include "gui/widgets/anime_info.h" |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
5 #include "gui/widgets/poster.h" |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
6 #include "gui/widgets/text.h" |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
7 |
64 | 8 #include <QFrame> |
258 | 9 #include <memory> |
80 | 10 #include <unordered_map> |
2 | 11 |
64 | 12 class QStackedWidget; |
85 | 13 |
83 | 14 namespace Anime { |
15 class Anime; | |
16 } | |
64 | 17 |
154 | 18 namespace anitomy { |
19 class Elements; | |
20 } | |
21 | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
22 namespace NowPlayingPages { |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
23 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
24 class Default : public QWidget { |
258 | 25 Q_OBJECT |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
26 |
258 | 27 public: |
28 Default(QWidget* parent = nullptr); | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
29 }; |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
30 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
31 class Playing : public QWidget { |
258 | 32 Q_OBJECT |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
33 |
258 | 34 public: |
35 Playing(QWidget* parent = nullptr); | |
36 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info); | |
37 int GetPlayingAnime(); | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
38 |
258 | 39 private: |
40 int _id = 0; | |
41 int _episode = 0; | |
42 std::unique_ptr<QWidget> _main = nullptr; | |
43 std::unique_ptr<TextWidgets::Title> _title = nullptr; | |
44 std::unique_ptr<AnimeInfoWidget> _info = nullptr; | |
45 std::unique_ptr<QWidget> _sidebar = nullptr; | |
46 std::unique_ptr<Poster> _poster = nullptr; | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
47 }; |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
48 |
258 | 49 } // namespace NowPlayingPages |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
50 |
95
8043152ef9d4
include: set classes as final where appropriate
Paper <mrpapersonic@gmail.com>
parents:
85
diff
changeset
|
51 class NowPlayingPage final : public QFrame { |
258 | 52 Q_OBJECT |
7 | 53 |
258 | 54 public: |
55 NowPlayingPage(QWidget* parent = nullptr); | |
56 void SetDefault(); | |
57 void SetPlaying(const Anime::Anime& anime, const anitomy::Elements& episodes); | |
58 int GetPlayingId(); | |
64 | 59 |
258 | 60 private: |
61 QStackedWidget* stack; | |
2 | 62 }; |
63 | |
261
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
64 #endif // MINORI_GUI_PAGES_NOW_PLAYING_H_ |