annotate include/gui/widgets/elided_label.h @ 253:b3549da699a6

*: ooooh! stupid big commit! oops
author Paper <paper@paper.us.eu.org>
date Tue, 06 Feb 2024 16:56:32 -0500
parents
children 3ec7804abf17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
253
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
1 #ifndef __gui__widgets__elided_label_h
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2 #define __gui__widgets__elided_label_h
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 #include <QFrame>
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5 #include <QString>
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
7 class QPaintEvent;
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 class QWidget;
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
10 class ElidedLabel : public QFrame {
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
11 public:
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12 ElidedLabel(const QString& text, QWidget* parent = nullptr);
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13 void SetText(const QString& text);
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
14
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
15 protected:
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16 QString content;
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
18 void paintEvent(QPaintEvent* event) override;
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 };
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
20
b3549da699a6 *: ooooh! stupid big commit!
Paper <paper@paper.us.eu.org>
parents:
diff changeset
21 #endif // __gui__widgets__elided_label_h