Mercurial > minori
annotate include/gui/pages/now_playing.h @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 01 Apr 2024 02:43:44 -0400 |
| parents | 4d461ef7d424 |
| children | 3ec7804abf17 |
| rev | line source |
|---|---|
| 9 | 1 #ifndef __gui__pages__now_playing_h |
| 2 #define __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 | |
| 9 | 64 #endif // __gui__pages__now_playing_h |
