Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickcolorimage_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 QQUICKCOLORIMAGE_P_H
5#define QQUICKCOLORIMAGE_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 <QtGui/qcolor.h>
19#include <QtQuick/private/qquickimage_p.h>
20#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
21
23
24class Q_QUICKCONTROLS2IMPL_PRIVATE_EXPORT QQuickColorImage : public QQuickImage
25{
27 Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor NOTIFY colorChanged FINAL)
28 Q_PROPERTY(QColor defaultColor READ defaultColor WRITE setDefaultColor RESET resetDefaultColor NOTIFY defaultColorChanged FINAL)
29 QML_NAMED_ELEMENT(ColorImage)
31
32public:
33 explicit QQuickColorImage(QQuickItem *parent = nullptr);
34
35 QColor color() const;
36 void setColor(const QColor &color);
37 void resetColor();
38
39 QColor defaultColor() const;
40 void setDefaultColor(const QColor &color);
41 void resetDefaultColor();
42
46
47protected:
48 void pixmapChange() override;
49
50private:
51 QColor m_color = Qt::transparent;
52 QColor m_defaultColor = Qt::transparent;
53};
54
56
57#endif // QQUICKCOLORIMAGE_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
void defaultColorChanged()
void pixmapChange() override
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
void colorChanged()
Combined button and popup list for selecting options.
@ transparent
Definition qnamespace.h:46
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
myFilter setColor(QColor(128, 0, 0))
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent