| Wireshark 4.7.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
15 class ElidedLabel : public QLabel
16{
17 Q_OBJECT
18 public:
19 explicit ElidedLabel(QWidget *parent = 0);
24 void setUrl(const QString &url);
29 void setSmallText(bool small_text = true) { small_text_ = small_text; }
30
31 protected:
32 virtual bool event(QEvent *event);
33 virtual void resizeEvent(QResizeEvent *);
34
35 private:
36 bool small_text_;
37 QString full_text_;
38 QString url_;
39
40 void updateText();
41
42signals:
43
44 public slots:
48 void clear();
53 void setText(const QString &text);
54};
55
56#endif // ELIDED_LABEL_H
ElidedLabel
Definition elided_label.h:16
ElidedLabel::setSmallText
void setSmallText(bool small_text=true)
setSmallText Specifies a small or normal text size.
Definition elided_label.h:29
ElidedLabel::clear
void clear()
clear Clear the label.
Definition elided_label.cpp:67
ElidedLabel::setText
void setText(const QString &text)
setText Set the label's plain text.
Definition elided_label.cpp:75
ElidedLabel::setUrl
void setUrl(const QString &url)
setUrl Set the label's URL.
Definition elided_label.cpp:25