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 QQUICKLABSPLATFORMICONLOADER_P_H
5#define QQUICKLABSPLATFORMICONLOADER_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/qquickpixmapcache_p.h>
22
23#include "qquicklabsplatformicon_p.h"
24
25QT_BEGIN_NAMESPACE
26
27class QObject;
28
29class QQuickLabsPlatformIconLoader : public QQuickPixmap
30{
31public:
32 QQuickLabsPlatformIconLoader(int slot, QObject *parent);
33
34 bool isEnabled() const;
35 void setEnabled(bool enabled);
36
37 QIcon toQIcon() const;
38
39 QQuickLabsPlatformIcon icon() const;
40 void setIcon(const QQuickLabsPlatformIcon &icon);
41
42private:
43 void loadIcon();
44
45 QObject *m_parent;
46 int m_slot;
47 bool m_enabled;
48 QQuickLabsPlatformIcon m_icon;
49};
50
51QT_END_NAMESPACE
52
53#endif // QQUICKLABSPLATFORMICONLOADER_P_H
54

source code of qtdeclarative/src/labs/platform/qquicklabsplatformiconloader_p.h