Mercurial > minori
comparison src/gui/pages/now_playing.cc @ 236:4d461ef7d424
HUGE UPDATE: convert build system to autotools
why? because cmake sucks :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 19 Jan 2024 00:24:02 -0500 |
parents | bc8d2ccff09c |
children | 862d0d8619f6 |
comparison
equal
deleted
inserted
replaced
235:593108b3d555 | 236:4d461ef7d424 |
---|---|
12 #include <QWidget> | 12 #include <QWidget> |
13 | 13 |
14 #include "anitomy/anitomy.h" | 14 #include "anitomy/anitomy.h" |
15 | 15 |
16 namespace NowPlayingPages { | 16 namespace NowPlayingPages { |
17 | |
18 class Default : public QWidget { | |
19 Q_OBJECT | |
20 | |
21 public: | |
22 Default(QWidget* parent = nullptr); | |
23 }; | |
24 | |
25 class Playing : public QWidget { | |
26 Q_OBJECT | |
27 | |
28 public: | |
29 Playing(QWidget* parent = nullptr); | |
30 void SetPlayingAnime(const Anime::Anime& anime, const anitomy::Elements& info); | |
31 int GetPlayingAnime(); | |
32 | |
33 private: | |
34 int _id = 0; | |
35 int _episode = 0; | |
36 std::unique_ptr<QWidget> _main = nullptr; | |
37 std::unique_ptr<TextWidgets::Title> _title = nullptr; | |
38 std::unique_ptr<AnimeInfoWidget> _info = nullptr; | |
39 std::unique_ptr<QWidget> _sidebar = nullptr; | |
40 std::unique_ptr<Poster> _poster = nullptr; | |
41 }; | |
42 | 17 |
43 Default::Default(QWidget* parent) : QWidget(parent) { | 18 Default::Default(QWidget* parent) : QWidget(parent) { |
44 QVBoxLayout* layout = new QVBoxLayout(this); | 19 QVBoxLayout* layout = new QVBoxLayout(this); |
45 layout->setContentsMargins(0, 0, 0, 0); | 20 layout->setContentsMargins(0, 0, 0, 0); |
46 | 21 |
127 void NowPlayingPage::SetPlaying(const Anime::Anime& anime, const anitomy::Elements& info) { | 102 void NowPlayingPage::SetPlaying(const Anime::Anime& anime, const anitomy::Elements& info) { |
128 reinterpret_cast<NowPlayingPages::Playing*>(stack->widget(1))->SetPlayingAnime(anime, info); | 103 reinterpret_cast<NowPlayingPages::Playing*>(stack->widget(1))->SetPlayingAnime(anime, info); |
129 stack->setCurrentIndex(1); | 104 stack->setCurrentIndex(1); |
130 updateGeometry(); | 105 updateGeometry(); |
131 } | 106 } |
132 | |
133 #include "gui/pages/moc_now_playing.cpp" | |
134 #include "now_playing.moc" |