annotate include/gui/pages/now_playing.h @ 320:1b5c04268d6a

services/kitsu: ACTUALLY finish GetAnimeList there are some things the API just... doesn't provide. therefore we have to request the genres separately any time a new anime info box is opened...
author Paper <paper@paper.us.eu.org>
date Wed, 12 Jun 2024 19:49:19 -0400
parents 3ec7804abf17
children 6b0768158dcd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
c69230dc2b5d *: cleanup includes
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
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
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
8 #include <QFrame>
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
9 #include <memory>
80
825506f0e221 [UNFINISHED]: stuff
Paper <mrpapersonic@gmail.com>
parents: 79
diff changeset
10 #include <unordered_map>
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
12 class QStackedWidget;
85
c69230dc2b5d *: cleanup includes
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
13
83
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
14 namespace Anime {
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
15 class Anime;
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
16 }
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
17
154
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
18 namespace anitomy {
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
19 class Elements;
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
20 }
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
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
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
25 Q_OBJECT
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
26
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
27 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
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
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
32 Q_OBJECT
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
33
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
34 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
35 Playing(QWidget* parent = nullptr);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
36 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
37 int GetPlayingAnime();
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
38
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
39 private:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
40 int _id = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
41 int _episode = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
42 std::unique_ptr<QWidget> _main = nullptr;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
43 std::unique_ptr<TextWidgets::Title> _title = nullptr;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
44 std::unique_ptr<AnimeInfoWidget> _info = nullptr;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
45 std::unique_ptr<QWidget> _sidebar = nullptr;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
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
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
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
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
52 Q_OBJECT
7
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
53
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
54 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
55 NowPlayingPage(QWidget* parent = nullptr);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
56 void SetDefault();
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
57 void SetPlaying(const Anime::Anime& anime, const anitomy::Elements& episodes);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
58 int GetPlayingId();
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
59
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
60 private:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
61 QStackedWidget* stack;
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
62 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
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_