• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Plasma

Plasma::Label

Plasma::Label Class Reference

Provides a plasma-themed QLabel. More...

#include <Plasma/Widgets/Label>

Inheritance diagram for Plasma::Label:
QGraphicsProxyWidget

List of all members.

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

Qt::Alignment alignment () const
bool hasScaledContents () const
QString image () const
 Label (QGraphicsWidget *parent=0)
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)
QString styleSheet ()
QString text () const
 ~Label ()

Protected Member Functions

void resizeEvent (QGraphicsSceneResizeEvent *event)

Properties

Qt::Alignment alignment
bool hasScaledContents
QString image
QLabel nativeWidget
QGraphicsWidget parentWidget
QString styleSheet
QString text

Detailed Description

Provides a plasma-themed QLabel.

Definition at line 40 of file label.h.


Constructor & Destructor Documentation

Plasma::Label::Label ( QGraphicsWidget *  parent = 0  )  [explicit]

Constructs a label with word wrap on by default.

  • parent the parent of this widget

Definition at line 101 of file label.cpp.

Plasma::Label::~Label (  ) 

Definition at line 118 of file label.cpp.


Member Function Documentation

Qt::Alignment Plasma::Label::alignment (  )  const
Returns:
the alignment for the text used in the labels
void Plasma::Label::dataUpdated ( const QString &  sourceName,
const Plasma::DataEngine::Data &  data 
) [slot]

Definition at line 201 of file label.cpp.

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.
void Plasma::Label::linkActivated ( const QString &  link  )  [signal]
void Plasma::Label::linkHovered ( const QString &  link  )  [signal]
QLabel* Plasma::Label::nativeWidget (  )  const
Returns:
the native widget wrapped by this Label
void Plasma::Label::resizeEvent ( QGraphicsSceneResizeEvent *  event  )  [protected]

Definition at line 215 of file label.cpp.

void Plasma::Label::setAlignment ( Qt::Alignment  alignment  ) 

Sets the alignment for the text.

  • the desired alignment

Definition at line 176 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 133 of file label.cpp.

void Plasma::Label::setScaledContents ( bool  scaled  ) 

Scale or not the contents of the label to the label size.

  • scale

Definition at line 166 of file label.cpp.

void Plasma::Label::setStyleSheet ( const QString &  stylesheet  ) 

Sets the stylesheet used to control the visual display of this Label.

  • stylesheet a CSS string

Definition at line 186 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 123 of file label.cpp.

QString Plasma::Label::styleSheet (  ) 
Returns:
the stylesheet currently used with this widget
QString Plasma::Label::text (  )  const
Returns:
the display text

Property Documentation

Qt::Alignment Plasma::Label::alignment [read, write]

Definition at line 47 of file label.h.

bool Plasma::Label::hasScaledContents [read, write]

Definition at line 48 of file label.h.

QString Plasma::Label::image [read, write]

Definition at line 46 of file label.h.

QLabel * Plasma::Label::nativeWidget [read]

Definition at line 50 of file label.h.

QGraphicsWidget Plasma::Label::parentWidget [read]

Definition at line 44 of file label.h.

QString Plasma::Label::styleSheet [read, write]

Definition at line 49 of file label.h.

QString Plasma::Label::text [read, write]

Definition at line 45 of file label.h.


The documentation for this class was generated from the following files:
  • label.h
  • label.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal