annotate include/gui/widgets/poster.h @ 218:c39ad2a8587d

strings: include cstdint oops
author Paper <mrpapersonic@gmail.com>
date Sun, 07 Jan 2024 13:28:00 -0500
parents 8043152ef9d4
children d14f8e0e40c3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __gui__widgets__poster_h
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #define __gui__widgets__poster_h
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 #include <QFrame>
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include <QImage>
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 class QWidget;
67
442065432549 poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents: 66
diff changeset
7 class ClickableLabel;
83
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
8 namespace Anime {
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
9 class Anime;
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
10 }
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 Q_OBJECT
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 public:
83
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
16 Poster(QWidget* parent = nullptr);
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
17 Poster(const Anime::Anime& anime, QWidget* parent = nullptr);
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
18 void SetAnime(const Anime::Anime& anime);
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 protected:
67
442065432549 poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents: 66
diff changeset
21 void resizeEvent(QResizeEvent*) override;
83
d02fdf1d6708 *: huuuge update
Paper <mrpapersonic@gmail.com>
parents: 76
diff changeset
22 void ImageDownloadFinished(const QByteArray& arr);
75
d3e9310598b1 *: refactor some stuff
Paper <mrpapersonic@gmail.com>
parents: 67
diff changeset
23 void RenderToLabel();
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25 private:
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26 QImage img;
67
442065432549 poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents: 66
diff changeset
27 ClickableLabel* label;
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28 };
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 #endif // __gui__widgets__poster_h