Mercurial > minori
annotate include/gui/widgets/poster.h @ 101:c537996cf67b
*: multitude of config changes
1. theme is now configurable from the settings menu
(but you have to restart for it to apply)
2. config is now stored in an INI file, with no method of
conversion from json (this repo is private-ish anyway)
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Fri, 03 Nov 2023 14:06:02 -0400 |
| parents | 8043152ef9d4 |
| children | d14f8e0e40c3 |
| rev | line source |
|---|---|
| 66 | 1 #ifndef __gui__widgets__poster_h |
| 2 #define __gui__widgets__poster_h | |
| 3 #include <QFrame> | |
| 4 #include <QImage> | |
| 5 | |
| 6 class QWidget; | |
|
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
7 class ClickableLabel; |
| 83 | 8 namespace Anime { |
| 9 class Anime; | |
| 10 } | |
| 66 | 11 |
|
95
8043152ef9d4
include: set classes as final where appropriate
Paper <mrpapersonic@gmail.com>
parents:
83
diff
changeset
|
12 class Poster final : public QFrame { |
| 66 | 13 Q_OBJECT |
| 14 | |
| 15 public: | |
| 83 | 16 Poster(QWidget* parent = nullptr); |
| 17 Poster(const Anime::Anime& anime, QWidget* parent = nullptr); | |
| 18 void SetAnime(const Anime::Anime& anime); | |
| 66 | 19 |
| 20 protected: | |
|
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
21 void resizeEvent(QResizeEvent*) override; |
| 83 | 22 void ImageDownloadFinished(const QByteArray& arr); |
| 75 | 23 void RenderToLabel(); |
| 66 | 24 |
| 25 private: | |
| 26 QImage img; | |
|
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
27 ClickableLabel* label; |
| 66 | 28 }; |
| 29 | |
| 30 #endif // __gui__widgets__poster_h |
