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
qquickicon_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QQUICKICON_P_P_H
6#define QQUICKICON_P_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/qshareddata.h>
20#include <QtCore/qstring.h>
21#include <QtCore/qurl.h>
22#include <QtGui/qcolor.h>
23#include <QtQuickTemplates2/qtquicktemplates2exports.h>
24
26
27class QQuickIcon;
28
29class Q_QUICKTEMPLATES2_EXPORT QQuickIconPrivate : public QSharedData
30{
31public:
32 static bool isResolved(const QQuickIcon &icon, int resolveMask);
33 static void setResolved(QQuickIcon &icon, int resolveMask);
34 static void clearResolved(QQuickIcon &icon, int resolveMask);
35
36 // This is based on QFont's resolve_mask.
37 enum ResolveProperties {
38 NameResolved = 0x0001,
39 SourceResolved = 0x0002,
40 WidthResolved = 0x0004,
41 HeightResolved = 0x0008,
42 ColorResolved = 0x0010,
43 CacheResolved = 0x0020,
44 /*
45 Set on AbstractButton's effective icon when its color is inherited:
46 taken from its Action's explicitly set icon color because no
47 color was set on the button's own icon.
48
49 QQuickIconLabel treats it like ColorResolved, so that the
50 Action's color wins over the style's default icon color.
51 QQuickIcon::resolve() ignores it; otherwise writing the
52 effective icon back to the button (e.g. by setting icon.width)
53 would make the button treat the Action's color as its own.
54 */
55 InheritedColorResolved = 0x0040,
56 AllPropertiesResolved = 0x1ffff
57 };
58 int resolveMask = 0;
59
60 QString name;
61 QUrl source;
62 QUrl resolvedSource;
63 int width = 0;
64 int height = 0;
65 QColor color = Qt::transparent;
66 bool cache = true;
67};
68
69QT_END_NAMESPACE
70
71#endif // QQUICKICON_P_P_H
Groups actions together.
bool handleShortcutEvent(QObject *object, QShortcutEvent *event)
bool trigger(QObject *, bool doToggle)
void itemDestroyed(QQuickItem *item) override
void registerItem(QQuickItem *item)
bool watchItem(QQuickItem *item)
QQuickActionGroup * group
void itemVisibilityChanged(QQuickItem *item) override
bool unwatchItem(QQuickItem *item)
void unregisterItem(QQuickItem *item)
Mutually-exclusive group of checkable buttons.
Combined button and popup list for selecting options.
Q_QUICKTEMPLATES2_EXPORT void completeDeferred(QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate, QQmlEngine *engine=nullptr)
Q_QUICKTEMPLATES2_EXPORT void beginDeferred(QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate, bool isOwnState, QQmlEngine *engine=nullptr)
Q_QUICKTEMPLATES2_EXPORT void cancelDeferred(QObject *object, const QString &property)
void quickBeginAttachedDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate, QQmlEngine *engine)
void quickCancelDeferred(QObject *object, const QString &property)
void quickCompleteDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)
void quickCompleteAttachedDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate, QQmlEngine *engine)
void quickBeginDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)