class KStatusBar
|
KDE statusbar widget. More... |
|
|
Public Types
Public Methods
- KStatusBar (QWidget *parent = 0L, const char *name = 0L )
- ~ KStatusBar ()
- int insertItem ( const char *text, int ID )
- int insertWidget (QWidget *_widget, int size, int id)
- void removeItem (int id)
- void replaceItem (int _id, const char *new_text)
- void replaceItem (int _id, QWidget *new_widget)
- void changeItem ( const char *text, int id )
- void setInsertOrder (InsertOrder order)
- void setAlignment (int id, int align)
- void setHeight (int)
- void setBorderWidth (int)
- bool enable ( BarStatus stat )
- void message (const char *text, int time=0)
- void message (QWidget *wiiidget, int time=0)
- QSize sizeHint ()
Public Slots
Signals
Protected Methods
Protected Slots
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).<br>
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().<br>
STILL UNIMPLEMENTED:<br>
It is also possible to replace one item by another, keeping the same
size and position.
enum BarStatus {Toggle, Show, Hide }
|
enum Position {Top, Left, Bottom, Right, Floating}
|
enum InsertOrder {LeftToRight, RightToLeft}
|
KStatusBar (QWidget *parent = 0L, const char *name = 0L )
|
Constructs KStatusBar object.
Destructor. Deletes all internal objects.
int insertItem ( const char *text, int ID )
|
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.
int insertWidget (QWidget *_widget, int size, int id)
|
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.
Removes item id. If that was your custom widget it's hidden
but not deleted.
void replaceItem (int _id, const char *new_text)
|
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)
|
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 )
|
Change the text in a status bar field. The field is not resized !!!
Usefull only for labels.
void setInsertOrder (InsertOrder order)
|
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)
|
Sets the alignment of a field. By default all fields are aligned left.
Usefull only for labels.
Sets the Height of the StatusBar. Default height is computed from
default font height.
void setBorderWidth (int)
|
Sets the border width of the status bar seperators and frame.
bool enable ( BarStatus stat )
|
Enable disable status bar. You can get the same effect with show
or hide.
void message (const char *text, int time=0)
|
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)
|
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.
SizeHint. For now returns height() and width().
[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.
[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.
[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.
[protected]
void resizeEvent ( QResizeEvent* )
|
[protected]
[protected]
void updateRects ( bool resize = FALSE )
|
[protected]
[protected slot]
[protected slot]
- Author: Mark Donohoe (donohoe@kde.org) Maintained by Sven Radej <sven@lisa.exp.univie.ac.at>
- Generated: prospector@porky.devel.redhat.com on Tue Aug 15 09:55:36 2000, using kdoc 2.0a36.