Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qprogressdialog.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPROGRESSDIALOG_H
5#define QPROGRESSDIALOG_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8
9#include <QtWidgets/qdialog.h>
10
11QT_REQUIRE_CONFIG(progressdialog);
12
14
15class QPushButton;
16class QLabel;
17class QProgressBar;
18class QTimer;
20
21class Q_WIDGETS_EXPORT QProgressDialog : public QDialog
22{
24 Q_DECLARE_PRIVATE(QProgressDialog)
25 Q_PROPERTY(bool wasCanceled READ wasCanceled)
26 Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
27 Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
29 Q_PROPERTY(bool autoReset READ autoReset WRITE setAutoReset)
30 Q_PROPERTY(bool autoClose READ autoClose WRITE setAutoClose)
31 Q_PROPERTY(int minimumDuration READ minimumDuration WRITE setMinimumDuration)
32 Q_PROPERTY(QString labelText READ labelText WRITE setLabelText)
33
34public:
35 explicit QProgressDialog(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
36 QProgressDialog(const QString &labelText, const QString &cancelButtonText,
37 int minimum, int maximum, QWidget *parent = nullptr,
38 Qt::WindowFlags flags = Qt::WindowFlags());
40
41 void setLabel(QLabel *label);
42 void setCancelButton(QPushButton *button);
43 void setBar(QProgressBar *bar);
44
45 bool wasCanceled() const;
46
47 int minimum() const;
48 int maximum() const;
49
50 int value() const;
51
52 QSize sizeHint() const override;
53
54 QString labelText() const;
55 int minimumDuration() const;
56
57 void setAutoReset(bool reset);
58 bool autoReset() const;
59 void setAutoClose(bool close);
60 bool autoClose() const;
61
62 using QDialog::open;
63 void open(QObject *receiver, const char *member);
64
65public Q_SLOTS:
66 void cancel();
67 void reset();
68 void setMaximum(int maximum);
69 void setMinimum(int minimum);
70 void setRange(int minimum, int maximum);
71 void setValue(int progress);
72 void setLabelText(const QString &text);
73 void setCancelButtonText(const QString &text);
74 void setMinimumDuration(int ms);
75
77 void canceled();
78
79protected:
80 void resizeEvent(QResizeEvent *event) override;
81 void closeEvent(QCloseEvent *event) override;
82 void changeEvent(QEvent *event) override;
83 void showEvent(QShowEvent *event) override;
84
85protected Q_SLOTS:
86 void forceShow();
87
89 Q_DISABLE_COPY(QProgressDialog)
90
91 Q_PRIVATE_SLOT(d_func(), void _q_disconnectOnClose())
92};
93
95
96#endif // QPROGRESSDIALOG_H
The QCloseEvent class contains parameters that describe a close event.
Definition qevent.h:562
The QDialog class is the base class of dialog windows.
Definition qdialog.h:19
\inmodule QtCore
Definition qcoreevent.h:45
The QLabel widget provides a text or image display.
Definition qlabel.h:20
\inmodule QtCore
Definition qobject.h:103
The QProgressBar widget provides a horizontal or vertical progress bar.
The QProgressDialog class provides feedback on the progress of a slow operation.
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
The QShowEvent class provides an event that is sent when a widget is shown.
Definition qevent.h:578
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtimer.h:20
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QString text
QPushButton * button
[2]
Combined button and popup list for selecting options.
Definition qcompare.h:63
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint GLsizei const GLchar * label
[43]
GLbitfield flags
struct _cl_event * event
GLboolean reset
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
#define explicit
future cancel()
file open(QIODevice::ReadOnly)
settings setValue("DataPump/bgcolor", color)
progressBar setRange(0, 100)
setMaximum(maximum)
setMinimum(minimum)
[2]