Mercurial > minori
annotate include/gui/widgets/poster.h @ 233:0a5b6a088886
dep/animia: fix proc readlink
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 15 Jan 2024 08:10:58 -0500 |
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 |