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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
1 #ifndef __gui__pages__now_playing_h
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
2 #define __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
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
64 #endif // __gui__pages__now_playing_h