aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/dialogs/qquickcolordialog_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-03-11 11:05:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-18 13:44:38 +0100
commit69186a08270a9c585b19a5140a5fcf52e2bf5bc3 (patch)
treea2d80d8c17a567d9f81ca2216bf37d7e05f874e4 /src/imports/dialogs/qquickcolordialog_p.h
parent7fded5040f56b8def7a93fcce03f93f06bcc6bc4 (diff)
Add ColorDialog to QtQuick.Dialogs
As with FileDialog, it tries QPA, then QColorDialog, and falls back to a QML implementation (which is also provided here) if neither type of native dialog is available. Change-Id: I384928e1f7322bb6b867d4618d07c88c70e3cbfe Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/imports/dialogs/qquickcolordialog_p.h')
-rw-r--r--src/imports/dialogs/qquickcolordialog_p.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/imports/dialogs/qquickcolordialog_p.h b/src/imports/dialogs/qquickcolordialog_p.h
new file mode 100644
index 0000000000..ff6953fc0f
--- /dev/null
+++ b/src/imports/dialogs/qquickcolordialog_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQuick.Dialogs module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKCOLORDIALOG_P_H
+#define QQUICKCOLORDIALOG_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qquickabstractcolordialog_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QQuickColorDialog : public QQuickAbstractColorDialog
+{
+ Q_OBJECT
+ Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "implementation") // AbstractColorDialog in QML can have only one child
+
+public:
+ explicit QQuickColorDialog(QObject *parent = 0);
+ ~QQuickColorDialog();
+
+protected:
+ virtual QPlatformColorDialogHelper *helper() { return 0; }
+
+ Q_DISABLE_COPY(QQuickColorDialog)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QQuickColorDialog *)
+
+#endif // QQUICKCOLORDIALOG_P_H