KDEUI
#include <ksqueezedtextlabel.h>
Public Slots | |
void | clear () |
void | setText (const QString &text) |
Public Member Functions | |
KSqueezedTextLabel (QWidget *parent=0) | |
KSqueezedTextLabel (const QString &text, QWidget *parent=0) | |
virtual | ~KSqueezedTextLabel () |
QString | fullText () const |
virtual QSize | minimumSizeHint () const |
virtual void | setAlignment (Qt::Alignment) |
void | setTextElideMode (Qt::TextElideMode mode) |
virtual QSize | sizeHint () const |
Qt::TextElideMode | textElideMode () const |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *) |
void | mouseReleaseEvent (QMouseEvent *) |
void | resizeEvent (QResizeEvent *) |
void | squeezeTextToLabel () |
Properties | |
Qt::TextElideMode | textElideMode |
Detailed Description
A replacement for QLabel that squeezes its text.
A label class that squeezes its text into the label
If the text is too long to fit into the label it is divided into remaining left and right parts which are separated by three dots.
Example: http://www.kde.org/documentation/index.html could be squeezed to http://www.kde...ion/index.html
Definition at line 47 of file ksqueezedtextlabel.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor.
Definition at line 53 of file ksqueezedtextlabel.cpp.
Definition at line 43 of file ksqueezedtextlabel.cpp.
|
virtual |
Definition at line 61 of file ksqueezedtextlabel.cpp.
Member Function Documentation
|
slot |
|
protected |
- Reimplemented from superclass.
Definition at line 150 of file ksqueezedtextlabel.cpp.
QString KSqueezedTextLabel::fullText | ( | ) | const |
|
virtual |
Definition at line 71 of file ksqueezedtextlabel.cpp.
|
protected |
- Reimplemented from superclass.
Definition at line 177 of file ksqueezedtextlabel.cpp.
|
protected |
Called when widget is resized.
Definition at line 66 of file ksqueezedtextlabel.cpp.
|
virtual |
Overridden for internal reasons; the API remains unaffected.
Definition at line 126 of file ksqueezedtextlabel.cpp.
|
slot |
Sets the text.
Note that this is not technically a reimplementation of QLabel::setText(), which is not virtual (in Qt 4.3). Therefore, you may need to cast the object to KSqueezedTextLabel in some situations:
- Parameters
-
mode The new text.
Definition at line 89 of file ksqueezedtextlabel.cpp.
void KSqueezedTextLabel::setTextElideMode | ( | Qt::TextElideMode | mode | ) |
Sets the text elide mode.
- Parameters
-
mode The text elide mode.
Definition at line 139 of file ksqueezedtextlabel.cpp.
|
virtual |
Definition at line 78 of file ksqueezedtextlabel.cpp.
|
protected |
does the dirty work
Definition at line 101 of file ksqueezedtextlabel.cpp.
Qt::TextElideMode KSqueezedTextLabel::textElideMode | ( | ) | const |
Returns the text elide mode.
Property Documentation
|
readwrite |
Definition at line 49 of file ksqueezedtextlabel.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.