Mercurial > minori
comparison include/gui/widgets/poster.h @ 254:d14f8e0e40c3
[UNFINISHED] *: update anime button
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 07 Feb 2024 07:57:37 -0500 |
parents | 8043152ef9d4 |
children | 3ec7804abf17 |
comparison
equal
deleted
inserted
replaced
253:b3549da699a6 | 254:d14f8e0e40c3 |
---|---|
8 namespace Anime { | 8 namespace Anime { |
9 class Anime; | 9 class Anime; |
10 } | 10 } |
11 | 11 |
12 class Poster final : public QFrame { | 12 class Poster final : public QFrame { |
13 Q_OBJECT | 13 Q_OBJECT |
14 | 14 |
15 public: | 15 public: |
16 Poster(QWidget* parent = nullptr); | 16 Poster(QWidget* parent = nullptr); |
17 Poster(const Anime::Anime& anime, QWidget* parent = nullptr); | 17 Poster(const Anime::Anime& anime, QWidget* parent = nullptr); |
18 void SetAnime(const Anime::Anime& anime); | 18 void SetAnime(const Anime::Anime& anime); |
19 void SetClickable(bool clickable); | |
19 | 20 |
20 protected: | 21 protected: |
21 void resizeEvent(QResizeEvent*) override; | 22 void resizeEvent(QResizeEvent*) override; |
22 void ImageDownloadFinished(const QByteArray& arr); | 23 void ImageDownloadFinished(const QByteArray& arr); |
23 void RenderToLabel(); | 24 void RenderToLabel(); |
24 | 25 |
25 private: | 26 private: |
26 QImage img; | 27 QImage img; |
27 ClickableLabel* label; | 28 QString service_url; |
29 ClickableLabel* label; | |
30 bool clickable = true; | |
28 }; | 31 }; |
29 | 32 |
30 #endif // __gui__widgets__poster_h | 33 #endif // __gui__widgets__poster_h |