Mercurial > minori
comparison include/gui/widgets/poster.h @ 348:6b0768158dcd
text: redesign almost every widget
i.e. Paragraph is now a QLabel, etc etc, some things will probably
break, idc
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 25 Jun 2024 11:19:54 -0400 |
parents | b1f625b0227c |
children |
comparison
equal
deleted
inserted
replaced
347:a0aa8c8c4307 | 348:6b0768158dcd |
---|---|
18 Poster(const Anime::Anime& anime, QWidget* parent = nullptr); | 18 Poster(const Anime::Anime& anime, QWidget* parent = nullptr); |
19 ~Poster(); | 19 ~Poster(); |
20 void SetAnime(const Anime::Anime& anime); | 20 void SetAnime(const Anime::Anime& anime); |
21 void SetClickable(bool clickable); | 21 void SetClickable(bool clickable); |
22 | 22 |
23 bool hasHeightForWidth(void) const override; | |
24 int heightForWidth(int w) const override; | |
25 | |
23 protected: | 26 protected: |
24 void showEvent(QShowEvent*) override; | 27 void showEvent(QShowEvent*) override; |
25 void resizeEvent(QResizeEvent*) override; | 28 void resizeEvent(QResizeEvent*) override; |
26 void ImageDownloadFinished(const QByteArray& arr); | 29 void ImageDownloadFinished(const QByteArray& arr); |
27 void RenderToLabel(); | 30 void RenderToLabel(); |
28 void DownloadPoster(); | 31 void DownloadPoster(); |
32 | |
33 QSize sizeHint() const override; | |
34 QSize minimumSizeHint() const override; | |
29 | 35 |
30 private: | 36 private: |
31 /* stored as a pointer to prevent blocking */ | 37 /* stored as a pointer to prevent blocking */ |
32 HTTP::RequestThread* get_thread_; | 38 HTTP::RequestThread* get_thread_; |
33 | 39 |