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
qquicklabsplatformcolordialog_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 QQUICKLABSPLATFORMCOLORDIALOG_P_H
5#define QQUICKLABSPLATFORMCOLORDIALOG_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#include <QtGui/qcolor.h>
20#include <QtQml/qqml.h>
21
23
25{
28 QML_EXTENDED_NAMESPACE(QColorDialogOptions)
31 Q_PROPERTY(QColorDialogOptions::ColorDialogOptions options READ options WRITE setOptions NOTIFY optionsChanged FINAL)
32
33public:
35
36 QColor color() const;
37 void setColor(const QColor &color);
38
39 QColor currentColor() const;
40 void setCurrentColor(const QColor &color);
41
42 QColorDialogOptions::ColorDialogOptions options() const;
43 void setOptions(QColorDialogOptions::ColorDialogOptions options);
44
49
50protected:
51 bool useNativeDialog() const override;
53 void onShow(QPlatformDialogHelper *dialog) override;
54 void accept() override;
55
57 QColor m_color;
58 QColor m_currentColor; // TODO: QColorDialogOptions::initialColor
59 QSharedPointer<QColorDialogOptions> m_options;
60};
61
63
64#endif // QQUICKLABSPLATFORMCOLORDIALOG_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
QColorDialogOptions::ColorDialogOptions options
void accept() override
\qmlmethod void Qt.labs.platform::Dialog::accept()
void onCreate(QPlatformDialogHelper *dialog) override
void onShow(QPlatformDialogHelper *dialog) override
void setOptions(QColorDialogOptions::ColorDialogOptions options)
\inmodule QtCore
Combined button and popup list for selecting options.
GLuint color
[2]
#define QML_NAMED_ELEMENT(NAME)
#define QML_EXTENDED_NAMESPACE(EXTENDED_NAMESPACE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit
QFileDialog dialog(this)
[1]