Mercurial > minori
annotate include/gui/widgets/anime_button.h @ 367:8d45d892be88 default tip
*: instead of pugixml, use Qt XML features
this means we have one extra Qt dependency though...
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 17 Nov 2024 22:55:47 -0500 |
parents | f81bed4e04ac |
children |
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_ANIME_BUTTON_H_ |
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
254
diff
changeset
|
2 #define MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ |
253 | 3 |
4 #include <QFrame> | |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
5 #include <QWidget> |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
6 #include <QLabel> |
253 | 7 |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
8 #include "gui/widgets/poster.h" |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
9 #include "gui/widgets/elided_label.h" |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
10 #include "gui/widgets/text.h" |
253 | 11 |
12 namespace Anime { | |
13 class Anime; | |
14 } | |
15 | |
365
f81bed4e04ac
*: megacommit that probably breaks things
Paper <paper@paper.us.eu.org>
parents:
348
diff
changeset
|
16 class AnimeButton final : public QFrame { |
348
6b0768158dcd
text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
17 Q_OBJECT |
6b0768158dcd
text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
18 |
253 | 19 public: |
20 AnimeButton(QWidget* parent = nullptr); | |
21 AnimeButton(const Anime::Anime& anime, QWidget* parent = nullptr); | |
22 void SetAnime(const Anime::Anime& anime); | |
23 | |
365
f81bed4e04ac
*: megacommit that probably breaks things
Paper <paper@paper.us.eu.org>
parents:
348
diff
changeset
|
24 bool hasHeightForWidth() const override; |
f81bed4e04ac
*: megacommit that probably breaks things
Paper <paper@paper.us.eu.org>
parents:
348
diff
changeset
|
25 int heightForWidth(int w) const override; |
f81bed4e04ac
*: megacommit that probably breaks things
Paper <paper@paper.us.eu.org>
parents:
348
diff
changeset
|
26 |
253 | 27 protected: |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
28 Poster _poster; |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
29 QLabel _title; |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
30 TextWidgets::LabelledParagraph _info; |
348
6b0768158dcd
text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
31 TextWidgets::Paragraph _synopsis; |
253 | 32 }; |
33 | |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
34 #endif // MINORI_GUI_WIDGETS_ANIME_BUTTON_H_ |