00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef QPROGRESSBAR_H
00025 #define QPROGRESSBAR_H
00026
00027 #include <QtGui/qframe.h>
00028
00029 QT_BEGIN_HEADER
00030
00031 QT_MODULE(Gui)
00032
00033 #ifndef QT_NO_PROGRESSBAR
00034
00035 class QProgressBarPrivate;
00036
00037 class Q_GUI_EXPORT QProgressBar : public QWidget
00038 {
00039 Q_OBJECT
00040 Q_ENUMS(Direction)
00041 Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
00042 Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
00043 Q_PROPERTY(QString text READ text)
00044 Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
00045 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
00046 Q_PROPERTY(bool textVisible READ isTextVisible WRITE setTextVisible)
00047 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
00048 Q_PROPERTY(bool invertedAppearance READ invertedAppearance WRITE setInvertedAppearance)
00049 Q_PROPERTY(Direction textDirection READ textDirection WRITE setTextDirection)
00050 Q_PROPERTY(QString format READ format WRITE setFormat)
00051
00052 public:
00053 enum Direction { TopToBottom, BottomToTop };
00054
00055 explicit QProgressBar(QWidget *parent = 0);
00056
00057 int minimum() const;
00058 int maximum() const;
00059
00060 void setRange(int minimum, int maximum);
00061 int value() const;
00062
00063 virtual QString text() const;
00064 void setTextVisible(bool visible);
00065 bool isTextVisible() const;
00066
00067 Qt::Alignment alignment() const;
00068 void setAlignment(Qt::Alignment alignment);
00069
00070 QSize sizeHint() const;
00071 QSize minimumSizeHint() const;
00072
00073 Qt::Orientation orientation() const;
00074
00075 void setInvertedAppearance(bool invert);
00076 bool invertedAppearance();
00077 void setTextDirection(QProgressBar::Direction textDirection);
00078 QProgressBar::Direction textDirection();
00079
00080 void setFormat(const QString &format);
00081 QString format() const;
00082
00083 public Q_SLOTS:
00084 void reset();
00085 void setMinimum(int minimum);
00086 void setMaximum(int maximum);
00087 void setValue(int value);
00088 void setOrientation(Qt::Orientation);
00089
00090 Q_SIGNALS:
00091 void valueChanged(int value);
00092
00093 protected:
00094 bool event(QEvent *e);
00095 void paintEvent(QPaintEvent *);
00096
00097 private:
00098 Q_DECLARE_PRIVATE(QProgressBar)
00099 Q_DISABLE_COPY(QProgressBar)
00100 };
00101
00102 #endif // QT_NO_PROGRESSBAR
00103
00104 QT_END_HEADER
00105
00106 #endif // QPROGRESSBAR_H