Warning, file /include/QtWidgets/qprogressbar.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QPROGRESSBAR_H
0005 #define QPROGRESSBAR_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qframe.h>
0009
0010 QT_REQUIRE_CONFIG(progressbar);
0011
0012 QT_BEGIN_NAMESPACE
0013
0014 class QProgressBarPrivate;
0015 class QStyleOptionProgressBar;
0016
0017 class Q_WIDGETS_EXPORT QProgressBar : public QWidget
0018 {
0019 Q_OBJECT
0020 Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
0021 Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
0022 Q_PROPERTY(QString text READ text)
0023 Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
0024 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
0025 Q_PROPERTY(bool textVisible READ isTextVisible WRITE setTextVisible)
0026 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
0027 Q_PROPERTY(bool invertedAppearance READ invertedAppearance WRITE setInvertedAppearance)
0028 Q_PROPERTY(Direction textDirection READ textDirection WRITE setTextDirection)
0029 Q_PROPERTY(QString format READ format WRITE setFormat RESET resetFormat)
0030
0031 public:
0032 enum Direction { TopToBottom, BottomToTop };
0033 Q_ENUM(Direction)
0034
0035 explicit QProgressBar(QWidget *parent = nullptr);
0036 ~QProgressBar();
0037
0038 int minimum() const;
0039 int maximum() const;
0040
0041 int value() const;
0042
0043 virtual QString text() const;
0044 void setTextVisible(bool visible);
0045 bool isTextVisible() const;
0046
0047 Qt::Alignment alignment() const;
0048 void setAlignment(Qt::Alignment alignment);
0049
0050 QSize sizeHint() const override;
0051 QSize minimumSizeHint() const override;
0052
0053 Qt::Orientation orientation() const;
0054
0055 void setInvertedAppearance(bool invert);
0056 bool invertedAppearance() const;
0057 void setTextDirection(QProgressBar::Direction textDirection);
0058 QProgressBar::Direction textDirection() const;
0059
0060 void setFormat(const QString &format);
0061 void resetFormat();
0062 QString format() const;
0063
0064 public Q_SLOTS:
0065 void reset();
0066 void setRange(int minimum, int maximum);
0067 void setMinimum(int minimum);
0068 void setMaximum(int maximum);
0069 void setValue(int value);
0070 void setOrientation(Qt::Orientation);
0071
0072 Q_SIGNALS:
0073 void valueChanged(int value);
0074
0075 protected:
0076 bool event(QEvent *e) override;
0077 void paintEvent(QPaintEvent *) override;
0078 virtual void initStyleOption(QStyleOptionProgressBar *option) const;
0079
0080 private:
0081 Q_DECLARE_PRIVATE(QProgressBar)
0082 Q_DISABLE_COPY(QProgressBar)
0083 };
0084
0085 QT_END_NAMESPACE
0086
0087 #endif