Provides a plasma-themed QLabel.
More...
#include <Plasma/Widgets/Label>
List of all members.
Detailed Description
Provides a plasma-themed QLabel.
Definition at line 40 of file label.h.
Constructor & Destructor Documentation
Constructs a label with word wrap on by default.
- parent the parent of this widget
Definition at line 92 of file label.cpp.
| Plasma::Label::~Label |
( |
| ) |
|
Member Function Documentation
| Qt::Alignment Plasma::Label::alignment |
( |
| ) |
const |
- Returns:
- the alignment for the text used in the labels
| void Plasma::Label::changeEvent |
( |
QEvent * |
event | ) |
[protected] |
| void Plasma::Label::contextMenuEvent |
( |
QGraphicsSceneContextMenuEvent * |
event | ) |
[protected] |
| bool Plasma::Label::event |
( |
QEvent * |
event | ) |
[protected] |
| bool Plasma::Label::hasScaledContents |
( |
| ) |
const |
- Returns:
- true if the contents are scaled to the label size
| QString Plasma::Label::image |
( |
| ) |
const |
- Returns:
- the image path being displayed currently, or an empty string if none.
| QVariant Plasma::Label::itemChange |
( |
GraphicsItemChange |
change, |
|
|
const QVariant & |
value |
|
) |
| [protected] |
| void Plasma::Label::linkActivated |
( |
const QString & |
link | ) |
[signal] |
| void Plasma::Label::linkHovered |
( |
const QString & |
link | ) |
[signal] |
| void Plasma::Label::mouseMoveEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
[protected] |
| void Plasma::Label::mousePressEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
[protected] |
| QLabel* Plasma::Label::nativeWidget |
( |
| ) |
const |
- Returns:
- the native widget wrapped by this Label
| void Plasma::Label::resizeEvent |
( |
QGraphicsSceneResizeEvent * |
event | ) |
[protected] |
| void Plasma::Label::setAlignment |
( |
Qt::Alignment |
alignment | ) |
|
Sets the alignment for the text.
Definition at line 183 of file label.cpp.
| void Plasma::Label::setImage |
( |
const QString & |
path | ) |
|
Sets the path to an image to display.
- path the path to the image; if a relative path, then a themed image will be loaded.
Definition at line 124 of file label.cpp.
| void Plasma::Label::setScaledContents |
( |
bool |
scaled | ) |
|
Scale or not the contents of the label to the label size.
Definition at line 157 of file label.cpp.
| void Plasma::Label::setStyleSheet |
( |
const QString & |
stylesheet | ) |
|
Sets the stylesheet used to control the visual display of this Label.
Definition at line 203 of file label.cpp.
| void Plasma::Label::setText |
( |
const QString & |
text | ) |
|
Sets the display text for this Label.
- text the text to display; should be translated.
Definition at line 113 of file label.cpp.
| void Plasma::Label::setTextSelectable |
( |
bool |
enable | ) |
|
Set if the text on the label can be selected with the mouse.
- enable true if we want to manage text selection with the mouse
- Since:
- 4.4
Definition at line 167 of file label.cpp.
| void Plasma::Label::setWordWrap |
( |
bool |
wrap | ) |
|
Sets if the text of the label can wrap in multiple lines.
- wrap multiple lines or not
- Since:
- 4.5
Definition at line 193 of file label.cpp.
| QSizeF Plasma::Label::sizeHint |
( |
Qt::SizeHint |
which, |
|
|
const QSizeF & |
constraint |
|
) |
| const [protected] |
| QString Plasma::Label::styleSheet |
( |
| ) |
|
- Returns:
- the stylesheet currently used with this widget
| QString Plasma::Label::text |
( |
| ) |
const |
| bool Plasma::Label::textSelectable |
( |
| ) |
const |
- Returns:
- true if the text is selectable with the mouse
- Since:
- 4.4
| bool Plasma::Label::wordWrap |
( |
| ) |
const |
- Returns:
- true if the label text can wrap in multiple lines if too long
- Since:
- 4.5
Property Documentation
Qt::Alignment Plasma::Label::alignment [read, write] |
bool Plasma::Label::hasScaledContents [read, write] |
QString Plasma::Label::image [read, write] |
QLabel * Plasma::Label::nativeWidget [read] |
QString Plasma::Label::styleSheet [read, write] |
QString Plasma::Label::text [read, write] |
bool Plasma::Label::textSelectable [read, write] |
bool Plasma::Label::wordWrap [read, write] |
The documentation for this class was generated from the following files: