comparison include/gui/widgets/poster.h @ 273:f31305b9f60a

*: various code safety changes this also makes the code build on Qt 5.7. I can't test it though because I don't have it working... FAIL!
author Paper <paper@paper.us.eu.org>
date Thu, 18 Apr 2024 16:53:17 -0400
parents 3ec7804abf17
children 9a88e1725fd2
comparison
equal deleted inserted replaced
272:5437009cb10e 273:f31305b9f60a
1 #ifndef MINORI_GUI_WIDGETS_POSTER_H_ 1 #ifndef MINORI_GUI_WIDGETS_POSTER_H_
2 #define MINORI_GUI_WIDGETS_POSTER_H_ 2 #define MINORI_GUI_WIDGETS_POSTER_H_
3 #include <QFrame> 3 #include <QFrame>
4 #include <QImage> 4 #include <QImage>
5 5
6 #include "gui/widgets/clickable_label.h"
7
6 class QWidget; 8 class QWidget;
7 class ClickableLabel;
8 namespace Anime { 9 namespace Anime {
9 class Anime; 10 class Anime;
10 } 11 }
11 12
12 class Poster final : public QFrame { 13 class Poster final : public QFrame {
22 void resizeEvent(QResizeEvent*) override; 23 void resizeEvent(QResizeEvent*) override;
23 void ImageDownloadFinished(const QByteArray& arr); 24 void ImageDownloadFinished(const QByteArray& arr);
24 void RenderToLabel(); 25 void RenderToLabel();
25 26
26 private: 27 private:
27 QImage img; 28 QImage img_;
28 QString service_url; 29 QString service_url_;
29 ClickableLabel* label; 30 ClickableLabel label_;
30 bool clickable = true; 31 bool clickable_ = true;
31 }; 32 };
32 33
33 #endif // MINORI_GUI_WIDGETS_POSTER_H_ 34 #endif // MINORI_GUI_WIDGETS_POSTER_H_