class KStatusBar

KDE statusbar widget. More...

Definition#include <kstatusbar.h>
InheritsQStatusBar (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Signals


Detailed Description

Display status messages.

You can insert text labels or custom widgets. Their geometry is managed internally. KStatusBar resizes itself, but positioning is left to KMainWindow (or to you, if you don't use KMainWindow ).

A special type of item is a message which is a temporary text-message displayed on top of other items in full-width. Messages are visible for specified time, or until you call the slot QStatusBar::clear(). See QStatusBar::message for details.

KStatusBar inherits QStatusBar, you can freely use all QStatusBar methods.

Empty text items are not visible. They will become visible when you change (add) text.

enum BarStatus { Toggle, Show, Hide }

BarStatus

WARNING: This enum is only for backward compatibility and it may be removed. No method here uses it.

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

KStatusBar

Constructs a status bar. parent is usually KMainWindow.

 ~KStatusBar ()

~KStatusBar

Destructor.

Deletes all internal objects.

void  insertItem (const QString& text, int id, int stretch=0, bool permanent=false )

insertItem

Inserts a text label into the status bar. Paremeters stretch and permanent are passed to QStatusBar::addWidget .

If permanent is true, then item will be placed on the far right of the statusbar and will never be hidden by QStatusBar::message.

Parameters:
idid of item
stretchstretch passed to QStatusBar::addWidget
permanentis item permanent or not (passed to QStatusBar::addWidget )

See also: QStatusbar::addWidget

inline void  insertFixedItem (const QString& text, int id, bool permanent=false)

insertFixedItem

Inserts a fixed width text label into status bar. The width will be set according to text, but will remain fixed even if you change text. You can change fixed width by calling setItemFixed.

Parameters:
idid ov item
permanentpermanent flag passed to QStatusBar::addWidget

void  removeItem ( int id )

removeItem

Removes an item.

Parameters:
idThe item to remove.

void  changeItem ( const QString& text, int id )

changeItem

Changes the text in a status bar field.

The item will be resized to fit the text. If you change text to be empty, item will not be visible (untill you add some text).

Parameters:
idThe id of item.

void  setItemAlignment (int id, int align)

setItemAlignment

Sets the alignment of item id. By default all fields are aligned AlignHCenter | AlignVCenter. See QLabel::setAlignment for details.

void  setItemFixed (int id, int width=-1)

setItemFixed

Sets item id to have fixed width. This cannot be undone, but you can always set new fixed width.

Parameters:
idid of item
widthfixed width in pixels. Default -1 is to adapt to text width.

void  pressed ( int )

pressed

[signal]

Emitted when mouse is pressed over item id.

Connect to this signal if you want to respond to mouse press events.

void  released ( int )

released

[signal]

Emitted when mouse is released over item id.

Connect to this signal if you want to respond to mouse release events (clicks).