Mercurial > minori
annotate include/gui/widgets/poster.h @ 75:d3e9310598b1
*: refactor some stuff
text: "TextParagraph"s are now called sections, because that's the
actual word for it :P
text: new classes: Line and OneLineSection, solves many problems with
paragraphs that are only one line long (ex. going out of bounds)
http: reworked http stuff to allow threaded get requests, also moved it
to its own file to (hopefully) remove clutter
eventually I'll make a threaded post request method and use that in
the "basic" function
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 04 Oct 2023 01:42:30 -0400 |
parents | 442065432549 |
children | 3364fadc8a36 |
rev | line source |
---|---|
66 | 1 #ifndef __gui__widgets__poster_h |
2 #define __gui__widgets__poster_h | |
3 #include <QFrame> | |
4 #include <QImage> | |
75 | 5 #include <QByteArray> |
66 | 6 |
7 class QWidget; | |
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
8 class ClickableLabel; |
66 | 9 |
10 class Poster : public QFrame { | |
11 Q_OBJECT | |
12 | |
13 public: | |
14 Poster(int id, QWidget* parent = nullptr); | |
15 | |
16 protected: | |
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
17 void resizeEvent(QResizeEvent*) override; |
75 | 18 void ImageDownloadFinished(QByteArray arr); |
19 void RenderToLabel(); | |
66 | 20 |
21 private: | |
22 QImage img; | |
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
66
diff
changeset
|
23 ClickableLabel* label; |
66 | 24 }; |
25 | |
26 #endif // __gui__widgets__poster_h |