Public Types | Signals | Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
ads::CElidingLabel Class Reference

#include <ElidingLabel.h>

Inheritance diagram for ads::CElidingLabel:
Inheritance graph
[legend]

Public Types

using Super = QLabel
 

Signals

void clicked ()
 
void doubleClicked ()
 
void elidedChanged (bool elided)
 

Public Member Functions

 CElidingLabel (const QString &text, QWidget *parent=0, Qt::WindowFlags f=0)
 
 CElidingLabel (QWidget *parent=0, Qt::WindowFlags f=0)
 
Qt::TextElideMode elideMode () const
 
bool isElided () const
 
virtual QSize minimumSizeHint () const override
 
void setElideMode (Qt::TextElideMode mode)
 
void setText (const QString &text)
 
virtual QSize sizeHint () const override
 
QString text () const
 
virtual ~CElidingLabel ()
 

Protected Member Functions

virtual void mouseDoubleClickEvent (QMouseEvent *ev) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void resizeEvent (QResizeEvent *event) override
 

Private Attributes

ElidingLabelPrivated
 

Friends

struct ElidingLabelPrivate
 

Detailed Description

A QLabel that supports eliding text. Because the functions setText() and text() are no virtual functions setting and reading the text via a pointer to the base class QLabel does not work properly

Definition at line 46 of file ElidingLabel.h.

Member Typedef Documentation

◆ Super

using ads::CElidingLabel::Super = QLabel

Definition at line 59 of file ElidingLabel.h.

Constructor & Destructor Documentation

◆ CElidingLabel() [1/2]

ads::CElidingLabel::CElidingLabel ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Definition at line 84 of file ElidingLabel.cpp.

◆ CElidingLabel() [2/2]

ads::CElidingLabel::CElidingLabel ( const QString &  text,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Definition at line 93 of file ElidingLabel.cpp.

◆ ~CElidingLabel()

ads::CElidingLabel::~CElidingLabel ( )
virtual

Definition at line 103 of file ElidingLabel.cpp.

Member Function Documentation

◆ clicked

void ads::CElidingLabel::clicked ( )
signal

This signal is emitted if the user clicks on the label (i.e. pressed down then released while the mouse cursor is inside the label)

◆ doubleClicked

void ads::CElidingLabel::doubleClicked ( )
signal

This signal is emitted if the user does a double click on the label

◆ elidedChanged

void ads::CElidingLabel::elidedChanged ( bool  elided)
signal

This signal is emitted when isElided() state of this label is changed

◆ elideMode()

Qt::TextElideMode ads::CElidingLabel::elideMode ( ) const

Returns the text elide mode. The default mode is ElideNone

Definition at line 110 of file ElidingLabel.cpp.

◆ isElided()

bool ads::CElidingLabel::isElided ( ) const

This function indicates whether the text on this label is currently elided

Definition at line 124 of file ElidingLabel.cpp.

◆ minimumSizeHint()

QSize ads::CElidingLabel::minimumSizeHint ( ) const
overridevirtual

Definition at line 164 of file ElidingLabel.cpp.

◆ mouseDoubleClickEvent()

void ads::CElidingLabel::mouseDoubleClickEvent ( QMouseEvent *  ev)
overrideprotectedvirtual

Definition at line 144 of file ElidingLabel.cpp.

◆ mouseReleaseEvent()

void ads::CElidingLabel::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Definition at line 131 of file ElidingLabel.cpp.

◆ resizeEvent()

void ads::CElidingLabel::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

Definition at line 153 of file ElidingLabel.cpp.

◆ setElideMode()

void ads::CElidingLabel::setElideMode ( Qt::TextElideMode  mode)

Sets the text elide mode

Definition at line 117 of file ElidingLabel.cpp.

◆ setText()

void ads::CElidingLabel::setText ( const QString &  text)

Definition at line 198 of file ElidingLabel.cpp.

◆ sizeHint()

QSize ads::CElidingLabel::sizeHint ( ) const
overridevirtual

Definition at line 181 of file ElidingLabel.cpp.

◆ text()

QString ads::CElidingLabel::text ( ) const

Definition at line 214 of file ElidingLabel.cpp.

Friends And Related Function Documentation

◆ ElidingLabelPrivate

friend struct ElidingLabelPrivate
friend

Definition at line 51 of file ElidingLabel.h.

Member Data Documentation

◆ d

ElidingLabelPrivate* ads::CElidingLabel::d
private

Definition at line 50 of file ElidingLabel.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51