comparison include/gui/widgets/anime_button.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 6b0768158dcd
comparison
equal deleted inserted replaced
272:5437009cb10e 273:f31305b9f60a
1 #ifndef MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ 1 #ifndef MINORI_GUI_WIDGETS_ANIME_BUTTON_H_
2 #define MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ 2 #define MINORI_GUI_WIDGETS_ANIME_BUTTON_H_
3 3
4 #include <QFrame> 4 #include <QFrame>
5 #include <QWidget>
6 #include <QLabel>
5 7
6 class QWidget; 8 #include "gui/widgets/poster.h"
7 class QLabel; 9 #include "gui/widgets/elided_label.h"
8 10 #include "gui/widgets/text.h"
9 class Poster;
10 class ElidedLabel;
11
12 namespace TextWidgets {
13 class LabelledParagraph;
14 }
15 11
16 namespace Anime { 12 namespace Anime {
17 class Anime; 13 class Anime;
18 } 14 }
19 15
22 AnimeButton(QWidget* parent = nullptr); 18 AnimeButton(QWidget* parent = nullptr);
23 AnimeButton(const Anime::Anime& anime, QWidget* parent = nullptr); 19 AnimeButton(const Anime::Anime& anime, QWidget* parent = nullptr);
24 void SetAnime(const Anime::Anime& anime); 20 void SetAnime(const Anime::Anime& anime);
25 21
26 protected: 22 protected:
27 Poster* _poster = nullptr; 23 Poster _poster;
28 QLabel* _title = nullptr; 24 QLabel _title;
29 TextWidgets::LabelledParagraph* _info = nullptr; 25 TextWidgets::LabelledParagraph _info;
30 ElidedLabel* _synopsis = nullptr; 26 ElidedLabel _synopsis;
31 }; 27 };
32 28
33 #endif // MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ 29 #endif // MINORI_GUI_WIDGETS_ANIME_BUTTON_H_