Plasma
Plasma::Label Class Reference
#include <Plasma/Widgets/Label>
Inheritance diagram for Plasma::Label:

Public Slots | |
| void | dataUpdated (const QString &sourceName, const Plasma::DataEngine::Data &data) |
Signals | |
| void | linkActivated (const QString &link) |
| void | linkHovered (const QString &link) |
Public Member Functions | |
| Label (QGraphicsWidget *parent=0) | |
| ~Label () | |
| Qt::Alignment | alignment () const |
| bool | hasScaledContents () const |
| QString | image () const |
| QLabel * | nativeWidget () const |
| void | setAlignment (Qt::Alignment alignment) |
| void | setImage (const QString &path) |
| void | setScaledContents (bool scaled) |
| void | setStyleSheet (const QString &stylesheet) |
| void | setText (const QString &text) |
| void | setTextSelectable (bool enable) |
| void | setWordWrap (bool wrap) |
| QString | styleSheet () |
| QString | text () const |
| bool | textSelectable () const |
| bool | wordWrap () const |
Protected Member Functions | |
| void | changeEvent (QEvent *event) |
| void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| bool | event (QEvent *event) |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| void | resizeEvent (QGraphicsSceneResizeEvent *event) |
| QSizeF | sizeHint (Qt::SizeHint which, const QSizeF &constraint) const |
Properties | |
| Qt::Alignment | alignment |
| bool | hasScaledContents |
| QString | image |
| QLabel | nativeWidget |
| QGraphicsWidget | parentWidget |
| QString | styleSheet |
| QString | text |
| bool | textSelectable |
| bool | wordWrap |
Detailed Description
Constructor & Destructor Documentation
| Plasma::Label::Label | ( | QGraphicsWidget * | parent = 0 | ) | [explicit] |
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] |
| void Plasma::Label::dataUpdated | ( | const QString & | sourceName, |
| const Plasma::DataEngine::Data & | data | ||
| ) | [slot] |
| 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::paint | ( | QPainter * | painter, |
| const QStyleOptionGraphicsItem * | option, | ||
| QWidget * | widget | ||
| ) | [protected] |
| void Plasma::Label::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
| void Plasma::Label::setAlignment | ( | Qt::Alignment | alignment | ) |
| void Plasma::Label::setImage | ( | const QString & | path | ) |
| void Plasma::Label::setScaledContents | ( | bool | scaled | ) |
| void Plasma::Label::setStyleSheet | ( | const QString & | stylesheet | ) |
| void Plasma::Label::setText | ( | const QString & | text | ) |
| void Plasma::Label::setTextSelectable | ( | bool | enable | ) |
| void Plasma::Label::setWordWrap | ( | bool | wrap | ) |
| 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 |
- Returns:
- the display text
| 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:36:43 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:36:43 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.