|
|
An Statusbar, similar to the KStatusBar, but with tooltip support 99,9% of the code is from the KStatusBar by Sven Radej / Mark Donohoe
myStatusBar (QWidget *parent=0, const char *name=0)
| myStatusBar |
~myStatusBar ()
| ~myStatusBar |
void insertItem (const QString& text, int id, int stretch=0, bool permanent=false )
| insertItem |
Insert 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:
id | id of item |
stretch | stretch passed to QStatusBar::addWidget |
permanent | is item permanent or not (passed to QStatusBar::addWidget ) |
See also: QStatusbar::addWidget
inline void insertFixedItem (const QString& text, int id, bool permanent=false)
| insertFixedItem |
Insert 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:
id | id ov item |
permanent | permanent flag passed to QStatusBar::addWidget |
void removeItem ( int id )
| removeItem |
Remove an item.
Parameters:
id | The item to remove. |
void changeItem ( const QString& text, int id )
| changeItem |
Change 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:
id | The 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:
id | id of item |
width | fixed width in pixels. Default -1 is to adapt to text width. |
void setToolTip (int id, QString str)
| setToolTip |
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).
void slotPressed (int id)
| slotPressed |
[protected slots slot]
void slotReleased (int id)
| slotReleased |
[protected slots slot]
QIntDict<KStatusBarLabel> items | items |
[private]