messagewindow.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MESSAGEWINDOW_H
00021 #define MESSAGEWINDOW_H
00022
00023 #include <qwidget.h>
00024 #include <qptrdict.h>
00025
00026 #include <kdelibs_export.h>
00027
00028 class QLabel;
00029
00030 class KDEPRINT_EXPORT MessageWindow : public QWidget
00031 {
00032 Q_OBJECT
00033
00034 public:
00035 ~MessageWindow();
00036
00037 static void add( QWidget *parent, const QString& txt, int delay = 500 );
00038 static void change( QWidget *parent, const QString& txt );
00039 static void remove( QWidget *parent );
00040 static void removeAll();
00041
00042 protected slots:
00043 void slotTimer();
00044
00045 protected:
00046 MessageWindow( const QString& txt, int delay = 500, QWidget *parent = 0, const char *name = 0 );
00047 void setText( const QString& txt );
00048 QString text() const;
00049
00050 private:
00051 QLabel *m_text;
00052 static QPtrDict<MessageWindow> m_windows;
00053 };
00054
00055 #endif
|