Mercurial > minori
diff 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 |
line wrap: on
line diff
--- a/include/gui/widgets/anime_button.h Thu Apr 18 16:51:35 2024 -0400 +++ b/include/gui/widgets/anime_button.h Thu Apr 18 16:53:17 2024 -0400 @@ -2,16 +2,12 @@ #define MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ #include <QFrame> - -class QWidget; -class QLabel; +#include <QWidget> +#include <QLabel> -class Poster; -class ElidedLabel; - -namespace TextWidgets { -class LabelledParagraph; -} +#include "gui/widgets/poster.h" +#include "gui/widgets/elided_label.h" +#include "gui/widgets/text.h" namespace Anime { class Anime; @@ -24,10 +20,10 @@ void SetAnime(const Anime::Anime& anime); protected: - Poster* _poster = nullptr; - QLabel* _title = nullptr; - TextWidgets::LabelledParagraph* _info = nullptr; - ElidedLabel* _synopsis = nullptr; + Poster _poster; + QLabel _title; + TextWidgets::LabelledParagraph _info; + ElidedLabel _synopsis; }; -#endif // MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ \ No newline at end of file +#endif // MINORI_GUI_WIDGETS_ANIME_BUTTON_H_