Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
elided_label.h
Go to the documentation of this file.
1
10#ifndef ELIDED_LABEL_H
11#define ELIDED_LABEL_H
12
13#include <QLabel>
14
15class ElidedLabel : public QLabel
16{
17 Q_OBJECT
18public:
19 explicit ElidedLabel(QWidget *parent = 0);
24 void setUrl(const QString &url);
29 void setSmallText(bool small_text = true) { small_text_ = small_text; }
30
31protected:
32 virtual bool event(QEvent *event);
33 virtual void resizeEvent(QResizeEvent *);
34
35private:
36 bool small_text_;
37 QString full_text_;
38 QString url_;
39
40 void updateText();
41
42signals:
43
44public slots:
48 void clear();
53 void setText(const QString &text);
54};
55
56#endif // ELIDED_LABEL_H
Definition elided_label.h:16
void setSmallText(bool small_text=true)
setSmallText Specifies a small or normal text size.
Definition elided_label.h:29
void clear()
clear Clear the label.
Definition elided_label.cpp:67
void setText(const QString &text)
setText Set the label's plain text.
Definition elided_label.cpp:75
void setUrl(const QString &url)
setUrl Set the label's URL.
Definition elided_label.cpp:25