1 | // Copyright (C) 2023 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 QQUICKNATIVEICONLOADER_P_H |
5 | #define QQUICKNATIVEICONLOADER_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 <QtCore/qurl.h> |
19 | #include <QtCore/qstring.h> |
20 | #include <QtGui/qicon.h> |
21 | #include <QtQuick/private/qquickpixmap_p.h> |
22 | #include <QtQuickTemplates2/private/qquickicon_p.h> |
23 | |
24 | #include "qquicknativeicon_p.h" |
25 | |
26 | QT_BEGIN_NAMESPACE |
27 | |
28 | class QObject; |
29 | |
30 | class QQuickNativeIconLoader : public QQuickPixmap |
31 | { |
32 | public: |
33 | QQuickNativeIconLoader(int slot, QObject *parent); |
34 | |
35 | bool isEnabled() const; |
36 | void setEnabled(bool enabled); |
37 | |
38 | QIcon toQIcon() const; |
39 | |
40 | QQuickIcon icon() const; |
41 | void setIcon(const QQuickIcon &icon); |
42 | |
43 | private: |
44 | void loadIcon(); |
45 | |
46 | QObject *m_parent; |
47 | int m_slot; |
48 | bool m_enabled; |
49 | QQuickIcon m_icon; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif // QQUICKNATIVEICONLOADER_P_H |
55 |
Definitions
Learn Advanced QML with KDAB
Find out more