annotate include/gui/pages/now_playing.h @ 348:6b0768158dcd

text: redesign almost every widget i.e. Paragraph is now a QLabel, etc etc, some things will probably break, idc
author Paper <paper@paper.us.eu.org>
date Tue, 25 Jun 2024 11:19:54 -0400
parents 3ec7804abf17
children
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"
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
6 #include "gui/widgets/sidebar.h"
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
7 #include "gui/widgets/text.h"
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
8
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
9 #include <QFrame>
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
10 #include <QStackedWidget>
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
11
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
12 #include <memory>
80
825506f0e221 [UNFINISHED]: stuff
Paper <mrpapersonic@gmail.com>
parents: 79
diff changeset
13 #include <unordered_map>
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14
85
c69230dc2b5d *: cleanup includes
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
15
83
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
16 namespace Anime {
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
17 class Anime;
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 80
diff changeset
18 }
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
19
154
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
20 namespace anitomy {
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
21 class Elements;
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
22 }
d43d68408d3c dep/animia: fix XnuFdTools
Paper <mrpapersonic@gmail.com>
parents: 95
diff changeset
23
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
24 /* -------------------------------------------------------------- */
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
25 /* separate pages */
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
26
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
27 namespace NowPlayingPages {
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
28
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
29 class Default : public QWidget {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
30 Q_OBJECT
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
31
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
32 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
33 Default(QWidget* parent = nullptr);
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
34
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
35 private:
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
36 TextWidgets::Title title_;
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
37 };
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
38
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
39 class Playing : public QWidget {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
40 Q_OBJECT
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
41
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
42 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
43 Playing(QWidget* parent = nullptr);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
44 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
45 int GetPlayingAnime();
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
46
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
47 private:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
48 int _id = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
49 int _episode = 0;
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
50
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
51 QWidget _main;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
52 TextWidgets::Title _title;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
53 AnimeInfoWidget _info;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
54
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
55 QWidget _sidebar;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
56 Poster _poster;
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
57 };
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
58
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
59 } // namespace NowPlayingPages
236
4d461ef7d424 HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents: 154
diff changeset
60
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
61 /* -------------------------------------------------------------- */
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
62 /* the full page */
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
63
95
8043152ef9d4 include: set classes as final where appropriate
Paper <mrpapersonic@gmail.com>
parents: 85
diff changeset
64 class NowPlayingPage final : public QFrame {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
65 Q_OBJECT
7
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
66
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
67 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
68 NowPlayingPage(QWidget* parent = nullptr);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
69 void SetDefault();
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
70 void SetPlaying(const Anime::Anime& anime, const anitomy::Elements& episodes);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
71 int GetPlayingId();
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
72
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
73 private:
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
74 enum class Subpages {
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
75 Default = 0,
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
76 Playing = 1,
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
77 };
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
78
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
79 QStackedWidget stack_;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
80
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
81 NowPlayingPages::Default default_;
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
82 NowPlayingPages::Playing playing_;
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
83 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
84
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
85 #endif // MINORI_GUI_PAGES_NOW_PLAYING_H_