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
qquicksaturationlightnesspicker_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKSATURATIONLIGHTNESSPICKER_P_H
6#define QQUICKSATURATIONLIGHTNESSPICKER_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
21
23
25
26class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickSaturationLightnessPickerCanvas : public QQuickItem
27{
28 Q_OBJECT
29 QML_NAMED_ELEMENT(SaturationLightnessPickerCanvas)
30 Q_PROPERTY(qreal hue READ hue WRITE setHue NOTIFY hueChanged FINAL)
31
32public:
33 QQuickSaturationLightnessPickerCanvas(QQuickItem *parent = nullptr);
34
35 qreal hue() const { return m_hue; }
36 void setHue(qreal h);
37
38signals:
39 void hueChanged();
40
41protected:
42 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
43
44private:
45 qreal m_hue;
46 QImage m_image;
47 QSizeF m_lastSize;
48
49 QImage generateImage(int width, int height, double hue01) const;
50};
51
52class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickSaturationLightnessPicker
53 : public QQuickAbstractColorPicker
54{
55 Q_OBJECT
56 QML_NAMED_ELEMENT(SaturationLightnessPickerImpl)
57
58public:
59 explicit QQuickSaturationLightnessPicker(QQuickItem *parent = nullptr);
60
61protected:
62 QColor colorAt(const QPointF &pos) override;
63
64private:
65 Q_DISABLE_COPY(QQuickSaturationLightnessPicker)
66 Q_DECLARE_PRIVATE(QQuickSaturationLightnessPicker)
67};
68
69QT_END_NAMESPACE
70
71#endif // QQUICKSATURATIONLIGHTNESSPICKER_P_H
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
Combined button and popup list for selecting options.