#include <ElidingLabel.h>
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 | |
ElidingLabelPrivate * | d |
Friends | |
struct | ElidingLabelPrivate |
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.
using ads::CElidingLabel::Super = QLabel |
Definition at line 59 of file ElidingLabel.h.
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.
|
virtual |
Definition at line 103 of file ElidingLabel.cpp.
|
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)
|
signal |
This signal is emitted if the user does a double click on the label
|
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.
|
overridevirtual |
Definition at line 164 of file ElidingLabel.cpp.
|
overrideprotectedvirtual |
Definition at line 144 of file ElidingLabel.cpp.
|
overrideprotectedvirtual |
Definition at line 131 of file ElidingLabel.cpp.
|
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.
|
overridevirtual |
Definition at line 181 of file ElidingLabel.cpp.
QString ads::CElidingLabel::text | ( | ) | const |
Definition at line 214 of file ElidingLabel.cpp.
|
friend |
Definition at line 51 of file ElidingLabel.h.
|
private |
Definition at line 50 of file ElidingLabel.h.