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
qquickbasicbusyindicator_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QQUICKDEFAULTBUSYINDICATOR_P_H
6#define QQUICKDEFAULTBUSYINDICATOR_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 <QtQuick/qquickitem.h>
20#include <QtGui/qcolor.h>
21#include <QtCore/private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QQuickBasicBusyIndicator : public QQuickItem
26{
27 Q_OBJECT
28 Q_PROPERTY(QColor pen READ pen WRITE setPen FINAL)
29 Q_PROPERTY(QColor fill READ fill WRITE setFill FINAL)
30 Q_PROPERTY(bool running READ isRunning WRITE setRunning)
31 QML_NAMED_ELEMENT(BusyIndicatorImpl)
32 QML_ADDED_IN_VERSION(2, 0)
33
34public:
35 explicit QQuickBasicBusyIndicator(QQuickItem *parent = nullptr);
36
37 QColor pen() const;
38 void setPen(const QColor &pen);
39
40 QColor fill() const;
41 void setFill(const QColor &fill);
42
43 bool isRunning() const;
44 void setRunning(bool running);
45
46 int elapsed() const;
47
48protected:
49 void itemChange(ItemChange change, const ItemChangeData &data) override;
50 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
51
52private:
53 bool m_running = false;
54 int m_elapsed = 0;
55 QColor m_pen;
56 QColor m_fill;
57};
58
60
61#endif // QQUICKDEFAULTBUSYINDICATOR_P_H
void sync(QQuickItem *item) override
void updateCurrentTime(int time) override
QQuickBasicBusyIndicatorNode(QQuickBasicBusyIndicator *item)
static const int QbbiTotalDuration
static QT_BEGIN_NAMESPACE const int CircleCount
static QPointF moveCircle(const QPointF &pos, qreal rotation, qreal distance)
static const QRgb TransparentColor