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 (QWidget *parent=0, Qt::WindowFlags f=0)
 
 CElidingLabel (const QString &text, 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

using ads::CElidingLabel::Super = QLabel

Definition at line 59 of file ElidingLabel.h.

Constructor & Destructor Documentation

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

Definition at line 84 of file ElidingLabel.cpp.

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

Definition at line 93 of file ElidingLabel.cpp.

ads::CElidingLabel::~CElidingLabel ( )
virtual

Definition at line 103 of file ElidingLabel.cpp.

Member Function Documentation

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)

void ads::CElidingLabel::doubleClicked ( )
signal

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

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

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

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

Returns the text elide mode. The default mode is ElideNone

Definition at line 110 of file ElidingLabel.cpp.

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.

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

Definition at line 164 of file ElidingLabel.cpp.

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

Definition at line 144 of file ElidingLabel.cpp.

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

Definition at line 131 of file ElidingLabel.cpp.

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

Definition at line 153 of file ElidingLabel.cpp.

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

Sets the text elide mode

Definition at line 117 of file ElidingLabel.cpp.

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

Definition at line 198 of file ElidingLabel.cpp.

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

Definition at line 181 of file ElidingLabel.cpp.

QString ads::CElidingLabel::text ( ) const

Definition at line 214 of file ElidingLabel.cpp.

Friends And Related Function Documentation

friend struct ElidingLabelPrivate
friend

Definition at line 51 of file ElidingLabel.h.

Member Data Documentation

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 Sun Dec 6 2020 04:02:51