Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Member Functions | List of all members
ElidedLabel Class Reference

A QLabel subclass that elides text when it exceeds the widget's width, and optionally acts as a hyperlink. More...

#include <elided_label.h>

Inheritance diagram for ElidedLabel:

Public Slots

void clear ()
 clear Clear the label.
 
void setText (const QString &text)
 setText Set the label's plain text.
 

Public Member Functions

 ElidedLabel (QWidget *parent=0)
 Constructs a new ElidedLabel.
 
void setUrl (const QString &url)
 setUrl Set the label's URL.
 
void setSmallText (bool small_text=true)
 setSmallText Specifies a small or normal text size.
 

Protected Member Functions

virtual bool event (QEvent *event)
 Handles general events for the widget.
 
virtual void resizeEvent (QResizeEvent *)
 Handles resize events to recalculate the elided text.
 

Detailed Description

A QLabel subclass that elides text when it exceeds the widget's width, and optionally acts as a hyperlink.

Constructor & Destructor Documentation

◆ ElidedLabel()

ElidedLabel::ElidedLabel ( QWidget *  parent = 0)
explicit

Constructs a new ElidedLabel.

Parameters
parentThe parent widget, defaults to 0.

Member Function Documentation

◆ event()

bool ElidedLabel::event ( QEvent *  event)
protectedvirtual

Handles general events for the widget.

Parameters
eventThe event to handle.
Returns
True if the event was handled, false otherwise.

◆ setSmallText()

void ElidedLabel::setSmallText ( bool  small_text = true)
inline

setSmallText Specifies a small or normal text size.

Parameters
small_textShow the text in a smaller font size if true, or a normal size otherwise.

◆ setText

void ElidedLabel::setText ( const QString &  text)
slot

setText Set the label's plain text.

Parameters
textThe text to set. HTML will be escaped.

◆ setUrl()

void ElidedLabel::setUrl ( const QString &  url)

setUrl Set the label's URL.

Parameters
urlThe URL to set.

The documentation for this class was generated from the following files: