Mercurial > minori
annotate include/gui/widgets/clickable_label.h @ 342:adb79bdde329
dep/animone: fix tons of issues
for example, the window ID stuff was just... completely wrong. since we're
supporting multiple different window systems, it *has* to be a union rather
than just a single integer type. HWND is also not a DWORD, it's a pointer(!),
so now it's stored as a std::uintptr_t.
(this probably breaks things)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 20 Jun 2024 03:03:05 -0400 |
parents | b1f625b0227c |
children |
rev | line source |
---|---|
301
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
1 #ifndef MINORI_GUI_WIDGETS_CLICKABLE_LABEL_H_ |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
2 #define MINORI_GUI_WIDGETS_CLICKABLE_LABEL_H_ |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
3 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
4 #include <QLabel> |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
5 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
6 class ClickableLabel final : public QLabel { |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
7 Q_OBJECT |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
8 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
9 public: |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
10 explicit ClickableLabel(QWidget* parent = nullptr); |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
11 ~ClickableLabel(); |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
12 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
13 signals: |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
14 void clicked(); |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
15 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
16 protected: |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
17 void mousePressEvent(QMouseEvent*) override; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
18 }; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
19 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
261
diff
changeset
|
20 #endif // MINORI_GUI_WIDGETS_CLICKABLE_LABEL_H_ |