diff options
15 files changed, 201 insertions, 45 deletions
diff --git a/examples/quick/dialogs/ColorDialogs.qml b/examples/quick/dialogs/colorandfiledialogs/ColorDialogs.qml index f3d253aa8c..6a0af7f730 100644 --- a/examples/quick/dialogs/ColorDialogs.qml +++ b/examples/quick/dialogs/colorandfiledialogs/ColorDialogs.qml @@ -49,6 +49,7 @@ Rectangle { SystemPalette { id: palette } clip: true + //! [colordialog] ColorDialog { id: colorDialog visible: colorDialogVisible.checked @@ -59,6 +60,7 @@ Rectangle { onAccepted: { console.log("Accepted: " + color) } onRejected: { console.log("Rejected") } } + //! [colordialog] Column { anchors.fill: parent diff --git a/examples/quick/dialogs/FileDialogs.qml b/examples/quick/dialogs/colorandfiledialogs/FileDialogs.qml index 8ed64b0b3c..d1278609f9 100644 --- a/examples/quick/dialogs/FileDialogs.qml +++ b/examples/quick/dialogs/colorandfiledialogs/FileDialogs.qml @@ -49,6 +49,7 @@ Rectangle { SystemPalette { id: palette } clip: true + //! [filedialog] FileDialog { id: fileDialog visible: fileDialogVisible.checked @@ -63,6 +64,7 @@ Rectangle { onAccepted: { console.log("Accepted: " + fileUrls) } onRejected: { console.log("Rejected") } } + //! [filedialog] Column { anchors.fill: parent diff --git a/examples/quick/dialogs/colorandfiledialogs/colorandfiledialogs.pro b/examples/quick/dialogs/colorandfiledialogs/colorandfiledialogs.pro new file mode 100644 index 0000000000..3a7b25c91a --- /dev/null +++ b/examples/quick/dialogs/colorandfiledialogs/colorandfiledialogs.pro @@ -0,0 +1,17 @@ +TEMPLATE = app + +QT += quick qml +SOURCES += main.cpp +RESOURCES += colorandfiledialogs.qrc ../../shared/shared.qrc + +OTHER_FILES += \ + dialogs.qml \ + FileDialogs.qml \ + ColorDialogs.qml + +EXAMPLE_FILES = \ + FileDialogs.qml \ + ColorDialogs.qml + +target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs +INSTALLS += target diff --git a/examples/quick/dialogs/dialogs.qrc b/examples/quick/dialogs/colorandfiledialogs/colorandfiledialogs.qrc index efebfe4845..efebfe4845 100644 --- a/examples/quick/dialogs/dialogs.qrc +++ b/examples/quick/dialogs/colorandfiledialogs/colorandfiledialogs.qrc diff --git a/examples/quick/dialogs/dialogs.qml b/examples/quick/dialogs/colorandfiledialogs/dialogs.qml index b5f9841a3f..b5f9841a3f 100644 --- a/examples/quick/dialogs/dialogs.qml +++ b/examples/quick/dialogs/colorandfiledialogs/dialogs.qml diff --git a/examples/quick/dialogs/colorandfiledialogs/doc/images/qml-colorandfiledialogs-example.jpg b/examples/quick/dialogs/colorandfiledialogs/doc/images/qml-colorandfiledialogs-example.jpg Binary files differnew file mode 100644 index 0000000000..4517a39308 --- /dev/null +++ b/examples/quick/dialogs/colorandfiledialogs/doc/images/qml-colorandfiledialogs-example.jpg diff --git a/examples/quick/dialogs/colorandfiledialogs/doc/src/colorandfiledialogs.qdoc b/examples/quick/dialogs/colorandfiledialogs/doc/src/colorandfiledialogs.qdoc new file mode 100644 index 0000000000..e3d021dba8 --- /dev/null +++ b/examples/quick/dialogs/colorandfiledialogs/doc/src/colorandfiledialogs.qdoc @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/*! + \title Qt Quick ColorDialog and FileDialog Examples + \example colorandfiledialogs + \brief This example demonstrates the color and file dialog types in QML + \image qml-colorandfiledialogs-example.jpg + \ingroup qtquickdialog_examples + + This example demonstrates the color and file system dialogs in the \l{Qt Quick Dialogs} + module. The appearance and behavior is platform-dependent. + + A \l FileDialog is used to choose a single file, multiple files or a + single directory, depending on how it is configured. + \snippet dialogs/colorandfiledialogs/FileDialogs.qml filedialog + + A \l ColorDialog is used to choose a color, with or without alpha (transparency) + depending on how it is configured. + \snippet dialogs/colorandfiledialogs/ColorDialogs.qml colordialog +*/ diff --git a/examples/quick/dialogs/main.cpp b/examples/quick/dialogs/colorandfiledialogs/main.cpp index bbf0c48104..e8c2ae6aaa 100644 --- a/examples/quick/dialogs/main.cpp +++ b/examples/quick/dialogs/colorandfiledialogs/main.cpp @@ -37,5 +37,5 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "../shared/shared.h" +#include "../../shared/shared.h" DECLARATIVE_EXAMPLE_MAIN(dialogs/dialogs) diff --git a/examples/quick/dialogs/dialogs.pro b/examples/quick/dialogs/dialogs.pro index b76f396e9d..275e36470f 100644 --- a/examples/quick/dialogs/dialogs.pro +++ b/examples/quick/dialogs/dialogs.pro @@ -1,17 +1,4 @@ -TEMPLATE = app +TEMPLATE = subdirs -QT += quick qml -SOURCES += main.cpp -RESOURCES += dialogs.qrc ../shared/shared.qrc - -OTHER_FILES += \ - dialogs.qml \ - FileDialogs.qml \ - ColorDialogs.qml - -EXAMPLE_FILES = \ - FileDialogs.qml \ - ColorDialogs.qml - -target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs -INSTALLS += target +SUBDIRS = \ + colorandfiledialogs diff --git a/src/imports/dialogs/dialogs.pro b/src/imports/dialogs/dialogs.pro index b7704dadda..53cad30cee 100644 --- a/src/imports/dialogs/dialogs.pro +++ b/src/imports/dialogs/dialogs.pro @@ -3,6 +3,8 @@ TARGET = dialogplugin TARGETPATH = QtQuick/Dialogs IMPORT_VERSION = 1.0 +QMAKE_DOCS = $$PWD/doc/qtquickdialogs.qdocconf + SOURCES += \ qquickabstractfiledialog.cpp \ qquickplatformfiledialog.cpp \ diff --git a/src/imports/dialogs/doc/qtquickdialogs.qdocconf b/src/imports/dialogs/doc/qtquickdialogs.qdocconf new file mode 100644 index 0000000000..8a4435cd41 --- /dev/null +++ b/src/imports/dialogs/doc/qtquickdialogs.qdocconf @@ -0,0 +1,35 @@ +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QtQuickDialogs +description = Qt Quick Dialogs Reference Documentation +url = http://qt-project.org/doc/qt-$QT_VER/qtquickdialogs/ +version = $QT_VERSION + +qhp.projects = qtquickdialogs + +qhp.qtquickdialogs.file = qtquickdialogs.qhp +qhp.qtquickdialogs.namespace = org.qt-project.qtquickdialogs.$QT_VERSION_TAG +qhp.qtquickdialogs.virtualFolder = qtquickdialogs +qhp.qtquickdialogs.indexTitle = Qt Quick Dialogs +qhp.qtquickdialogs.indexRoot = + +qhp.qtquickdialogs.filterAttributes = qtquickdialogs $QT_VERSION qtrefdoc +qhp.qtquickdialogs.customFilters.Qt.name = QtQuickDialogs $QT_VERSION +qhp.qtquickdialogs.customFilters.Qt.filterAttributes = qtquickdialogs $QT_VERSION + +qhp.qtquickdialogs.subprojects = qtquickdialogsqmltypes +qhp.qtquickdialogs.subprojects.qtquickdialogsqmltypes.title = QML Types +qhp.qtquickdialogs.subprojects.qtquickdialogsqmltypes.indexTitle = Qt Quick Dialogs +qhp.qtquickdialogs.subprojects.qtquickdialogsqmltypes.selectors = class fake:headerfile +qhp.qtquickdialogs.subprojects.qtquickdialogsqmltypes.sortPages = true +qhp.qtquickdialogs.subprojects.qtquickdialogsqmltypes.type = manual + +depends = qtqml qtquick qtgui qtwidgets qtdoc + +exampledirs += ../../../../examples/quick/ + +headerdirs += ../ + +sourcedirs += ../ + +imagedirs += images diff --git a/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc b/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc new file mode 100644 index 0000000000..ee277f48dc --- /dev/null +++ b/src/imports/dialogs/doc/src/qtquickdialogs-examples.qdoc @@ -0,0 +1,36 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \group qtquickdialog_examples + \ingroup qtquickexamples + \title Qt Quick Examples - Dialogs + \brief A Collection of examples for \l{Qt Quick Dialogs}, written in QML. + + These examples show how to use the \l{Qt Quick Dialogs}. +*/ + diff --git a/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc b/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc new file mode 100644 index 0000000000..5a1223b04d --- /dev/null +++ b/src/imports/dialogs/doc/src/qtquickdialogs-index.qdoc @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \group dialogs + \title Dialogs +*/ + +/*! + \page qtquickdialogs-index.html + \title Qt Quick Dialogs + + \brief Qt Quick Dialogs submodule + + The module is new in Qt 5.1. + + \section1 Dialogs + + \annotatedlist dialogs + + \section1 Related information + + \section2 Examples + \list + \li \l{Qt Quick Examples - Dialogs}{Dialogs Examples} + \endlist + + \section2 Reference + \list + \li \l{Qt Quick Dialogs QML Types}{QML Types} + \endlist + +*/ + diff --git a/src/imports/dialogs/plugin.cpp b/src/imports/dialogs/plugin.cpp index bee0ee00bc..5502a65310 100644 --- a/src/imports/dialogs/plugin.cpp +++ b/src/imports/dialogs/plugin.cpp @@ -55,33 +55,6 @@ QT_BEGIN_NAMESPACE - -/*! - \group dialogs - \title Dialogs -*/ - -/*! - \page qtquickdialogs-index.html - \title Qt Quick Dialogs - - \brief Qt Quick Dialogs submodule - - The submodule is new in Qt 5.1. - - \section1 Dialogs - - \annotatedlist dialogs - - \section1 Related information - - \section2 Reference - \list - \li \l{Qt Quick Dialogs QML Types}{Qt Quick Dialogs QML Types} - \endlist - -*/ - /*! \qmlmodule QtQuick.Dialogs 1 \title Qt Quick Dialogs QML Types diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc index 7163baa819..0a4d276cb8 100644 --- a/src/quick/doc/src/qtquick.qdoc +++ b/src/quick/doc/src/qtquick.qdoc @@ -125,7 +125,7 @@ Additional Qt Quick information: system for Qt Quick \li \l{QtQuick.Window 2}{Window} - contains types for creating top-level windows and accessing screen information - \li \l{QtQuick.Dialogs 1}{Dialogs} - contains types for creating and + \li \l{Qt Quick Dialogs}{Dialogs} - contains types for creating and interacting with system dialogs \endlist \li \l{Qt Quick Release Notes} - list of changes and additions in the Qt Quick |