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
qquickcolordialogimpl_p_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
4#ifndef QQUICKCOLORDIALOGIMPL_P_P_H
5#define QQUICKCOLORDIALOGIMPL_P_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
20#include "qquickcolorinputs_p.h"
21
22#include <QtQuickTemplates2/private/qquickdialog_p_p.h>
23#include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h>
24#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
25#include <QtQuickTemplates2/private/qquickslider_p.h>
26
27#include <QtCore/qpointer.h>
28
30
32{
33public:
34 enum class LeaveReason { Default, Cancel };
35 explicit QQuickEyeDropperEventFilter(std::function<void(QPoint, LeaveReason)> callOnLeave,
36 std::function<void(QPoint)> callOnUpdate)
37 : m_leave(callOnLeave), m_update(callOnUpdate)
38 {
39 }
40
41protected:
42 bool eventFilter(QObject *obj, QEvent *event) override;
43
44private:
45 std::function<void(QPoint, LeaveReason)> m_leave;
46 std::function<void(QPoint)> m_update;
47 QPoint m_lastPosition;
48};
49
51{
52public:
54
55public:
58
60 {
61 return dialog->d_func();
62 }
63
65
67
68 void eyeDropperEnter();
71
72 void alphaSliderMoved();
73
74 QSharedPointer<QColorDialogOptions> options;
76 std::unique_ptr<QQuickEyeDropperEventFilter> eyeDropperEventFilter;
77 QPointer<QQuickWindow> m_eyeDropperWindow;
79 bool m_eyeDropperMode = false;
80 bool m_showAlpha = false;
81 bool m_hsl = false;
82};
83
85{
86public:
87 QPointer<QQuickDialogButtonBox> buttonBox;
88 QPointer<QQuickAbstractButton> eyeDropperButton;
89 QPointer<QQuickColorInputs> colorInputs;
90 QPointer<QQuickAbstractColorPicker> colorPicker;
91 QPointer<QQuickSlider> alphaSlider;
92
93 Q_DECLARE_PUBLIC(QQuickColorDialogImplAttached)
94};
95
97
98#endif // QQUICKCOLORDIALOGIMPL_P_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:25
QPointer< QQuickAbstractButton > eyeDropperButton
QPointer< QQuickDialogButtonBox > buttonBox
QPointer< QQuickAbstractColorPicker > colorPicker
std::unique_ptr< QQuickEyeDropperEventFilter > eyeDropperEventFilter
void eyeDropperLeave(const QPoint &pos, QQuickEyeDropperEventFilter::LeaveReason actionOnLeave)
Q_DECLARE_PUBLIC(QQuickColorDialogImpl)
void handleClick(QQuickAbstractButton *button) override
QSharedPointer< QColorDialogOptions > options
static QQuickColorDialogImplPrivate * get(QQuickColorDialogImpl *dialog)
QQuickColorDialogImplAttached * attachedOrWarn()
void eyeDropperPointerMoved(const QPoint &pos)
QPointer< QQuickWindow > m_eyeDropperWindow
QQuickEyeDropperEventFilter(std::function< void(QPoint, LeaveReason)> callOnLeave, std::function< void(QPoint)> callOnUpdate)
bool eventFilter(QObject *obj, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
QPushButton * button
[2]
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
struct _cl_event * event
GLhandleARB obj
[2]
QFileDialog dialog(this)
[1]