• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ksim

KSim::Label

KSim::Label Class Reference

#include <label.h>

Inheritance diagram for KSim::Label:

Inheritance graph
[legend]

List of all members.


Detailed Description

A widget that provides a text or image display which supports themes from gkrellm.

Label widget

Author:
Robbie Ward <linuxphreak@gmx.co.uk>

Definition at line 41 of file label.h.


Public Slots

void clear ()
void setText (const QString &text)

Public Member Functions

 Label (QWidget *parent, const char *name=0, Qt::WFlags fl=0)
 Label (int type, QWidget *parent, const char *name=0, Qt::WFlags fl=0)
 Label (int type, const QString &text, QWidget *parent, const char *name=0, Qt::WFlags fl=0)
virtual ~Label ()
const QString & text () const
virtual void configureObject (bool repaintWidget=true)
void setPixmap (const QPixmap &pixmap)
const QPixmap & pixmap () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const

Protected Member Functions

virtual void extraTypeCall ()
void setShowShadow (bool show)
bool showShadow () const
void setTextColour (const QColor &color)
const QColor & textColour () const
void setShadowColour (const QColor &color)
const QColor & shadowColour () const
void setConfigValues ()
virtual void paintEvent (QPaintEvent *)
virtual void resizeEvent (QResizeEvent *)
void drawText (QPainter *painter, const QRect &rect, const QColor &color, const QString &text)
void drawPixmap (QPainter *painter, const QRect &rect, const QPixmap &pixmap)
void setTextLocation (const QRect &rect)
const QRect & textLocation () const
void setShadowLocation (const QRect &rect)
const QRect & shadowLocation () const
void setThemePixmap (const QString &image)
void relayoutLabel (const QSize &old, bool repaint=true)

Constructor & Destructor Documentation

KSim::Label::Label ( QWidget *  parent,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructs a KSim::Label.

Parameters:
parent is the parent widget
Example usage:
  KSim::Label *label = new KSim::Label(this);
 
To create a KSim::Label with the normal theme look
See also:
KSim::ThemeLoader

Definition at line 56 of file label.cpp.

KSim::Label::Label ( int  type,
QWidget *  parent,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructs a KSimLabel.

Parameters:
type is the theme type
parent is the parent widget
Example usage:
  KSim::Label *label = new KSim::Label(KSim::Types::None, this);
 
To create a KSim::Label with the normal theme look, NOTE: this is the same as the KSim::Label(QWidget *, const char *, WFlags) ctor
See also:
KSim::ThemeLoader

Definition at line 62 of file label.cpp.

KSim::Label::Label ( int  type,
const QString &  text,
QWidget *  parent,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructs a KSim::Label.

Parameters:
type is the theme type
text is the default text to display
parent is the parent widget
Example usage:
  KSim::Label *label = new KSim:Label(KSim::Types::Host, "test label", this);
 
To create a KSim::Label with the theme look of host
See also:
KSim::ThemeLoader

Definition at line 68 of file label.cpp.

KSim::Label::~Label (  )  [virtual]

destructs KSim::Label.

Definition at line 75 of file label.cpp.


Member Function Documentation

const QString & KSim::Label::text (  )  const

returns the current text of the label

See also:
setText

Definition at line 80 of file label.cpp.

void KSim::Label::configureObject ( bool  repaintWidget = true  )  [virtual]

recreates the labels look & feel

Implements KSim::Base.

Reimplemented in KSim::LedLabel, KSim::Progress, and MailLabel.

Definition at line 85 of file label.cpp.

void KSim::Label::setPixmap ( const QPixmap &  pixmap  ) 

sets a pixmap for the label

Definition at line 100 of file label.cpp.

const QPixmap & KSim::Label::pixmap (  )  const

Returns:
the side pixmap

Definition at line 111 of file label.cpp.

QSize KSim::Label::sizeHint (  )  const [virtual]

reimplemented for internal reasons

Reimplemented in KSim::LedLabel, and KSim::Progress.

Definition at line 116 of file label.cpp.

QSize KSim::Label::minimumSizeHint (  )  const [virtual]

reimplemented for internal reasons

Definition at line 129 of file label.cpp.

void KSim::Label::clear (  )  [slot]

clears the current text in the label

Definition at line 134 of file label.cpp.

void KSim::Label::setText ( const QString &  text  )  [slot]

sets the current label of the widget to text

See also:
text()

Definition at line 139 of file label.cpp.

void KSim::Label::extraTypeCall (  )  [protected, virtual]

reimplemented for internal reasons

Reimplemented from KSim::Base.

Definition at line 150 of file label.cpp.

void KSim::Label::setShowShadow ( bool  show  )  [protected]

set wether the shadow should be shown or not

Definition at line 156 of file label.cpp.

bool KSim::Label::showShadow (  )  const [protected]

Returns:
true if the shadow is to be shown, else false

Definition at line 161 of file label.cpp.

void KSim::Label::setTextColour ( const QColor &  color  )  [protected]

Set the text color.

Definition at line 166 of file label.cpp.

const QColor & KSim::Label::textColour (  )  const [protected]

Returns:
the text color

Definition at line 171 of file label.cpp.

void KSim::Label::setShadowColour ( const QColor &  color  )  [protected]

Set the shadow color.

Definition at line 176 of file label.cpp.

const QColor & KSim::Label::shadowColour (  )  const [protected]

Returns:
the shadow color

Definition at line 181 of file label.cpp.

void KSim::Label::setConfigValues (  )  [protected]

Set the config values depending on the chart type.

Definition at line 186 of file label.cpp.

void KSim::Label::paintEvent ( QPaintEvent *   )  [protected, virtual]

reimplemented for internal reasons

Reimplemented from QWidget.

Reimplemented in KSim::LedLabel, KSim::Progress, and MailLabel.

Definition at line 199 of file label.cpp.

void KSim::Label::resizeEvent ( QResizeEvent *  ev  )  [protected, virtual]

reimplemented for internal reasons

Reimplemented from QWidget.

Reimplemented in KSim::LedLabel, and KSim::Progress.

Definition at line 218 of file label.cpp.

void KSim::Label::drawText ( QPainter *  painter,
const QRect &  rect,
const QColor &  color,
const QString &  text 
) [protected]

draw the text onto the label

Definition at line 231 of file label.cpp.

void KSim::Label::drawPixmap ( QPainter *  painter,
const QRect &  rect,
const QPixmap &  pixmap 
) [protected]

draw the pixmap onto the label

Definition at line 242 of file label.cpp.

void KSim::Label::setTextLocation ( const QRect &  rect  )  [protected]

sets the location of the text

Definition at line 252 of file label.cpp.

const QRect & KSim::Label::textLocation (  )  const [protected]

Returns:
the location of the text

Definition at line 257 of file label.cpp.

void KSim::Label::setShadowLocation ( const QRect &  rect  )  [protected]

sets the location of the shadow text

Definition at line 262 of file label.cpp.

const QRect & KSim::Label::shadowLocation (  )  const [protected]

Returns:
the location of the shadow text

Definition at line 267 of file label.cpp.

void KSim::Label::setThemePixmap ( const QString &  image  )  [protected]

sets the background image to be painted

Definition at line 272 of file label.cpp.

void KSim::Label::relayoutLabel ( const QSize &  old,
bool  repaint = true 
) [protected]

Definition at line 282 of file label.cpp.


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

ksim

Skip menu "ksim"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
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