KStatusBar Class Reference

[kio Index] [kio Hierarchy] [Headers]


KDE statusbar widget More...

#include <kstatusbar.h>

Inherits: QFrame (qt)

Public Members

Public Slots

Protected Members

Protected Slots

Signals


Detailed Description

KStatusBar is widget for displaying status messages. You can insert text labels or custom widgets. Managing of items is internal. KStatusBar resizes itself, but positioning is left to KTopLevelWidget (or to you, if you don't use KTopLevelWidget).
special type of item is a message, a temporary text-message or custom widget which is displayed on top of other items in full-width. Messages are visible for specified time, or until you call slot clear().
STILL UNIMPLEMENTED:
It is also possible to replace one item by another, keeping the same size and position.


KStatusBar(QWidget *parent = 0L, const char *name = 0L ) [public]

Constructs KStatusBar object.

~KStatusBar() [public]

Destructor. Deletes all internal objects.

int insertItem( const char *text, int ID ) [public]

Insert text label into the status bar. When inserting the item send the longest text you expect to go into the field as the first argument. The field is sized to accomodate this text. However, the last field inserted is always stretched to fit the window width.

See Also:
insertWidget

int insertWidget(QWidget *_widget, int size, int id) [public]

Insert custom widget into the status bar. The widget must have statusbar as parent. The size is the width of the widget. However, the last item inserted is always stretched to fit the window width.

See Also:
insertItem

void removeItem(int id) [public]

Removes item id. If that was your custom widget it's hidden but not deleted.

void replaceItem(int _id, const char *new_text) [public]

NOT YET IMPLEMENTED! Replaces item id with new label wich has text new_text. New label will have the same position and size as old. If old item was your custom widget it is not deleted. Note that it is rather pointless to replace one label by another; use changeItem for that.

void replaceItem(int _id, QWidget *new_widget) [public]

NOT YET IMPLEMENTED! Replaces item id with new widget new_widget. New widget will have the same position and size as old item. If old item was your custom widget it is not deleted.

void changeItem( const char *text, int id ) [public]

Change the text in a status bar field. The field is not resized !!! Usefull only for labels.

void setInsertOrder(InsertOrder order) [public]

If order is KStatusBar::LeftToRight the fields are inserted from left to right, in particular the last field ist streched to the right border of the window. If order is KStatusBar::RightToLeft the fields are inserted from the right.

void setAlignment(int id, int align) [public]

Sets the alignment of a field. By default all fields are aligned left. Usefull only for labels.

void setHeight(int) [public]

Sets the Height of the StatusBar. Default height is computed from default font height.

void setBorderWidth(int) [public]

Sets the border width of the status bar seperators and frame.

bool enable( BarStatus stat ) [public]

Enable disable status bar. You can get the same effect with show or hide.

void message(const char *text, int time=0) [public]

Hides all items and displays temporary text message in whole statusbar. Message will be removed (and old items redisplayed) after time (in ms). If time is 0 (default) message will remain untill you call clear You can remove the message by calling clear any time.

void message(QWidget *wiiidget, int time=0) [public]

Hides all items and displays temporary custom widget in whole statusbar. Widget must have statusbar for it's parent. Widget will be removed (and old items redisplayed) after time (in ms). If time is 0 (default) widget will remain untill you call clear You can remove the message by calling clear any time. Upon clear your widget will be hidden, not deleted.

QSize sizeHint() [public]

SizeHint. For now returns height() and width().

void clear() [public slot]

Clears the message (if any), and shows back old state. This method is slot, you can connect to it. Does nothing if message was not called before. Message is hidden, not deleted. If message was your custom widget you have to clean it up.

void pressed(int) [signal]

Emits when mouse is pressed over llabel id. Connect to this signal if you want to notice mouse press events. If you want to catch this signal for your custom widgets, they must not catch mouse press events.

void released(int) [signal]

Emits when mouse is released over item id. Conect to this signal if you want to receive mouse click. If you want to catch this signal for your custom widgets, they must not catch mouse release events.


  • Author: Mark Donohoe (donohoe@kde.org) Maintained by Sven Radej <sven@lisa.exp.univie.ac.at>
  • Documentation generated by tasin@cd1 on Die Nov 30 17:32:00 CET 1999
Kdoc