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

source code of qtdeclarative/src/quicktemplates/qquickprogressbar_p.h