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
qquicknativeiconloader_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKNATIVEICONLOADER_P_H
6#define QQUICKNATIVEICONLOADER_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 <QtCore/qurl.h>
20#include <QtCore/qstring.h>
21#include <QtGui/qicon.h>
22#include <QtQuick/private/qquickpixmap_p.h>
23#include <QtQuickTemplates2/private/qquickicon_p.h>
24
26
28
29class QObject;
30class QQmlEngine;
31
33{
34public:
35 QQuickNativeIconLoader(int slot, QObject *parent, QQmlEngine *engine);
36
37 bool isEnabled() const;
38 void setEnabled(bool enabled);
39
40 QIcon toQIcon() const;
41
42 QQuickIcon icon() const;
43 void setIcon(const QQuickIcon &icon);
44
45private:
46 void loadIcon();
47
48 QObject *m_parent;
49 QQmlEngine *m_engine;
50 int m_slot;
51 bool m_enabled;
52 QQuickIcon m_icon;
53};
54
55QT_END_NAMESPACE
56
57#endif // QQUICKNATIVEICONLOADER_P_H
void setIcon(const QQuickIcon &icon)
QQuickNativeIconLoader(int slot, QObject *parent, QQmlEngine *engine)
Combined button and popup list for selecting options.