Changeset View
Changeset View
Standalone View
Standalone View
krusader/Dialogs/krsqueezedtextlabel.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
49 | 49 | | |||
50 | public slots: | 50 | public slots: | ||
51 | void setText(const QString &text, int index = -1, int length = -1); | 51 | void setText(const QString &text, int index = -1, int length = -1); | ||
52 | 52 | | |||
53 | signals: | 53 | signals: | ||
54 | void clicked(QMouseEvent *); /**< emitted when someone clicks on the label */ | 54 | void clicked(QMouseEvent *); /**< emitted when someone clicks on the label */ | ||
55 | 55 | | |||
56 | protected: | 56 | protected: | ||
57 | void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE { | 57 | void resizeEvent(QResizeEvent *) override { | ||
58 | squeezeTextToLabel(_index, _length); | 58 | squeezeTextToLabel(_index, _length); | ||
59 | } | 59 | } | ||
60 | void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE; | 60 | void mousePressEvent(QMouseEvent *e) override; | ||
61 | void paintEvent(QPaintEvent * e) Q_DECL_OVERRIDE; | 61 | void paintEvent(QPaintEvent * e) override; | ||
62 | void squeezeTextToLabel(int index = -1, int length = -1); | 62 | void squeezeTextToLabel(int index = -1, int length = -1); | ||
63 | 63 | | |||
64 | QString fullText; | 64 | QString fullText; | ||
65 | 65 | | |||
66 | private: | 66 | private: | ||
67 | int _index, _length; | 67 | int _index, _length; | ||
68 | }; | 68 | }; | ||
69 | 69 | | |||
70 | #endif | 70 | #endif |