Mercurial > minori
comparison include/gui/pages/now_playing.h @ 83:d02fdf1d6708
*: huuuge update
1. make the now playing page function correctly
2. de-constructorfy many of our custom widgets,
allowing them to be changed on-the-fly from
the Now Playing page
3. ... :)
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 24 Oct 2023 22:01:02 -0400 |
| parents | 825506f0e221 |
| children | c69230dc2b5d |
comparison
equal
deleted
inserted
replaced
| 82:8b65c417c225 | 83:d02fdf1d6708 |
|---|---|
| 2 #define __gui__pages__now_playing_h | 2 #define __gui__pages__now_playing_h |
| 3 #include <QFrame> | 3 #include <QFrame> |
| 4 #include <unordered_map> | 4 #include <unordered_map> |
| 5 | 5 |
| 6 class QStackedWidget; | 6 class QStackedWidget; |
| 7 namespace Anime { | |
| 8 class Anime; | |
| 9 } | |
| 7 | 10 |
| 8 class NowPlayingPage : public QFrame { | 11 class NowPlayingPage : public QFrame { |
| 9 Q_OBJECT | 12 Q_OBJECT |
| 10 | 13 |
| 11 public: | 14 public: |
| 12 NowPlayingPage(QWidget* parent = nullptr); | 15 NowPlayingPage(QWidget* parent = nullptr); |
| 13 void SetDefault(); | 16 void SetDefault(); |
| 14 void SetPlaying(int id, const std::unordered_map<std::string, std::string>& episodes); | 17 void SetPlaying(const Anime::Anime& anime, const std::unordered_map<std::string, std::string>& episodes); |
| 15 int GetPlayingId(); | 18 int GetPlayingId(); |
| 16 | 19 |
| 17 private: | 20 private: |
| 18 QStackedWidget* stack; | 21 QStackedWidget* stack; |
| 19 }; | 22 }; |
