DtkDeclarative
DTK Declarative module
载入中...
搜索中...
未找到
dquickapploaderitem_p.h
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DQUICKAPPLOADERITEM_H
6#define DQUICKAPPLOADERITEM_H
7
8#include <dtkdeclarative_global.h>
9
10#include <DObject>
11#include <QQuickItem>
12
13DQUICK_BEGIN_NAMESPACE
14class DQuickAppLoaderItemPrivate;
15class DQuickAppLoaderItem : public QQuickItem, public DCORE_NAMESPACE::DObject
16{
17 Q_OBJECT
18 D_DECLARE_PRIVATE(DQuickAppLoaderItem)
19 Q_PROPERTY(QQuickWindow *window READ window NOTIFY windowChanged)
20 Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
21 Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
22 Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged)
23#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
24 QML_NAMED_ELEMENT(AppLoader)
25#endif
26
27public:
28 explicit DQuickAppLoaderItem(QQuickItem *parentItem = nullptr);
29
30 bool loaded() const;
31 void setLoaded(bool loaded);
32
33 qreal progress() const;
34 void setProgress(qreal progress);
35
36 QQuickWindow *window() const;
37 void setWindow(QQuickWindow *w);
38
39 bool asynchronous() const;
40 void setAsynchronous(bool a);
41Q_SIGNALS:
42 void loadedChanged();
43 void progressChanged();
44 void windowChanged();
45 void asynchronousChanged();
46};
47
48DQUICK_END_NAMESPACE
49#endif // DQUICKAPPLOADERITEM_H
Definition dquickapploaderitem_p.h:16