annotate include/gui/widgets/poster.h @ 266:1a6a5d3a94cd

dep/animone: make bsd.cc and x11.cc actually work apparently I broke these, and even now the x11 code *still* doesn't want to work correctly (at least on FreeBSD). half of the PID response codes are just 0 or the PID for the X server itself... wtf? maybe dwm just doesn't support the XRes extension, or I'm just stupid. i don't know.
author Paper <paper@paper.us.eu.org>
date Thu, 11 Apr 2024 22:05:41 -0400
parents 3ec7804abf17
children f31305b9f60a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
1 #ifndef MINORI_GUI_WIDGETS_POSTER_H_
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
2 #define MINORI_GUI_WIDGETS_POSTER_H_
66
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 {
254
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
13 Q_OBJECT
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14
254
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
15 public:
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
16 Poster(QWidget* parent = nullptr);
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
17 Poster(const Anime::Anime& anime, QWidget* parent = nullptr);
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
18 void SetAnime(const Anime::Anime& anime);
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
19 void SetClickable(bool clickable);
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20
254
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
21 protected:
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
22 void resizeEvent(QResizeEvent*) override;
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
23 void ImageDownloadFinished(const QByteArray& arr);
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
24 void RenderToLabel();
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25
254
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
26 private:
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
27 QImage img;
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
28 QString service_url;
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
29 ClickableLabel* label;
d14f8e0e40c3 [UNFINISHED] *: update anime button
Paper <paper@paper.us.eu.org>
parents: 95
diff changeset
30 bool clickable = true;
66
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31 };
6481c5aed3e1 posters: add poster widget...
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
33 #endif // MINORI_GUI_WIDGETS_POSTER_H_