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
qquickcolordialog_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 QQUICKCOLORDIALOG_P_H
5#define QQUICKCOLORDIALOG_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
19
20#include <QtGui/qcolor.h>
21
23
24class Q_QUICKDIALOGS2_EXPORT QQuickColorDialog : public QQuickAbstractDialog
25{
27 Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor NOTIFY selectedColorChanged)
28 Q_PROPERTY(QColorDialogOptions::ColorDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged)
29 Q_FLAGS(QColorDialogOptions::ColorDialogOptions)
32
33public:
34 explicit QQuickColorDialog(QObject *parent = nullptr);
35
36 QColor selectedColor() const;
37 void setSelectedColor(const QColor &color);
38
39 QColorDialogOptions::ColorDialogOptions options() const;
40 void setOptions(QColorDialogOptions::ColorDialogOptions options);
41 void resetOptions();
42
44 void selectedColorChanged();
45 void optionsChanged();
46
47protected:
48 bool useNativeDialog() const override;
49 void onCreate(QPlatformDialogHelper *dialog) override;
50 void onShow(QPlatformDialogHelper *dialog) override;
51
53 QSharedPointer<QColorDialogOptions> m_options;
54 QColor m_selectedColor;
55};
56
58
59#endif // QQUICKCOLORDIALOG_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
\inmodule QtCore
Combined button and popup list for selecting options.
SharedPointerFileDialogOptions m_options
GLuint color
[2]
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_FLAGS(x)
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]