Mercurial > minori
annotate include/gui/widgets/clickable_label.h @ 75:d3e9310598b1
*: refactor some stuff
text: "TextParagraph"s are now called sections, because that's the
actual word for it :P
text: new classes: Line and OneLineSection, solves many problems with
paragraphs that are only one line long (ex. going out of bounds)
http: reworked http stuff to allow threaded get requests, also moved it
to its own file to (hopefully) remove clutter
eventually I'll make a threaded post request method and use that in
the "basic" function
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 04 Oct 2023 01:42:30 -0400 |
parents | 442065432549 |
children | c69230dc2b5d |
rev | line source |
---|---|
67
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
1 #ifndef __gui__widgets__clickable_label_h |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 #define __gui__widgets__clickable_label_h |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
3 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
4 #include <QLabel> |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
5 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
6 class QWidget; |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
7 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
8 class ClickableLabel : public QLabel { |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
9 Q_OBJECT |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
10 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
11 public: |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
12 explicit ClickableLabel(QWidget* parent = nullptr); |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
13 ~ClickableLabel(); |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
14 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
15 signals: |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
16 void clicked(); |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
17 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
18 protected: |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
19 void mousePressEvent(QMouseEvent*) override; |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
20 }; |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
21 |
442065432549
poster: make posters link to AniList
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
22 #endif // __gui__widgets__clickable_label_h |