Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QSTATUSBAR_H
00043 #define QSTATUSBAR_H
00044
00045 #include <QtGui/qwidget.h>
00046
00047 QT_BEGIN_HEADER
00048
00049 QT_BEGIN_NAMESPACE
00050
00051 QT_MODULE(Gui)
00052
00053 #ifndef QT_NO_STATUSBAR
00054
00055 class QStatusBarPrivate;
00056
00057 class Q_GUI_EXPORT QStatusBar: public QWidget
00058 {
00059 Q_OBJECT
00060
00061 Q_PROPERTY(bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled)
00062
00063 public:
00064 explicit QStatusBar(QWidget* parent=0);
00065 virtual ~QStatusBar();
00066
00067 void addWidget(QWidget *widget, int stretch = 0);
00068 int insertWidget(int index, QWidget *widget, int stretch = 0);
00069 void addPermanentWidget(QWidget *widget, int stretch = 0);
00070 int insertPermanentWidget(int index, QWidget *widget, int stretch = 0);
00071 void removeWidget(QWidget *widget);
00072
00073 void setSizeGripEnabled(bool);
00074 bool isSizeGripEnabled() const;
00075
00076 QString currentMessage() const;
00077
00078 public Q_SLOTS:
00079 void showMessage(const QString &text, int timeout = 0);
00080 void clearMessage();
00081
00082 #ifdef QT3_SUPPORT
00083 public:
00084 QT3_SUPPORT_CONSTRUCTOR QStatusBar(QWidget* parent, const char* name);
00085 QT3_SUPPORT void addWidget(QWidget *w, int stretch, bool permanent)
00086 { if (permanent) addPermanentWidget(w, stretch); else addWidget(w, stretch); }
00087 public Q_SLOTS:
00088 inline QT_MOC_COMPAT void message(const QString &text, int timeout = 0) { showMessage(text, timeout); }
00089 inline QT_MOC_COMPAT void clear() { clearMessage(); }
00090 #endif
00091
00092 Q_SIGNALS:
00093 void messageChanged(const QString &text);
00094
00095 protected:
00096 void showEvent(QShowEvent *);
00097 void paintEvent(QPaintEvent *);
00098 void resizeEvent(QResizeEvent *);
00099
00100
00101 void reformat();
00102 void hideOrShow();
00103 bool event(QEvent *);
00104
00105 private:
00106 Q_DISABLE_COPY(QStatusBar)
00107 Q_DECLARE_PRIVATE(QStatusBar)
00108 };
00109
00110 #endif // QT_NO_STATUSBAR
00111
00112 QT_END_NAMESPACE
00113
00114 QT_END_HEADER
00115
00116 #endif // QSTATUSBAR_H