kstatusbar.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef __KSTATUSBAR_H__
00022
#define __KSTATUSBAR_H__
00023
00024
#include <qstatusbar.h>
00025
#include <qintdict.h>
00026
#include <qlabel.h>
00027
#include <kdemacros.h>
00028
00029
class KStatusBar;
00030
00035 class KStatusBarLabel :
public QLabel
00036 {
00037 Q_OBJECT
00038
00039
public:
00040
00041
00042
KStatusBarLabel(
const QString& text,
int _id,
KStatusBar* parent = 0L,
const char *name=0L );
00043 ~
KStatusBarLabel () {};
00044
00045
protected:
00046
00047
void mousePressEvent (
QMouseEvent* _event);
00048
void mouseReleaseEvent (
QMouseEvent* _event);
00049
00050
private:
00051
00052
int id;
00053
00054 signals:
00055
00056
void itemPressed (
int id);
00057
void itemReleased (
int id);
00058 };
00059
00082 class KStatusBar :
public QStatusBar
00083 {
00084 Q_OBJECT
00085
00086
public:
00092 enum BarStatus{ Toggle, Show, Hide };
00093
00097
KStatusBar(
QWidget* parent = 0L,
const char* name = 0L );
00098
00104
~KStatusBar();
00105
00122
void insertItem(
const QString& text,
int id,
int stretch=0,
bool permanent=
false );
00123
00133 inline void insertFixedItem(
const QString& text,
int id,
bool permanent=
false)
00134 {
insertItem(text,
id, 0, permanent);
setItemFixed(
id); }
00135
00141
void removeItem(
int id );
00142
00151
bool hasItem(
int id )
const;
00152
00162
void changeItem(
const QString& text,
int id );
00163
00169
void setItemAlignment(
int id,
int align);
00170
00178
void setItemFixed(
int id,
int width=-1);
00179
00180 signals:
00181
00188
void pressed(
int );
00189
00195
void released(
int );
00196
00197
private:
00198
QIntDict<KStatusBarLabel> items;
00199
class KStatusBarPrivate* d;
00200 };
00201
00202
#endif // __KSTATUSBAR_H__
00203
This file is part of the documentation for kdeui Library Version 3.2.3.