Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
257:699a20c57dc8 | 258:862d0d8619f6 |
---|---|
4 #include "gui/widgets/anime_info.h" | 4 #include "gui/widgets/anime_info.h" |
5 #include "gui/widgets/poster.h" | 5 #include "gui/widgets/poster.h" |
6 #include "gui/widgets/text.h" | 6 #include "gui/widgets/text.h" |
7 | 7 |
8 #include <QFrame> | 8 #include <QFrame> |
9 #include <memory> | |
9 #include <unordered_map> | 10 #include <unordered_map> |
10 #include <memory> | |
11 | 11 |
12 class QStackedWidget; | 12 class QStackedWidget; |
13 | 13 |
14 namespace Anime { | 14 namespace Anime { |
15 class Anime; | 15 class Anime; |
20 } | 20 } |
21 | 21 |
22 namespace NowPlayingPages { | 22 namespace NowPlayingPages { |
23 | 23 |
24 class Default : public QWidget { | 24 class Default : public QWidget { |
25 Q_OBJECT | 25 Q_OBJECT |
26 | 26 |
27 public: | 27 public: |
28 Default(QWidget* parent = nullptr); | 28 Default(QWidget* parent = nullptr); |
29 }; | 29 }; |
30 | 30 |
31 class Playing : public QWidget { | 31 class Playing : public QWidget { |
32 Q_OBJECT | 32 Q_OBJECT |
33 | 33 |
34 public: | 34 public: |
35 Playing(QWidget* parent = nullptr); | 35 Playing(QWidget* parent = nullptr); |
36 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info); | 36 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info); |
37 int GetPlayingAnime(); | 37 int GetPlayingAnime(); |
38 | 38 |
39 private: | 39 private: |
40 int _id = 0; | 40 int _id = 0; |
41 int _episode = 0; | 41 int _episode = 0; |
42 std::unique_ptr<QWidget> _main = nullptr; | 42 std::unique_ptr<QWidget> _main = nullptr; |
43 std::unique_ptr<TextWidgets::Title> _title = nullptr; | 43 std::unique_ptr<TextWidgets::Title> _title = nullptr; |
44 std::unique_ptr<AnimeInfoWidget> _info = nullptr; | 44 std::unique_ptr<AnimeInfoWidget> _info = nullptr; |
45 std::unique_ptr<QWidget> _sidebar = nullptr; | 45 std::unique_ptr<QWidget> _sidebar = nullptr; |
46 std::unique_ptr<Poster> _poster = nullptr; | 46 std::unique_ptr<Poster> _poster = nullptr; |
47 }; | 47 }; |
48 | 48 |
49 } | 49 } // namespace NowPlayingPages |
50 | 50 |
51 class NowPlayingPage final : public QFrame { | 51 class NowPlayingPage final : public QFrame { |
52 Q_OBJECT | 52 Q_OBJECT |
53 | 53 |
54 public: | 54 public: |
55 NowPlayingPage(QWidget* parent = nullptr); | 55 NowPlayingPage(QWidget* parent = nullptr); |
56 void SetDefault(); | 56 void SetDefault(); |
57 void SetPlaying(const Anime::Anime& anime, const anitomy::Elements& episodes); | 57 void SetPlaying(const Anime::Anime& anime, const anitomy::Elements& episodes); |
58 int GetPlayingId(); | 58 int GetPlayingId(); |
59 | 59 |
60 private: | 60 private: |
61 QStackedWidget* stack; | 61 QStackedWidget* stack; |
62 }; | 62 }; |
63 | 63 |
64 #endif // __gui__pages__now_playing_h | 64 #endif // __gui__pages__now_playing_h |