Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickprogressbar_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPROGRESSBAR_P_H
6#define QQUICKPROGRESSBAR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickcontrol_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickProgressBarPrivate;
24
25class Q_QUICKTEMPLATES2_EXPORT QQuickProgressBar : public QQuickControl
26{
27 Q_OBJECT
28 Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL)
29 Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL)
30 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL)
31 Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL)
32 Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
33 Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate NOTIFY indeterminateChanged FINAL)
34 QML_NAMED_ELEMENT(ProgressBar)
35 QML_ADDED_IN_VERSION(2, 0)
36
37public:
38 explicit QQuickProgressBar(QQuickItem *parent = nullptr);
39
40 qreal from() const;
41 void setFrom(qreal from);
42
43 qreal to() const;
44 void setTo(qreal to);
45
46 qreal value() const;
47 void setValue(qreal value);
48
49 qreal position() const;
50 qreal visualPosition() const;
51
52 bool isIndeterminate() const;
53 void setIndeterminate(bool indeterminate);
54
55Q_SIGNALS:
56 void fromChanged();
57 void toChanged();
58 void valueChanged();
59 void positionChanged();
60 void visualPositionChanged();
61 void indeterminateChanged();
62
63protected:
64 void mirrorChange() override;
65 void componentComplete() override;
66
67#if QT_CONFIG(accessibility)
68 QAccessible::Role accessibleRole() const override;
69#endif
70
71private:
72 Q_DISABLE_COPY(QQuickProgressBar)
73 Q_DECLARE_PRIVATE(QQuickProgressBar)
74};
75
76QT_END_NAMESPACE
77
78#endif // QQUICKPROGRESSBAR_P_H
Indicates the progress of an operation.