Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickicon_p.h
Go to the documentation of this file.
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 QQUICKICON_P_H
5#define QQUICKICON_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 <QtCore/qobjectdefs.h>
21#include <QtCore/qshareddata.h>
22#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
23#include <QtGui/qcolor.h>
24#include <QtQml/qqml.h>
25
27
29
30class Q_QUICKTEMPLATES2_EXPORT QQuickIcon
31{
33 Q_PROPERTY(QString name READ name WRITE setName RESET resetName FINAL)
34 Q_PROPERTY(QUrl source READ source WRITE setSource RESET resetSource FINAL)
35 Q_PROPERTY(int width READ width WRITE setWidth RESET resetWidth FINAL)
36 Q_PROPERTY(int height READ height WRITE setHeight RESET resetHeight FINAL)
37 Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor FINAL)
38 Q_PROPERTY(bool cache READ cache WRITE setCache RESET resetCache FINAL)
41
42public:
43 QQuickIcon();
45 ~QQuickIcon();
46
47 QQuickIcon& operator=(const QQuickIcon &other);
48 bool operator==(const QQuickIcon &other) const;
49 bool operator!=(const QQuickIcon &other) const;
50
51 bool isEmpty() const;
52
53 QString name() const;
54 void setName(const QString &name);
55 void resetName();
56
57 QUrl source() const;
58 void setSource(const QUrl &source);
59 void resetSource();
60 QUrl resolvedSource() const;
61 void ensureRelativeSourceResolved(const QObject *owner);
62
63 int width() const;
64 void setWidth(int width);
65 void resetWidth();
66
67 int height() const;
68 void setHeight(int height);
69 void resetHeight();
70
71 QColor color() const;
72 void setColor(const QColor &color);
73 void resetColor();
74
75 bool cache() const;
76 void setCache(bool cache);
77 void resetCache();
78
79 QQuickIcon resolve(const QQuickIcon &other) const;
80
83};
84
86
87#endif // QQUICKICON_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
employee setName("Richard Schmit")
QCache< int, Employee > cache
[0]
Combined button and popup list for selecting options.
GLint GLsizei GLsizei height
GLint GLsizei width
GLuint color
[2]
GLuint name
GLsizei GLsizei GLchar * source
#define QML_ANONYMOUS
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static const QQmlJSScope * resolve(const QQmlJSScope *current, const QStringList &names)
#define Q_PROPERTY(...)
#define Q_GADGET
QSharedPointer< T > other(t)
[5]
myFilter setColor(QColor(128, 0, 0))
manager setCache(diskCache)