ksim
KSim::Label Class Reference
#include <label.h>
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 | |
|
) |
| | |
| 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 | |
|
) |
| | |
| KSim::Label::~Label |
( |
|
) |
[virtual] |
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] |
| 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] |
| 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] |
| void KSim::Label::extraTypeCall |
( |
|
) |
[protected, virtual] |
| 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] |
| void KSim::Label::resizeEvent |
( |
QResizeEvent * |
ev |
) |
[protected, virtual] |
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] |
The documentation for this class was generated from the following files: