diff options
Diffstat (limited to 'src/imports')
30 files changed, 868 insertions, 305 deletions
diff --git a/src/imports/dialogs/DefaultColorDialog.qml b/src/imports/dialogs/DefaultColorDialog.qml index 7322aa18e7..8636259957 100644 --- a/src/imports/dialogs/DefaultColorDialog.qml +++ b/src/imports/dialogs/DefaultColorDialog.qml @@ -39,6 +39,7 @@ *****************************************************************************/ import QtQuick 2.1 +import QtQuick.Window 2.1 import QtQuick.Dialogs 1.0 import "qml" @@ -47,14 +48,17 @@ AbstractColorDialog { Rectangle { id: content - width: 320 - height: (usePaletteMap ? width : 0) + bottomMinHeight + property int maxSize: 0.9 * Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight) + implicitHeight: Math.max(maxSize, Screen.logicalPixelDensity * (usePaletteMap ? 10 : 5)) + implicitWidth: usePaletteMap ? implicitHeight - bottomMinHeight : implicitHeight * 1.5 color: palette.window property real bottomMinHeight: sliders.height + buttonRow.height + outerSpacing * 3 property real spacing: 8 property real outerSpacing: 12 property bool usePaletteMap: true - property bool inited: false + + // set the preferred width based on height, to avoid "letterboxing" the paletteMap + onHeightChanged: implicitHeight = Math.max((usePaletteMap ? 480 : bottomMinHeight), height) SystemPalette { id: palette } diff --git a/src/imports/dialogs/DefaultFileDialog.qml b/src/imports/dialogs/DefaultFileDialog.qml index 5542e59cb5..2cdb34cc03 100644 --- a/src/imports/dialogs/DefaultFileDialog.qml +++ b/src/imports/dialogs/DefaultFileDialog.qml @@ -40,6 +40,7 @@ import QtQuick 2.1 import QtQuick.Dialogs 1.0 +import QtQuick.Window 2.1 import Qt.labs.folderlistmodel 2.0 import "qml" @@ -52,13 +53,13 @@ AbstractFileDialog { currentPathField.visible = false } } + onFolderChanged: view.model.folder = folder property bool showFocusHighlight: false - property real textX: 28 + property real textX: titleBar.height property SystemPalette palette property var selectedIndices: [] property int lastClickedIdx: -1 - folder: urlToPath(view.model.folder) function dirDown(path) { view.model.folder = path @@ -106,10 +107,11 @@ AbstractFileDialog { selectedIndices.map(function(idx) { if (view.model.isFolder(idx)) { if (selectFolder) - addSelection(view.model.get(idx, "filePath")) + // TODO after QTBUG-32039: should not need to convert pathToUrl here + addSelection(pathToUrl(view.model.get(idx, "filePath"))) } else { if (!selectFolder) - addSelection(view.model.get(idx, "filePath")) + addSelection(pathToUrl(view.model.get(idx, "filePath"))) } }) } @@ -117,11 +119,12 @@ AbstractFileDialog { } Rectangle { - width: 480 // TODO: QTBUG-29817 geometry from AbstractFileDialog - height: 320 + property int maxSize: Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight) + // TODO: QTBUG-29817 geometry from AbstractFileDialog + implicitWidth: Math.min(maxSize, Screen.logicalPixelDensity * 100) + implicitHeight: Math.min(maxSize, Screen.logicalPixelDensity * 80) id: window color: palette.window - anchors.centerIn: Qt.application.supportsMultipleWindows ? null : parent SystemPalette { id: palette } @@ -209,7 +212,12 @@ AbstractFileDialog { clip: true x: 0 width: parent.width - model: FolderListModel { } + model: FolderListModel { + onFolderChanged: { + root.folder = folder + currentPathField.text = root.urlToPath(view.model.folder) + } + } delegate: folderDelegate highlight: Rectangle { color: "transparent" @@ -303,10 +311,9 @@ AbstractFileDialog { anchors.leftMargin: textX; anchors.rightMargin: 4 visible: false focus: visible - text: root.urlToPath(view.model.folder) onAccepted: { root.clearSelection() - if (root.addSelection(text)) + if (root.addSelection(root.pathToUrl(text))) root.accept() else view.model.folder = root.pathFolder(text) diff --git a/src/imports/dialogs/dialogs.pro b/src/imports/dialogs/dialogs.pro index b7704dadda..e745d52e2b 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 \ @@ -29,6 +31,7 @@ QML_FILES += \ WidgetColorDialog.qml \ qml/Button.qml \ qml/ColorSlider.qml \ + qml/DefaultWindowDecoration.qml \ qml/TextField.qml \ qml/qmldir \ images/checkers.png \ @@ -36,6 +39,7 @@ QML_FILES += \ images/crosshairs.png \ images/slider_handle.png \ images/sunken_frame.png \ + images/window_border.png \ images/folder.png \ images/up.png diff --git a/src/imports/dialogs/doc/qtquickdialogs.qdocconf b/src/imports/dialogs/doc/qtquickdialogs.qdocconf new file mode 100644 index 0000000000..34f19b5ff3 --- /dev/null +++ b/src/imports/dialogs/doc/qtquickdialogs.qdocconf @@ -0,0 +1,36 @@ +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 QML Types +qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.selectors = fake:qmlclass +qhp.QtQuickDialogs.subprojects.qtquickdialogsqmltypes.sortPages = true + +depends = qtqml qtquick qtgui qtwidgets qtdoc + +exampledirs += ../../../../examples/quick/dialogs + +examplesinstallpath = quick/dialogs + +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/images/window_border.png b/src/imports/dialogs/images/window_border.png Binary files differnew file mode 100644 index 0000000000..431af8545d --- /dev/null +++ b/src/imports/dialogs/images/window_border.png diff --git a/src/imports/dialogs/plugin.cpp b/src/imports/dialogs/plugin.cpp index 67653e5965..8d1501cd03 100644 --- a/src/imports/dialogs/plugin.cpp +++ b/src/imports/dialogs/plugin.cpp @@ -48,6 +48,7 @@ #include "qquickabstractcolordialog_p.h" #include "qquickplatformcolordialog_p.h" #include <private/qguiapplication_p.h> +#include <qpa/qplatformintegration.h> //#define PURE_QML_ONLY @@ -57,7 +58,7 @@ QT_BEGIN_NAMESPACE /*! \qmlmodule QtQuick.Dialogs 1 - \title Qt Quick Dialog QML Types + \title Qt Quick Dialogs QML Types \ingroup qmlmodules \brief Provides QML types for standard file, color picker and message dialogs @@ -78,9 +79,18 @@ class QtQuick2DialogsPlugin : public QQmlExtensionPlugin public: QtQuick2DialogsPlugin() : QQmlExtensionPlugin() { } + virtual void initializeEngine(QQmlEngine *engine, const char *uri) { + //qDebug() << Q_FUNC_INFO << uri << m_decorationComponentUrl; + QQuickAbstractDialog::m_decorationComponent = + new QQmlComponent(engine, m_decorationComponentUrl, QQmlComponent::Asynchronous); + } + virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Dialogs")); + bool hasTopLevelWindows = QGuiApplicationPrivate::platformIntegration()-> + hasCapability(QPlatformIntegration::MultipleWindows); QDir qmlDir(baseUrl().toLocalFile()); + m_decorationComponentUrl = QUrl::fromLocalFile(qmlDir.filePath(QString("qml/DefaultWindowDecoration.qml"))); QDir widgetsDir(baseUrl().toLocalFile()); // TODO: find the directory by searching rather than assuming a relative path widgetsDir.cd("../PrivateWidgets"); @@ -96,8 +106,7 @@ public: qmlRegisterType<QQuickPlatformFileDialog>(uri, DIALOGS_MAJOR_MINOR, "FileDialog"); else #endif - registerWidgetOrQmlImplementation<QQuickFileDialog>(widgetsDir, "WidgetFileDialog.qml", - qmlDir, "DefaultFileDialog.qml", "FileDialog", uri); + registerWidgetOrQmlImplementation<QQuickFileDialog>(widgetsDir, qmlDir, "FileDialog", uri, hasTopLevelWindows); // ColorDialog #ifndef PURE_QML_ONLY @@ -105,35 +114,37 @@ public: qmlRegisterType<QQuickPlatformColorDialog>(uri, DIALOGS_MAJOR_MINOR, "ColorDialog"); else #endif - registerWidgetOrQmlImplementation<QQuickColorDialog>(widgetsDir, "WidgetColorDialog.qml", - qmlDir, "DefaultColorDialog.qml", "ColorDialog", uri); + registerWidgetOrQmlImplementation<QQuickColorDialog>(widgetsDir, qmlDir, "ColorDialog", uri, hasTopLevelWindows); } protected: template <class WrapperType> - void registerWidgetOrQmlImplementation(QDir widgetsDir, QString widgetQmlFile, - QDir qmlDir, QString qmlFile, const char *qmlName, const char *uri) { + void registerWidgetOrQmlImplementation(QDir widgetsDir, QDir qmlDir, + const char *qmlName, const char *uri, bool hasTopLevelWindows) { + //qDebug() << Q_FUNC_INFO << qmlDir << qmlName << uri; bool needQml = true; + #ifndef PURE_QML_ONLY // If there is a qmldir and we have a QApplication instance (as opposed to a // widget-free QGuiApplication), assume that the widget-based dialog will work. - if (widgetsDir.exists("qmldir") && !widgetQmlFile.isEmpty() && + if (hasTopLevelWindows && widgetsDir.exists("qmldir") && !qstrcmp(QCoreApplication::instance()->metaObject()->className(), "QApplication")) { - QString dialogQmlPath = qmlDir.filePath(widgetQmlFile); + QString dialogQmlPath = qmlDir.filePath(QString("Widget%1.qml").arg(qmlName)); if (qmlRegisterType(QUrl::fromLocalFile(dialogQmlPath), uri, DIALOGS_MAJOR_MINOR, qmlName) >= 0) needQml = false; - // qDebug() << "registering" << qmlName << " as " << dialogQmlPath << "success?" << needQml; + // qDebug() << "registering" << qmlName << " as " << dialogQmlPath << "success?" << !needQml; } #endif if (needQml) { - QString dialogQmlPath = qmlDir.filePath(qmlFile); QByteArray abstractTypeName = QByteArray("Abstract") + qmlName; qmlRegisterType<WrapperType>(uri, DIALOGS_MAJOR_MINOR, abstractTypeName); // implementation wrapper + QString dialogQmlPath = qmlDir.filePath(QString("Default%1.qml").arg(qmlName)); // qDebug() << "registering" << qmlName << " as " << dialogQmlPath << "success?" << qmlRegisterType(QUrl::fromLocalFile(dialogQmlPath), uri, DIALOGS_MAJOR_MINOR, qmlName); } } + QUrl m_decorationComponentUrl; }; QT_END_NAMESPACE diff --git a/src/imports/dialogs/plugins.qmltypes b/src/imports/dialogs/plugins.qmltypes index 80eb8bd291..4e7090b960 100644 --- a/src/imports/dialogs/plugins.qmltypes +++ b/src/imports/dialogs/plugins.qmltypes @@ -39,6 +39,7 @@ Module { Property { name: "visible"; type: "bool" } Property { name: "modality"; type: "Qt::WindowModality" } Property { name: "title"; type: "string" } + Property { name: "isWindow"; type: "bool"; isReadonly: true } Property { name: "x"; type: "int" } Property { name: "y"; type: "int" } Property { name: "width"; type: "int" } @@ -56,7 +57,7 @@ Module { Property { name: "selectExisting"; type: "bool" } Property { name: "selectMultiple"; type: "bool" } Property { name: "selectFolder"; type: "bool" } - Property { name: "folder"; type: "string" } + Property { name: "folder"; type: "QUrl" } Property { name: "nameFilters"; type: "QStringList" } Property { name: "selectedNameFilter"; type: "string" } Property { name: "fileUrl"; type: "QUrl"; isReadonly: true } @@ -86,7 +87,7 @@ Module { } Method { name: "setFolder" - Parameter { name: "f"; type: "string" } + Parameter { name: "f"; type: "QUrl" } } Method { name: "setNameFilters" @@ -116,7 +117,7 @@ Module { Method { name: "addSelection" type: "bool" - Parameter { name: "path"; type: "string" } + Parameter { name: "path"; type: "QUrl" } } } } diff --git a/src/imports/dialogs/qml/Button.qml b/src/imports/dialogs/qml/Button.qml index 491dc2e251..4a0ec12cd3 100644 --- a/src/imports/dialogs/qml/Button.qml +++ b/src/imports/dialogs/qml/Button.qml @@ -39,6 +39,7 @@ *****************************************************************************/ import QtQuick 2.1 +import QtQuick.Window 2.1 Item { id: container @@ -48,10 +49,10 @@ Item { signal clicked property alias containsMouse: mouseArea.containsMouse property alias pressed: mouseArea.pressed - implicitHeight: buttonLabel.implicitHeight - implicitWidth: buttonLabel.implicitWidth - height: buttonLabel.implicitHeight + 12 - width: Math.max(80, implicitWidth + 8) + implicitHeight: buttonLabel.implicitHeight * 1.2 + implicitWidth: Math.max(Screen.logicalPixelDensity * 10, buttonLabel.implicitWidth * 1.2) + height: implicitHeight + width: implicitWidth SystemPalette { id: palette } @@ -64,7 +65,7 @@ Item { GradientStop { position: 1.0; color: Qt.darker(palette.button, 1.3) } } antialiasing: true - radius: 5 + radius: height / 4 border.color: Qt.darker(palette.button, 1.5) border.width: 1 } @@ -78,10 +79,8 @@ Item { Text { id: buttonLabel - width: parent.width - horizontalAlignment: Text.Center text: container.text color: palette.buttonText - anchors.verticalCenter: parent.verticalCenter + anchors.centerIn: parent } } diff --git a/src/imports/dialogs/qml/DefaultWindowDecoration.qml b/src/imports/dialogs/qml/DefaultWindowDecoration.qml new file mode 100644 index 0000000000..69a8658aba --- /dev/null +++ b/src/imports/dialogs/qml/DefaultWindowDecoration.qml @@ -0,0 +1,68 @@ +/***************************************************************************** +** +** 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:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +*****************************************************************************/ + +import QtQuick 2.1 + +Rectangle { + color: "#80000000" + anchors.fill: parent + z: 1000000 + property alias content: borderImage.content + property bool dismissOnOuterClick: true + signal dismissed + MouseArea { + anchors.fill: parent + enabled: dismissOnOuterClick + onClicked: dismissed() + BorderImage { + id: borderImage + property Item content + + width: content ? content.width + 15 : 0 + height: content ? content.height + 15 : 0 + onWidthChanged: content.x = 5 + onHeightChanged: content.y = 5 + border { left: 10; top: 10; right: 10; bottom: 10 } + source: "../images/window_border.png" + anchors.centerIn: parent + onContentChanged: if (content) content.parent = borderImage + } + } +} diff --git a/src/imports/dialogs/qml/TextField.qml b/src/imports/dialogs/qml/TextField.qml index baa469caa9..9a6427a105 100644 --- a/src/imports/dialogs/qml/TextField.qml +++ b/src/imports/dialogs/qml/TextField.qml @@ -45,10 +45,10 @@ Item { property alias textInput: textInput property alias text: textInput.text - property real implicitWidth: textInput.implicitWidth + rect.radius * 2 - property real implicitHeight: textInput.implicitHeight + rect.radius * 2 signal accepted signal downPressed + implicitWidth: textInput.implicitWidth + rect.radius * 2 + implicitHeight: textInput.implicitHeight function copyAll() { textInput.selectAll() diff --git a/src/imports/dialogs/qquickabstractcolordialog.cpp b/src/imports/dialogs/qquickabstractcolordialog.cpp index 9a9f3bc11b..7cfd7ea692 100644 --- a/src/imports/dialogs/qquickabstractcolordialog.cpp +++ b/src/imports/dialogs/qquickabstractcolordialog.cpp @@ -91,7 +91,7 @@ bool QQuickAbstractColorDialog::showAlphaChannel() const return m_options->testOption(QColorDialogOptions::ShowAlphaChannel); } -void QQuickAbstractColorDialog::setTitle(QString t) +void QQuickAbstractColorDialog::setTitle(const QString &t) { if (m_options->windowTitle() == t) return; m_options->setWindowTitle(t); diff --git a/src/imports/dialogs/qquickabstractcolordialog_p.h b/src/imports/dialogs/qquickabstractcolordialog_p.h index 3301605c86..46f0f84acb 100644 --- a/src/imports/dialogs/qquickabstractcolordialog_p.h +++ b/src/imports/dialogs/qquickabstractcolordialog_p.h @@ -78,7 +78,7 @@ public: public Q_SLOTS: void setVisible(bool v); void setModality(Qt::WindowModality m); - void setTitle(QString t); + void setTitle(const QString &t); void setColor(QColor arg); void setShowAlphaChannel(bool arg); diff --git a/src/imports/dialogs/qquickabstractdialog.cpp b/src/imports/dialogs/qquickabstractdialog.cpp index abdc9e067c..560cbaf3e0 100644 --- a/src/imports/dialogs/qquickabstractdialog.cpp +++ b/src/imports/dialogs/qquickabstractdialog.cpp @@ -44,11 +44,14 @@ #include <private/qguiapplication_p.h> #include <QWindow> +#include <QQmlComponent> #include <QQuickWindow> #include <qpa/qplatformintegration.h> QT_BEGIN_NAMESPACE +QQmlComponent *QQuickAbstractDialog::m_decorationComponent(0); + QQuickAbstractDialog::QQuickAbstractDialog(QObject *parent) : QObject(parent) , m_parentWindow(0) @@ -56,6 +59,10 @@ QQuickAbstractDialog::QQuickAbstractDialog(QObject *parent) , m_modality(Qt::WindowModal) , m_qmlImplementation(0) , m_dialogWindow(0) + , m_contentItem(0) + , m_windowDecoration(0) + , m_hasNativeWindows(QGuiApplicationPrivate::platformIntegration()-> + hasCapability(QPlatformIntegration::MultipleWindows)) { } @@ -82,36 +89,47 @@ void QQuickAbstractDialog::setVisible(bool v) if (!m_dialogWindow) { m_dialogWindow = qobject_cast<QWindow *>(m_qmlImplementation); if (!m_dialogWindow) { - QQuickItem *dlgItem = qobject_cast<QQuickItem *>(m_qmlImplementation); - if (dlgItem) { - m_dialogWindow = dlgItem->window(); + m_contentItem = qobject_cast<QQuickItem *>(m_qmlImplementation); + if (m_contentItem) { + m_dialogWindow = m_contentItem->window(); // An Item-based dialog implementation doesn't come with a window, so // we have to instantiate one iff the platform allows it. - if (!m_dialogWindow && QGuiApplicationPrivate::platformIntegration()-> - hasCapability(QPlatformIntegration::MultipleWindows)) { + if (!m_dialogWindow && m_hasNativeWindows) { QQuickWindow *win = new QQuickWindow; ((QObject *)win)->setParent(this); // memory management only m_dialogWindow = win; - dlgItem->setParentItem(win->contentItem()); - m_dialogWindow->setMinimumSize(QSize(dlgItem->width(), dlgItem->height())); + m_contentItem->setParentItem(win->contentItem()); + m_dialogWindow->setMinimumSize(QSize(m_contentItem->implicitWidth(), m_contentItem->implicitHeight())); connect(win, SIGNAL(widthChanged(int)), this, SLOT(windowGeometryChanged())); connect(win, SIGNAL(heightChanged(int)), this, SLOT(windowGeometryChanged())); } QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent()); - // qDebug() << "item implementation" << dlgItem << "has window" << m_dialogWindow << "and parent" << parentItem; // If the platform does not support multiple windows, but the dialog is - // implemented as an Item, then just reparent it and make it visible. - // TODO QTBUG-29818: put it into a fake Item-based window, when we have a reusable self-decorated one. - if (parentItem && !m_dialogWindow) - dlgItem->setParentItem(parentItem); + // implemented as an Item, then try to decorate it as a fake window and make it visible. + if (parentItem && !m_dialogWindow && !m_windowDecoration) { + if (m_decorationComponent) { + if (m_decorationComponent->isLoading()) + connect(m_decorationComponent, SIGNAL(statusChanged(QQmlComponent::Status)), + this, SLOT(decorationLoaded())); + else + decorationLoaded(); + } + // Window decoration wasn't possible, so just reparent it into the scene + else { + m_contentItem->setParentItem(parentItem); + m_contentItem->setZ(10000); + } + } } } if (m_dialogWindow) connect(m_dialogWindow, SIGNAL(visibleChanged(bool)), this, SLOT(visibleChanged(bool))); } - if (m_dialogWindow) { + if (m_windowDecoration) { + m_windowDecoration->setVisible(v); + } else if (m_dialogWindow) { if (v) { m_dialogWindow->setTransientParent(parentWindow()); m_dialogWindow->setTitle(title()); @@ -124,6 +142,38 @@ void QQuickAbstractDialog::setVisible(bool v) emit visibilityChanged(); } +void QQuickAbstractDialog::decorationLoaded() +{ + bool ok = false; + QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent()); + if (m_decorationComponent->isError()) { + qWarning() << m_decorationComponent->errors(); + } else { + QObject *decoration = m_decorationComponent->create(); + m_windowDecoration = qobject_cast<QQuickItem *>(decoration); + if (m_windowDecoration) { + m_windowDecoration->setParentItem(parentItem); + // Give the window decoration its content to manage + QVariant contentVariant; + contentVariant.setValue<QQuickItem*>(m_contentItem); + m_windowDecoration->setProperty("content", contentVariant); + connect(m_windowDecoration, SIGNAL(dismissed()), this, SLOT(reject())); + ok = true; + } else { + qWarning() << m_decorationComponent->url() << + "cannot be used as a window decoration because it's not an Item"; + delete m_windowDecoration; + delete m_decorationComponent; + m_decorationComponent = 0; + } + } + // Window decoration wasn't possible, so just reparent it into the scene + if (!ok) { + m_contentItem->setParentItem(parentItem); + m_contentItem->setZ(10000); + } +} + void QQuickAbstractDialog::setModality(Qt::WindowModality m) { if (m_modality == m) return; @@ -152,7 +202,6 @@ void QQuickAbstractDialog::visibleChanged(bool v) void QQuickAbstractDialog::windowGeometryChanged() { QQuickItem *content = qobject_cast<QQuickItem*>(m_qmlImplementation); -qDebug() << Q_FUNC_INFO << m_dialogWindow << content; if (m_dialogWindow && content) { content->setWidth(m_dialogWindow->width()); content->setHeight(m_dialogWindow->height()); diff --git a/src/imports/dialogs/qquickabstractdialog_p.h b/src/imports/dialogs/qquickabstractdialog_p.h index 2ad24f98e0..5e3d9b43f7 100644 --- a/src/imports/dialogs/qquickabstractdialog_p.h +++ b/src/imports/dialogs/qquickabstractdialog_p.h @@ -66,6 +66,7 @@ class QQuickAbstractDialog : public QObject Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibilityChanged) Q_PROPERTY(Qt::WindowModality modality READ modality WRITE setModality NOTIFY modalityChanged) Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) + Q_PROPERTY(bool isWindow READ isWindow CONSTANT) Q_PROPERTY(int x READ x WRITE setX NOTIFY geometryChanged) Q_PROPERTY(int y READ y WRITE setY NOTIFY geometryChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY geometryChanged) @@ -87,8 +88,9 @@ public: virtual void setVisible(bool v); virtual void setModality(Qt::WindowModality m); - virtual void setTitle(QString t) = 0; + virtual void setTitle(const QString &t) = 0; void setQmlImplementation(QObject* obj); + bool isWindow() const { return m_hasNativeWindows; } void setX(int arg); void setY(int arg); void setWidth(int arg); @@ -107,6 +109,7 @@ Q_SIGNALS: void rejected(); protected Q_SLOTS: + void decorationLoaded(); void accept(); void reject(); void visibleChanged(bool v); @@ -124,6 +127,13 @@ protected: protected: // variables for pure-QML implementations only QObject *m_qmlImplementation; QWindow *m_dialogWindow; + QQuickItem *m_contentItem; + QQuickItem *m_windowDecoration; + bool m_hasNativeWindows; + + static QQmlComponent *m_decorationComponent; + + friend class QtQuick2DialogsPlugin; Q_DISABLE_COPY(QQuickAbstractDialog) }; diff --git a/src/imports/dialogs/qquickabstractfiledialog.cpp b/src/imports/dialogs/qquickabstractfiledialog.cpp index 32442de41f..d8a75feb53 100644 --- a/src/imports/dialogs/qquickabstractfiledialog.cpp +++ b/src/imports/dialogs/qquickabstractfiledialog.cpp @@ -78,7 +78,7 @@ QString QQuickAbstractFileDialog::title() const return m_options->windowTitle(); } -void QQuickAbstractFileDialog::setTitle(QString t) +void QQuickAbstractFileDialog::setTitle(const QString &t) { if (m_options->windowTitle() == t) return; m_options->setWindowTitle(t); @@ -106,18 +106,19 @@ void QQuickAbstractFileDialog::setSelectFolder(bool selectFolder) updateModes(); } -QString QQuickAbstractFileDialog::folder() +QUrl QQuickAbstractFileDialog::folder() { if (m_dlgHelper && !m_dlgHelper->directory().isEmpty()) - return m_dlgHelper->directory(); - return m_options->initialDirectory(); + return QUrl::fromLocalFile(m_dlgHelper->directory()); + return QUrl::fromLocalFile(m_options->initialDirectory()); } -void QQuickAbstractFileDialog::setFolder(QString f) +void QQuickAbstractFileDialog::setFolder(const QUrl &f) { + QString dir = f.path(); if (m_dlgHelper) - m_dlgHelper->setDirectory(f); - m_options->setInitialDirectory(f); + m_dlgHelper->setDirectory(dir); + m_options->setInitialDirectory(dir); emit folderChanged(); } @@ -141,7 +142,7 @@ QString QQuickAbstractFileDialog::selectedNameFilter() return ret; } -void QQuickAbstractFileDialog::selectNameFilter(QString f) +void QQuickAbstractFileDialog::selectNameFilter(const QString &f) { // This should work whether the dialog is currently being shown already, or ahead of time. m_options->setInitiallySelectedNameFilter(f); diff --git a/src/imports/dialogs/qquickabstractfiledialog_p.h b/src/imports/dialogs/qquickabstractfiledialog_p.h index 965f1a7029..5ce48e8055 100644 --- a/src/imports/dialogs/qquickabstractfiledialog_p.h +++ b/src/imports/dialogs/qquickabstractfiledialog_p.h @@ -67,7 +67,7 @@ class QQuickAbstractFileDialog : public QQuickAbstractDialog Q_PROPERTY(bool selectExisting READ selectExisting WRITE setSelectExisting NOTIFY fileModeChanged) Q_PROPERTY(bool selectMultiple READ selectMultiple WRITE setSelectMultiple NOTIFY fileModeChanged) Q_PROPERTY(bool selectFolder READ selectFolder WRITE setSelectFolder NOTIFY fileModeChanged) - Q_PROPERTY(QString folder READ folder WRITE setFolder NOTIFY folderChanged) + Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged) Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters NOTIFY nameFiltersChanged) Q_PROPERTY(QString selectedNameFilter READ selectedNameFilter WRITE selectNameFilter NOTIFY filterSelected) Q_PROPERTY(QUrl fileUrl READ fileUrl NOTIFY selectionAccepted) @@ -81,7 +81,7 @@ public: bool selectExisting() const { return m_selectExisting; } bool selectMultiple() const { return m_selectMultiple; } bool selectFolder() const { return m_selectFolder; } - QString folder(); + QUrl folder(); QStringList nameFilters() const { return m_options->nameFilters(); } QString selectedNameFilter(); QUrl fileUrl(); @@ -89,13 +89,13 @@ public: public Q_SLOTS: void setVisible(bool v); - void setTitle(QString t); + void setTitle(const QString &t); void setSelectExisting(bool s); void setSelectMultiple(bool s); void setSelectFolder(bool s); - void setFolder(QString f); + void setFolder(const QUrl &f); void setNameFilters(const QStringList &f); - void selectNameFilter(QString f); + void selectNameFilter(const QString &f); Q_SIGNALS: void folderChanged(); diff --git a/src/imports/dialogs/qquickcolordialog.cpp b/src/imports/dialogs/qquickcolordialog.cpp index 39af99770e..d0e0e11b07 100644 --- a/src/imports/dialogs/qquickcolordialog.cpp +++ b/src/imports/dialogs/qquickcolordialog.cpp @@ -64,13 +64,13 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::AbstractColorDialog::accepted - The \a accepted signal is emitted by \l accept(). + This signal is emitted by \l accept(). */ /*! \qmlsignal QtQuick::Dialogs::AbstractColorDialog::rejected - The \a accepted signal is emitted by \l reject(). + This signal is emitted by \l reject(). */ /*! @@ -110,12 +110,6 @@ QQuickColorDialog::~QQuickColorDialog() */ /*! - \qmlproperty bool AbstractColorDialog::filePaths - - A list of files to be populated as the user chooses. -*/ - -/*! \qmlproperty QObject AbstractColorDialog::implementation The QML object which implements the actual file dialog. Should be either a diff --git a/src/imports/dialogs/qquickfiledialog.cpp b/src/imports/dialogs/qquickfiledialog.cpp index f78e8a6f8d..2ee4afc5d2 100644 --- a/src/imports/dialogs/qquickfiledialog.cpp +++ b/src/imports/dialogs/qquickfiledialog.cpp @@ -64,13 +64,13 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::AbstractFileDialog::accepted - The \a accepted signal is emitted by \l accept(). + This signal is emitted by \l accept(). */ /*! \qmlsignal QtQuick::Dialogs::AbstractFileDialog::rejected - The \a accepted signal is emitted by \l reject(). + This signal is emitted by \l reject(). */ /*! @@ -105,10 +105,7 @@ QQuickFileDialog::~QQuickFileDialog() QList<QUrl> QQuickFileDialog::fileUrls() { - QList<QUrl> ret; - foreach (QString path, m_selections) - ret << QUrl::fromLocalFile(path); - return ret; + return m_selections; } /*! @@ -118,13 +115,13 @@ QList<QUrl> QQuickFileDialog::fileUrls() */ /*! - \qmlproperty bool AbstractFileDialog::filePaths + \qmlproperty bool AbstractFileDialog::fileUrls A list of files to be populated as the user chooses. */ /*! - \brief Clears \l filePaths + \brief Clears \l fileUrls */ void QQuickFileDialog::clearSelection() { @@ -132,20 +129,18 @@ void QQuickFileDialog::clearSelection() } /*! - \brief Adds one file to \l filePaths + \brief Adds one file to \l fileUrls - \l path should be given as an absolute file system path. If it is given as a - file:// URL, it will be converted to a path. Returns true on success, - false if the given path is not valid given the current setting properties. + \l path should be given as an absolute file:// path URL. + Returns true on success, false if the given path is + not valid given the current property settings. */ -bool QQuickFileDialog::addSelection(QString path) +bool QQuickFileDialog::addSelection(const QUrl &path) { - if (path.startsWith("file:")) - path = QUrl(path).toLocalFile(); - QFileInfo info(path); + QFileInfo info(path.toLocalFile()); if (info.exists() && ((info.isDir() && m_selectFolder) || !info.isDir())) { if (m_selectFolder) - m_selections.append(pathFolder(path).toLocalFile()); + m_selections.append(pathFolder(path.toLocalFile())); else m_selections.append(path); return true; diff --git a/src/imports/dialogs/qquickfiledialog_p.h b/src/imports/dialogs/qquickfiledialog_p.h index 93e11f9e3e..0176bc3fe4 100644 --- a/src/imports/dialogs/qquickfiledialog_p.h +++ b/src/imports/dialogs/qquickfiledialog_p.h @@ -72,7 +72,7 @@ signals: public Q_SLOTS: void clearSelection(); - bool addSelection(QString path); + bool addSelection(const QUrl &path); protected: virtual QPlatformFileDialogHelper *helper() { return 0; } @@ -81,7 +81,7 @@ protected: Q_INVOKABLE QUrl pathFolder(const QString &path); private: - QStringList m_selections; + QList<QUrl> m_selections; Q_DISABLE_COPY(QQuickFileDialog) }; diff --git a/src/imports/dialogs/qquickplatformcolordialog.cpp b/src/imports/dialogs/qquickplatformcolordialog.cpp index 491a2e687c..8dc6d09f2c 100644 --- a/src/imports/dialogs/qquickplatformcolordialog.cpp +++ b/src/imports/dialogs/qquickplatformcolordialog.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE \qmltype ColorDialog \instantiates QQuickPlatformColorDialog \inqmlmodule QtQuick.Dialogs 1 - \ingroup qtquick-visual + \ingroup dialogs \brief Dialog component for choosing a color. \since Qt 5.1 @@ -102,8 +102,8 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::ColorDialog::accepted - The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a color property to get the selection. + This handler is called when the user has finished using the + dialog. You can then inspect the \l color property to get the selection. Example: @@ -117,7 +117,7 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::ColorDialog::rejected - The \a rejected signal is emitted when the user has dismissed the dialog, + This handler is called when the user has dismissed the dialog, either by closing the dialog window or by pressing the Cancel button. */ diff --git a/src/imports/dialogs/qquickplatformfiledialog.cpp b/src/imports/dialogs/qquickplatformfiledialog.cpp index d767f65499..3da9f6c3b2 100644 --- a/src/imports/dialogs/qquickplatformfiledialog.cpp +++ b/src/imports/dialogs/qquickplatformfiledialog.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE \qmltype FileDialog \instantiates QQuickPlatformFileDialog \inqmlmodule QtQuick.Dialogs 1 - \ingroup qtquick-visual + \ingroup dialogs \brief Dialog component for choosing files from a local filesystem. \since Qt 5.1 @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE id: fileDialog title: "Please choose a file" onAccepted: { - console.log("You chose: " + fileDialog.filePaths) + console.log("You chose: " + fileDialog.fileUrls) Qt.quit() } onRejected: { @@ -103,15 +103,15 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::FileDialog::accepted - The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a filePath or \a filePaths properties to + This handler is called when the user has finished using the + dialog. You can then inspect the \l fileUrl or \l fileUrls properties to get the selection. Example: \qml FileDialog { - onAccepted: { console.log("Selected file: " + filePath) } + onAccepted: { console.log("Selected file: " + fileUrl) } } \endqml */ @@ -119,7 +119,7 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::FileDialog::rejected - The \a rejected signal is emitted when the user has dismissed the dialog, + This handler is called when the user has dismissed the dialog, either by closing the dialog window or by pressing the Cancel button. */ @@ -191,7 +191,7 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() containing the dialog's parent Item, modal with respect to the whole application, or non-modal. - By default it is \l WindowModal. + By default it is \c Qt.WindowModal. Modality does not mean that there are any blocking calls to wait for the dialog to be accepted or rejected; it's only that the user will be @@ -252,7 +252,7 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() */ /*! - \qmlproperty string FileDialog::folder + \qmlproperty url FileDialog::folder The path to the currently selected folder. Setting this property before invoking open() will cause the file browser to be initially positioned on @@ -295,18 +295,18 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() */ /*! - \qmlproperty string FileDialog::filePath + \qmlproperty url FileDialog::fileUrl The path of the file which was selected by the user. \note This property is set only if exactly one file was selected. In all - other cases, it will return an empty string. + other cases, it will be empty. - \sa filePaths + \sa fileUrls */ /*! - \qmlproperty list<string> FileDialog::filePaths + \qmlproperty list<url> FileDialog::fileUrls The list of file paths which were selected by the user. */ diff --git a/src/imports/models/plugin.cpp b/src/imports/models/plugin.cpp index 2181562098..90e8a56399 100644 --- a/src/imports/models/plugin.cpp +++ b/src/imports/models/plugin.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE /*! \qmlmodule QtQml.Models 2 - \title Qt QML Model QML Types + \title Qt QML Models QML Types \ingroup qmlmodules \brief Provides QML types for data models \since 5.1 @@ -60,7 +60,8 @@ QT_BEGIN_NAMESPACE import QtQml.Models 2.1 \endcode - Note that QtQml.Models module started at version 2.1 to match the version of the parent module. + Note that QtQml.Models module started at version 2.1 to match the version + of the parent module, \l{Qt QML}. */ diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index e5381629cc..cc619dc4ff 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -3,12 +3,20 @@ import QtQuick.tooling 1.1 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // -// This file was auto-generated with the command 'qmlplugindump -builtins'. +// This file was auto-generated with the command 'qmlplugindump -notrelocatable -builtins'. Module { Component { name: "QAbstractItemModel" prototype: "QObject" + Enum { + name: "LayoutChangeHint" + values: { + "NoLayoutChangeHint": 0, + "VerticalSortHint": 1, + "HorizontalSortHint": 2 + } + } Signal { name: "dataChanged" Parameter { name: "topLeft"; type: "QModelIndex" } @@ -167,6 +175,7 @@ Module { name: "QInputMethod" prototype: "QObject" exports: ["QtQuick/InputMethod 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Action" values: { @@ -215,6 +224,7 @@ Module { Component { name: "QObject" exports: ["QtQml/QtObject 2.0", "QtQuick/QtObject 2.0"] + exportMetaObjectRevisions: [0, 0] Property { name: "objectName"; type: "string" } Signal { name: "objectNameChanged" @@ -228,9 +238,26 @@ Module { } } Component { + name: "QQmlApplication" + prototype: "QObject" + Property { name: "arguments"; type: "QStringList"; isReadonly: true } + Property { name: "name"; type: "string" } + Property { name: "version"; type: "string" } + Signal { name: "aboutToQuit" } + Method { + name: "setName" + Parameter { name: "arg"; type: "string" } + } + Method { + name: "setVersion" + Parameter { name: "arg"; type: "string" } + } + } + Component { name: "QQmlBind" prototype: "QObject" exports: ["QtQml/Binding 2.0", "QtQuick/Binding 2.0"] + exportMetaObjectRevisions: [0, 0] Property { name: "target"; type: "QObject"; isPointer: true } Property { name: "property"; type: "string" } Property { name: "value"; type: "QVariant" } @@ -244,6 +271,7 @@ Module { "QtQml/Component 2.0", "QtQuick/Component 2.0" ] + exportMetaObjectRevisions: [0, 0, 0] attachedType: "QQmlComponentAttached" Enum { name: "CompilationMode" @@ -298,13 +326,105 @@ Module { name: "QQmlConnections" prototype: "QObject" exports: ["QtQml/Connections 2.0", "QtQuick/Connections 2.0"] + exportMetaObjectRevisions: [0, 0] Property { name: "target"; type: "QObject"; isPointer: true } Property { name: "ignoreUnknownSignals"; type: "bool" } } Component { + name: "QQmlDelegateModel" + defaultProperty: "delegate" + prototype: "QQmlInstanceModel" + exports: ["QtQuick/VisualDataModel 2.0"] + exportMetaObjectRevisions: [0] + attachedType: "QQmlDelegateModelAttached" + Property { name: "model"; type: "QVariant" } + Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } + Property { name: "filterOnGroup"; type: "string" } + Property { name: "items"; type: "QQmlDelegateModelGroup"; isReadonly: true; isPointer: true } + Property { + name: "persistedItems" + type: "QQmlDelegateModelGroup" + isReadonly: true + isPointer: true + } + Property { name: "groups"; type: "QQmlDelegateModelGroup"; isList: true; isReadonly: true } + Property { name: "parts"; type: "QObject"; isReadonly: true; isPointer: true } + Property { name: "rootIndex"; type: "QVariant" } + Signal { name: "filterGroupChanged" } + Signal { name: "defaultGroupsChanged" } + Method { + name: "modelIndex" + type: "QVariant" + Parameter { name: "idx"; type: "int" } + } + Method { name: "parentModelIndex"; type: "QVariant" } + } + Component { + name: "QQmlDelegateModelAttached" + prototype: "QObject" + Property { name: "model"; type: "QQmlDelegateModel"; isReadonly: true; isPointer: true } + Property { name: "groups"; type: "QStringList" } + Property { name: "isUnresolved"; type: "bool"; isReadonly: true } + Signal { name: "unresolvedChanged" } + } + Component { + name: "QQmlDelegateModelGroup" + prototype: "QObject" + exports: ["QtQuick/VisualDataGroup 2.0"] + exportMetaObjectRevisions: [0] + Property { name: "count"; type: "int"; isReadonly: true } + Property { name: "name"; type: "string" } + Property { name: "includeByDefault"; type: "bool" } + Signal { name: "defaultIncludeChanged" } + Signal { + name: "changed" + Parameter { name: "removed"; type: "QQmlV8Handle" } + Parameter { name: "inserted"; type: "QQmlV8Handle" } + } + Method { + name: "insert" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "create" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "resolve" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "remove" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "addGroups" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "removeGroups" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "setGroups" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "move" + Parameter { type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "get" + type: "QQmlV8Handle" + Parameter { name: "index"; type: "int" } + } + } + Component { name: "QQmlDelegateModelParts"; prototype: "QObject" } + Component { name: "QQmlEasingValueType" prototype: "QQmlValueType" exports: ["QtQuick/Easing 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Type" values: { @@ -363,8 +483,111 @@ Module { Property { name: "bezierCurve"; type: "QVariantList" } } Component { + name: "QQmlInstanceModel" + prototype: "QObject" + Property { name: "count"; type: "int"; isReadonly: true } + Signal { + name: "modelUpdated" + Parameter { name: "changeSet"; type: "QQmlChangeSet" } + Parameter { name: "reset"; type: "bool" } + } + Signal { + name: "createdItem" + Parameter { name: "index"; type: "int" } + Parameter { name: "object"; type: "QObject"; isPointer: true } + } + Signal { + name: "initItem" + Parameter { name: "index"; type: "int" } + Parameter { name: "object"; type: "QObject"; isPointer: true } + } + Signal { + name: "destroyingItem" + Parameter { name: "object"; type: "QObject"; isPointer: true } + } + } + Component { + name: "QQmlInstantiator" + defaultProperty: "delegate" + prototype: "QObject" + exports: ["QtQml/Instantiator 2.1", "QtQuick/Instantiator 2.1"] + exportMetaObjectRevisions: [0, 0] + Property { name: "active"; type: "bool" } + Property { name: "asynchronous"; type: "bool" } + Property { name: "model"; type: "QVariant" } + Property { name: "count"; type: "int"; isReadonly: true } + Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } + Property { name: "object"; type: "QObject"; isReadonly: true; isPointer: true } + Signal { + name: "objectAdded" + Parameter { name: "index"; type: "int" } + Parameter { name: "object"; type: "QObject"; isPointer: true } + } + Signal { + name: "objectRemoved" + Parameter { name: "index"; type: "int" } + Parameter { name: "object"; type: "QObject"; isPointer: true } + } + Method { + name: "objectAt" + type: "QObject*" + Parameter { name: "index"; type: "int" } + } + } + Component { + name: "QQmlListElement" + prototype: "QObject" + exports: ["QtQuick/ListElement 2.0"] + exportMetaObjectRevisions: [0] + } + Component { + name: "QQmlListModel" + prototype: "QAbstractListModel" + exports: ["QtQuick/ListModel 2.0"] + exportMetaObjectRevisions: [0] + Property { name: "count"; type: "int"; isReadonly: true } + Property { name: "dynamicRoles"; type: "bool" } + Method { name: "clear" } + Method { + name: "remove" + Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "append" + Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "insert" + Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } + } + Method { + name: "get" + type: "QQmlV8Handle" + Parameter { name: "index"; type: "int" } + } + Method { + name: "set" + Parameter { name: "index"; type: "int" } + Parameter { type: "QQmlV8Handle" } + } + Method { + name: "setProperty" + Parameter { name: "index"; type: "int" } + Parameter { name: "property"; type: "string" } + Parameter { name: "value"; type: "QVariant" } + } + Method { + name: "move" + Parameter { name: "from"; type: "int" } + Parameter { name: "to"; type: "int" } + Parameter { name: "count"; type: "int" } + } + Method { name: "sync" } + } + Component { name: "QQmlLocale" exports: ["QtQuick/Locale 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "MeasurementSystem" values: { @@ -404,9 +627,24 @@ Module { } } Component { + name: "QQmlObjectModel" + defaultProperty: "children" + prototype: "QQmlInstanceModel" + exports: ["QtQuick/VisualItemModel 2.0"] + exportMetaObjectRevisions: [0] + attachedType: "QQmlObjectModelAttached" + Property { name: "children"; type: "QObject"; isList: true; isReadonly: true } + } + Component { + name: "QQmlObjectModelAttached" + prototype: "QObject" + Property { name: "index"; type: "int"; isReadonly: true } + } + Component { name: "QQmlTimer" prototype: "QObject" exports: ["QtQml/Timer 2.0", "QtQuick/Timer 2.0"] + exportMetaObjectRevisions: [0, 0] Property { name: "interval"; type: "int" } Property { name: "running"; type: "bool" } Property { name: "repeat"; type: "bool" } @@ -422,6 +660,7 @@ Module { name: "QQuickAbstractAnimation" prototype: "QObject" exports: ["QtQuick/Animation 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Loops" values: { @@ -461,14 +700,18 @@ Module { name: "QQuickAccessibleAttached" prototype: "QObject" exports: ["QtQuick/Accessible 2.0"] + exportMetaObjectRevisions: [0] Property { name: "role"; type: "QAccessible::Role" } Property { name: "name"; type: "string" } Property { name: "description"; type: "string" } + Method { name: "valueChanged" } + Method { name: "cursorPositionChanged" } } Component { name: "QQuickAnchorAnimation" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/AnchorAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "targets"; type: "QQuickItem"; isList: true; isReadonly: true } Property { name: "duration"; type: "int" } Property { name: "easing"; type: "QEasingCurve" } @@ -485,6 +728,7 @@ Module { name: "QQuickAnchorChanges" prototype: "QQuickStateOperation" exports: ["QtQuick/AnchorChanges 2.0"] + exportMetaObjectRevisions: [0] Property { name: "target"; type: "QQuickItem"; isPointer: true } Property { name: "anchors"; type: "QQuickAnchorSet"; isReadonly: true; isPointer: true } } @@ -527,6 +771,7 @@ Module { defaultProperty: "data" prototype: "QQuickImage" exports: ["QtQuick/AnimatedImage 2.0"] + exportMetaObjectRevisions: [0] Property { name: "playing"; type: "bool" } Property { name: "paused"; type: "bool" } Property { name: "currentFrame"; type: "int" } @@ -539,6 +784,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/AnimatedSprite 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "LoopParameters" values: { @@ -698,6 +944,7 @@ Module { defaultProperty: "animation" prototype: "QObject" exports: ["QtQuick/AnimationController 2.0"] + exportMetaObjectRevisions: [0] Property { name: "progress"; type: "double" } Property { name: "animation"; type: "QQuickAbstractAnimation"; isPointer: true } Method { name: "reload" } @@ -712,8 +959,9 @@ Module { } Component { name: "QQuickApplication" - prototype: "QObject" + prototype: "QQmlApplication" exports: ["QtQuick/Application 2.0"] + exportMetaObjectRevisions: [0] Property { name: "active"; type: "bool"; isReadonly: true } Property { name: "layoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } Property { name: "supportsMultipleWindows"; type: "bool"; isReadonly: true } @@ -723,6 +971,7 @@ Module { defaultProperty: "data" prototype: "QQuickImplicitSizeItem" exports: ["QtQuick/Positioner 2.0"] + exportMetaObjectRevisions: [0] attachedType: "QQuickPositionerAttached" Property { name: "spacing"; type: "double" } Property { name: "populate"; type: "QQuickTransition"; isPointer: true } @@ -734,6 +983,7 @@ Module { defaultProperty: "animation" prototype: "QObject" exports: ["QtQuick/Behavior 2.0"] + exportMetaObjectRevisions: [0] Property { name: "animation"; type: "QQuickAbstractAnimation"; isPointer: true } Property { name: "enabled"; type: "bool" } } @@ -742,6 +992,7 @@ Module { defaultProperty: "data" prototype: "QQuickImageBase" exports: ["QtQuick/BorderImage 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "TileMode" values: { @@ -760,6 +1011,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/Canvas 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "RenderTarget" values: { @@ -846,6 +1098,7 @@ Module { name: "QQuickColorAnimation" prototype: "QQuickPropertyAnimation" exports: ["QtQuick/ColorAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "from"; type: "QColor" } Property { name: "to"; type: "QColor" } } @@ -854,6 +1107,7 @@ Module { defaultProperty: "data" prototype: "QQuickBasePositioner" exports: ["QtQuick/Column 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickCurve" @@ -867,6 +1121,7 @@ Module { name: "QQuickDoubleValidator" prototype: "QDoubleValidator" exports: ["QtQuick/DoubleValidator 2.0"] + exportMetaObjectRevisions: [0] Property { name: "locale"; type: "string" } Signal { name: "localeNameChanged" } } @@ -874,13 +1129,15 @@ Module { name: "QQuickDrag" prototype: "QObject" exports: ["QtQuick/Drag 2.0"] + exportMetaObjectRevisions: [0] attachedType: "QQuickDragAttached" Enum { name: "Axis" values: { "XAxis": 1, "YAxis": 2, - "XAndYAxis": 3 + "XAndYAxis": 3, + "XandYAxis": 3 } } Property { name: "target"; type: "QQuickItem"; isPointer: true } @@ -914,6 +1171,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/DropArea 2.0"] + exportMetaObjectRevisions: [0] Property { name: "containsDrag"; type: "bool"; isReadonly: true } Property { name: "keys"; type: "QStringList" } Property { name: "drag"; type: "QQuickDropAreaDrag"; isReadonly: true; isPointer: true } @@ -945,6 +1203,7 @@ Module { defaultProperty: "flickableData" prototype: "QQuickItem" exports: ["QtQuick/Flickable 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "BoundsBehavior" values: { @@ -1054,6 +1313,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/Flipable 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Side" values: { @@ -1070,6 +1330,7 @@ Module { defaultProperty: "data" prototype: "QQuickBasePositioner" exports: ["QtQuick/Flow 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Flow" values: { @@ -1086,11 +1347,13 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/FocusScope 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickFontLoader" prototype: "QObject" exports: ["QtQuick/FontLoader 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Status" values: { @@ -1108,6 +1371,7 @@ Module { name: "QQuickFontValueType" prototype: "QQmlValueType" exports: ["QtQuick/Font 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "FontWeight" values: { @@ -1146,6 +1410,7 @@ Module { defaultProperty: "stops" prototype: "QObject" exports: ["QtQuick/Gradient 2.0"] + exportMetaObjectRevisions: [0] Property { name: "stops"; type: "QQuickGradientStop"; isList: true; isReadonly: true } Signal { name: "updated" } } @@ -1153,6 +1418,7 @@ Module { name: "QQuickGradientStop" prototype: "QObject" exports: ["QtQuick/GradientStop 2.0"] + exportMetaObjectRevisions: [0] Property { name: "position"; type: "double" } Property { name: "color"; type: "QColor" } } @@ -1160,7 +1426,8 @@ Module { name: "QQuickGrid" defaultProperty: "data" prototype: "QQuickBasePositioner" - exports: ["QtQuick/Grid 2.0"] + exports: ["QtQuick/Grid 2.0", "QtQuick/Grid 2.1"] + exportMetaObjectRevisions: [0, 1] Enum { name: "Flow" values: { @@ -1168,6 +1435,22 @@ Module { "TopToBottom": 1 } } + Enum { + name: "HAlignment" + values: { + "AlignLeft": 1, + "AlignRight": 2, + "AlignHCenter": 4 + } + } + Enum { + name: "VAlignment" + values: { + "AlignTop": 32, + "AlignBottom": 64, + "AlignVCenter": 128 + } + } Property { name: "rows"; type: "int" } Property { name: "columns"; type: "int" } Property { name: "rowSpacing"; type: "double" } @@ -1175,18 +1458,43 @@ Module { Property { name: "flow"; type: "Flow" } Property { name: "layoutDirection"; type: "Qt::LayoutDirection" } Property { name: "effectiveLayoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } + Property { name: "horizontalItemAlignment"; revision: 1; type: "HAlignment" } + Property { + name: "effectiveHorizontalItemAlignment" + revision: 1 + type: "HAlignment" + isReadonly: true + } + Property { name: "verticalItemAlignment"; revision: 1; type: "VAlignment" } + Signal { + name: "horizontalAlignmentChanged" + revision: 1 + Parameter { name: "alignment"; type: "HAlignment" } + } + Signal { + name: "effectiveHorizontalAlignmentChanged" + revision: 1 + Parameter { name: "alignment"; type: "HAlignment" } + } + Signal { + name: "verticalAlignmentChanged" + revision: 1 + Parameter { name: "alignment"; type: "VAlignment" } + } } Component { name: "QQuickGridMesh" prototype: "QQuickShaderEffectMesh" exports: ["QtQuick/GridMesh 2.0"] + exportMetaObjectRevisions: [0] Property { name: "resolution"; type: "QSize" } } Component { name: "QQuickGridView" defaultProperty: "data" prototype: "QQuickItemView" - exports: ["QtQuick/GridView 2.0"] + exports: ["QtQuick/GridView 2.0", "QtQuick/GridView 2.1"] + exportMetaObjectRevisions: [0, 1] attachedType: "QQuickGridViewAttached" Enum { name: "Flow" @@ -1223,6 +1531,7 @@ Module { defaultProperty: "data" prototype: "QQuickImageBase" exports: ["QtQuick/Image 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "HAlignment" values: { @@ -1305,11 +1614,14 @@ Module { prototype: "QQuickItem" Property { name: "implicitWidth"; type: "double"; isReadonly: true } Property { name: "implicitHeight"; type: "double"; isReadonly: true } + Signal { name: "implicitWidthChanged2"; revision: 1 } + Signal { name: "implicitHeightChanged2"; revision: 1 } } Component { name: "QQuickIntValidator" prototype: "QIntValidator" exports: ["QtQuick/IntValidator 2.0"] + exportMetaObjectRevisions: [0] Property { name: "locale"; type: "string" } Signal { name: "localeNameChanged" } } @@ -1317,7 +1629,8 @@ Module { name: "QQuickItem" defaultProperty: "data" prototype: "QObject" - exports: ["QtQuick/Item 2.0"] + exports: ["QtQuick/Item 2.0", "QtQuick/Item 2.1"] + exportMetaObjectRevisions: [0, 1] Enum { name: "TransformOrigin" values: { @@ -1361,6 +1674,7 @@ Module { Property { name: "clip"; type: "bool" } Property { name: "focus"; type: "bool" } Property { name: "activeFocus"; type: "bool"; isReadonly: true } + Property { name: "activeFocusOnTab"; revision: 1; type: "bool" } Property { name: "rotation"; type: "double" } Property { name: "scale"; type: "double" } Property { name: "transformOrigin"; type: "TransformOrigin" } @@ -1392,6 +1706,11 @@ Module { Parameter { type: "bool" } } Signal { + name: "activeFocusOnTabChanged" + revision: 1 + Parameter { type: "bool" } + } + Signal { name: "parentChanged" Parameter { type: "QQuickItem"; isPointer: true } } @@ -1411,6 +1730,11 @@ Module { name: "clipChanged" Parameter { type: "bool" } } + Signal { + name: "windowChanged" + revision: 1 + Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } + } Method { name: "update" } Method { name: "contains" @@ -1427,6 +1751,16 @@ Module { } Method { name: "forceActiveFocus" } Method { + name: "forceActiveFocus" + Parameter { name: "reason"; type: "Qt::FocusReason" } + } + Method { + name: "nextItemInFocusChain" + type: "QQuickItem*" + Parameter { name: "forward"; type: "bool" } + } + Method { name: "nextItemInFocusChain"; type: "QQuickItem*" } + Method { name: "childAt" type: "QQuickItem*" Parameter { name: "x"; type: "double" } @@ -1486,6 +1820,8 @@ Module { name: "QQuickItemView" defaultProperty: "flickableData" prototype: "QQuickFlickable" + exports: ["QtQuick/ItemView 2.1"] + exportMetaObjectRevisions: [1] Enum { name: "LayoutDirection" values: { @@ -1577,6 +1913,7 @@ Module { } Method { name: "positionViewAtBeginning" } Method { name: "positionViewAtEnd" } + Method { name: "forceLayout"; revision: 1 } } Component { name: "QQuickItemViewAttached" @@ -1595,6 +1932,7 @@ Module { name: "QQuickKeyNavigationAttached" prototype: "QObject" exports: ["QtQuick/KeyNavigation 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Priority" values: { @@ -1614,6 +1952,7 @@ Module { name: "QQuickKeysAttached" prototype: "QObject" exports: ["QtQuick/Keys 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Priority" values: { @@ -1789,62 +2128,16 @@ Module { name: "QQuickLayoutMirroringAttached" prototype: "QObject" exports: ["QtQuick/LayoutMirroring 2.0"] + exportMetaObjectRevisions: [0] Property { name: "enabled"; type: "bool" } Property { name: "childrenInherit"; type: "bool" } } Component { - name: "QQuickListElement" - prototype: "QObject" - exports: ["QtQuick/ListElement 2.0"] - } - Component { - name: "QQuickListModel" - prototype: "QAbstractListModel" - exports: ["QtQuick/ListModel 2.0"] - Property { name: "count"; type: "int"; isReadonly: true } - Property { name: "dynamicRoles"; type: "bool" } - Method { name: "clear" } - Method { - name: "remove" - Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "append" - Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "insert" - Parameter { name: "args"; type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "get" - type: "QQmlV8Handle" - Parameter { name: "index"; type: "int" } - } - Method { - name: "set" - Parameter { name: "index"; type: "int" } - Parameter { type: "QQmlV8Handle" } - } - Method { - name: "setProperty" - Parameter { name: "index"; type: "int" } - Parameter { name: "property"; type: "string" } - Parameter { name: "value"; type: "QVariant" } - } - Method { - name: "move" - Parameter { name: "from"; type: "int" } - Parameter { name: "to"; type: "int" } - Parameter { name: "count"; type: "int" } - } - Method { name: "sync" } - } - Component { name: "QQuickListView" defaultProperty: "data" prototype: "QQuickItemView" - exports: ["QtQuick/ListView 2.0"] + exports: ["QtQuick/ListView 2.0", "QtQuick/ListView 2.1"] + exportMetaObjectRevisions: [0, 1] attachedType: "QQuickListViewAttached" Enum { name: "Orientation" @@ -1882,6 +2175,7 @@ Module { defaultProperty: "data" prototype: "QQuickImplicitSizeItem" exports: ["QtQuick/Loader 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Status" values: { @@ -1909,6 +2203,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/MouseArea 2.0"] + exportMetaObjectRevisions: [0] Property { name: "mouseX"; type: "double"; isReadonly: true } Property { name: "mouseY"; type: "double"; isReadonly: true } Property { name: "containsMouse"; type: "bool"; isReadonly: true } @@ -1979,6 +2274,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/MultiPointTouchArea 2.0"] + exportMetaObjectRevisions: [0] Property { name: "touchPoints"; type: "QQuickTouchPoint"; isList: true; isReadonly: true } Property { name: "minimumTouchPoints"; type: "int" } Property { name: "maximumTouchPoints"; type: "int" } @@ -2011,6 +2307,7 @@ Module { name: "QQuickNumberAnimation" prototype: "QQuickPropertyAnimation" exports: ["QtQuick/NumberAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "from"; type: "double" } Property { name: "to"; type: "double" } } @@ -2019,6 +2316,7 @@ Module { defaultProperty: "data" prototype: "QObject" exports: ["QtQuick/Package 2.0"] + exportMetaObjectRevisions: [0] attachedType: "QQuickPackageAttached" Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } } @@ -2032,6 +2330,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/PaintedItem 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "RenderTarget" values: { @@ -2050,12 +2349,14 @@ Module { defaultProperty: "animations" prototype: "QQuickAnimationGroup" exports: ["QtQuick/ParallelAnimation 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickParentAnimation" defaultProperty: "animations" prototype: "QQuickAnimationGroup" exports: ["QtQuick/ParentAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "target"; type: "QQuickItem"; isPointer: true } Property { name: "newParent"; type: "QQuickItem"; isPointer: true } Property { name: "via"; type: "QQuickItem"; isPointer: true } @@ -2064,6 +2365,7 @@ Module { name: "QQuickParentChange" prototype: "QQuickStateOperation" exports: ["QtQuick/ParentChange 2.0"] + exportMetaObjectRevisions: [0] Property { name: "target"; type: "QQuickItem"; isPointer: true } Property { name: "parent"; type: "QQuickItem"; isPointer: true } Property { name: "x"; type: "QQmlScriptString" } @@ -2078,6 +2380,7 @@ Module { defaultProperty: "pathElements" prototype: "QObject" exports: ["QtQuick/Path 2.0"] + exportMetaObjectRevisions: [0] Property { name: "pathElements"; type: "QQuickPathElement"; isList: true; isReadonly: true } Property { name: "startX"; type: "double" } Property { name: "startY"; type: "double" } @@ -2088,6 +2391,7 @@ Module { name: "QQuickPathAnimation" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/PathAnimation 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Orientation" values: { @@ -2140,6 +2444,7 @@ Module { name: "QQuickPathArc" prototype: "QQuickCurve" exports: ["QtQuick/PathArc 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "ArcDirection" values: { @@ -2156,6 +2461,7 @@ Module { name: "QQuickPathAttribute" prototype: "QQuickPathElement" exports: ["QtQuick/PathAttribute 2.0"] + exportMetaObjectRevisions: [0] Property { name: "name"; type: "string" } Property { name: "value"; type: "double" } } @@ -2163,11 +2469,13 @@ Module { name: "QQuickPathCatmullRomCurve" prototype: "QQuickCurve" exports: ["QtQuick/PathCurve 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickPathCubic" prototype: "QQuickCurve" exports: ["QtQuick/PathCubic 2.0"] + exportMetaObjectRevisions: [0] Property { name: "control1X"; type: "double" } Property { name: "control1Y"; type: "double" } Property { name: "control2X"; type: "double" } @@ -2186,6 +2494,7 @@ Module { name: "QQuickPathInterpolator" prototype: "QObject" exports: ["QtQuick/PathInterpolator 2.0"] + exportMetaObjectRevisions: [0] Property { name: "path"; type: "QQuickPath"; isPointer: true } Property { name: "progress"; type: "double" } Property { name: "x"; type: "double"; isReadonly: true } @@ -2196,17 +2505,20 @@ Module { name: "QQuickPathLine" prototype: "QQuickCurve" exports: ["QtQuick/PathLine 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickPathPercent" prototype: "QQuickPathElement" exports: ["QtQuick/PathPercent 2.0"] + exportMetaObjectRevisions: [0] Property { name: "value"; type: "double" } } Component { name: "QQuickPathQuad" prototype: "QQuickCurve" exports: ["QtQuick/PathQuad 2.0"] + exportMetaObjectRevisions: [0] Property { name: "controlX"; type: "double" } Property { name: "controlY"; type: "double" } Property { name: "relativeControlX"; type: "double" } @@ -2216,6 +2528,7 @@ Module { name: "QQuickPathSvg" prototype: "QQuickCurve" exports: ["QtQuick/PathSvg 2.0"] + exportMetaObjectRevisions: [0] Property { name: "path"; type: "string" } } Component { @@ -2223,6 +2536,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/PathView 2.0"] + exportMetaObjectRevisions: [0] attachedType: "QQuickPathViewAttached" Enum { name: "HighlightRangeMode" @@ -2313,6 +2627,7 @@ Module { name: "QQuickPauseAnimation" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/PauseAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "duration"; type: "int" } Signal { name: "durationChanged" @@ -2331,13 +2646,15 @@ Module { name: "QQuickPinch" prototype: "QObject" exports: ["QtQuick/Pinch 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "Axis" values: { "NoDrag": 0, "XAxis": 1, "YAxis": 2, - "XAndYAxis": 3 + "XAndYAxis": 3, + "XandYAxis": 3 } } Property { name: "target"; type: "QQuickItem"; isPointer: true } @@ -2357,6 +2674,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/PinchArea 2.0"] + exportMetaObjectRevisions: [0] Property { name: "enabled"; type: "bool" } Property { name: "pinch"; type: "QQuickPinch"; isReadonly: true; isPointer: true } Signal { @@ -2383,6 +2701,7 @@ Module { name: "QQuickPropertyAction" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/PropertyAction 2.0"] + exportMetaObjectRevisions: [0] Property { name: "target"; type: "QObject"; isPointer: true } Property { name: "property"; type: "string" } Property { name: "properties"; type: "string" } @@ -2402,6 +2721,7 @@ Module { name: "QQuickPropertyAnimation" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/PropertyAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "duration"; type: "int" } Property { name: "from"; type: "QVariant" } Property { name: "to"; type: "QVariant" } @@ -2436,6 +2756,7 @@ Module { name: "QQuickPropertyChanges" prototype: "QQuickStateOperation" exports: ["QtQuick/PropertyChanges 2.0"] + exportMetaObjectRevisions: [0] Property { name: "target"; type: "QObject"; isPointer: true } Property { name: "restoreEntryValues"; type: "bool" } Property { name: "explicit"; type: "bool" } @@ -2445,6 +2766,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/Rectangle 2.0"] + exportMetaObjectRevisions: [0] Property { name: "color"; type: "QColor" } Property { name: "gradient"; type: "QQuickGradient"; isPointer: true } Property { name: "border"; type: "QQuickPen"; isReadonly: true; isPointer: true } @@ -2455,6 +2777,7 @@ Module { defaultProperty: "delegate" prototype: "QQuickItem" exports: ["QtQuick/Repeater 2.0"] + exportMetaObjectRevisions: [0] Property { name: "model"; type: "QVariant" } Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } Property { name: "count"; type: "int"; isReadonly: true } @@ -2478,6 +2801,7 @@ Module { name: "QQuickRotation" prototype: "QQuickTransform" exports: ["QtQuick/Rotation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "origin"; type: "QVector3D" } Property { name: "angle"; type: "double" } Property { name: "axis"; type: "QVector3D" } @@ -2486,6 +2810,7 @@ Module { name: "QQuickRotationAnimation" prototype: "QQuickPropertyAnimation" exports: ["QtQuick/RotationAnimation 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "RotationDirection" values: { @@ -2504,6 +2829,7 @@ Module { defaultProperty: "data" prototype: "QQuickBasePositioner" exports: ["QtQuick/Row 2.0"] + exportMetaObjectRevisions: [0] Property { name: "layoutDirection"; type: "Qt::LayoutDirection" } Property { name: "effectiveLayoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } } @@ -2511,6 +2837,7 @@ Module { name: "QQuickScale" prototype: "QQuickTransform" exports: ["QtQuick/Scale 2.0"] + exportMetaObjectRevisions: [0] Property { name: "origin"; type: "QVector3D" } Property { name: "xScale"; type: "double" } Property { name: "yScale"; type: "double" } @@ -2530,6 +2857,7 @@ Module { name: "QQuickScriptAction" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/ScriptAction 2.0"] + exportMetaObjectRevisions: [0] Property { name: "script"; type: "QQmlScriptString" } Property { name: "scriptName"; type: "string" } } @@ -2538,12 +2866,14 @@ Module { defaultProperty: "animations" prototype: "QQuickAnimationGroup" exports: ["QtQuick/SequentialAnimation 2.0"] + exportMetaObjectRevisions: [0] } Component { name: "QQuickShaderEffect" defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/ShaderEffect 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "CullMode" values: { @@ -2572,6 +2902,7 @@ Module { name: "QQuickShaderEffectMesh" prototype: "QObject" exports: ["QtQuick/ShaderEffectMesh 2.0"] + exportMetaObjectRevisions: [0] Signal { name: "geometryChanged" } } Component { @@ -2579,6 +2910,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/ShaderEffectSource 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "WrapMode" values: { @@ -2612,6 +2944,7 @@ Module { name: "QQuickSmoothedAnimation" prototype: "QQuickNumberAnimation" exports: ["QtQuick/SmoothedAnimation 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "ReversingMode" values: { @@ -2628,6 +2961,7 @@ Module { name: "QQuickSpringAnimation" prototype: "QQuickNumberAnimation" exports: ["QtQuick/SpringAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "velocity"; type: "double" } Property { name: "spring"; type: "double" } Property { name: "damping"; type: "double" } @@ -2640,6 +2974,7 @@ Module { name: "QQuickSprite" prototype: "QQuickStochasticState" exports: ["QtQuick/Sprite 2.0"] + exportMetaObjectRevisions: [0] Property { name: "source"; type: "QUrl" } Property { name: "reverse"; type: "bool" } Property { name: "frameSync"; type: "bool" } @@ -2759,6 +3094,7 @@ Module { defaultProperty: "sprites" prototype: "QQuickItem" exports: ["QtQuick/SpriteSequence 2.0"] + exportMetaObjectRevisions: [0] Property { name: "running"; type: "bool" } Property { name: "interpolate"; type: "bool" } Property { name: "goalSprite"; type: "string" } @@ -2802,6 +3138,7 @@ Module { defaultProperty: "changes" prototype: "QObject" exports: ["QtQuick/State 2.0"] + exportMetaObjectRevisions: [0] Property { name: "name"; type: "string" } Property { name: "when"; type: "QQmlBinding"; isPointer: true } Property { name: "extend"; type: "string" } @@ -2812,6 +3149,7 @@ Module { name: "QQuickStateChangeScript" prototype: "QQuickStateOperation" exports: ["QtQuick/StateChangeScript 2.0"] + exportMetaObjectRevisions: [0] Property { name: "script"; type: "QQmlScriptString" } Property { name: "name"; type: "string" } } @@ -2819,6 +3157,7 @@ Module { name: "QQuickStateGroup" prototype: "QObject" exports: ["QtQuick/StateGroup 2.0"] + exportMetaObjectRevisions: [0] Property { name: "state"; type: "string" } Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true } Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true } @@ -2882,6 +3221,7 @@ Module { name: "QQuickSystemPalette" prototype: "QObject" exports: ["QtQuick/SystemPalette 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "ColorGroup" values: { @@ -2912,6 +3252,7 @@ Module { defaultProperty: "data" prototype: "QQuickImplicitSizeItem" exports: ["QtQuick/Text 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "HAlignment" values: { @@ -3062,11 +3403,13 @@ Module { } Method { name: "doLayout" } } + Component { name: "QQuickTextDocument"; prototype: "QObject" } Component { name: "QQuickTextEdit" defaultProperty: "data" prototype: "QQuickImplicitSizeItem" - exports: ["QtQuick/TextEdit 2.0"] + exports: ["QtQuick/TextEdit 2.0", "QtQuick/TextEdit 2.1"] + exportMetaObjectRevisions: [0, 1] Enum { name: "HAlignment" values: { @@ -3144,6 +3487,7 @@ Module { Property { name: "persistentSelection"; type: "bool" } Property { name: "textMargin"; type: "double" } Property { name: "inputMethodHints"; type: "Qt::InputMethodHints" } + Property { name: "selectByKeyboard"; revision: 1; type: "bool" } Property { name: "selectByMouse"; type: "bool" } Property { name: "mouseSelectionMode"; type: "SelectionMode" } Property { name: "canPaste"; type: "bool"; isReadonly: true } @@ -3152,6 +3496,13 @@ Module { Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true } Property { name: "baseUrl"; type: "QUrl" } Property { name: "renderType"; type: "RenderType" } + Property { + name: "textDocument" + revision: 1 + type: "QQuickTextDocument" + isReadonly: true + isPointer: true + } Signal { name: "contentSizeChanged" } Signal { name: "colorChanged" @@ -3202,6 +3553,11 @@ Module { Parameter { name: "textMargin"; type: "double" } } Signal { + name: "selectByKeyboardChanged" + revision: 1 + Parameter { name: "selectByKeyboard"; type: "bool" } + } + Signal { name: "selectByMouseChanged" Parameter { name: "selectByMouse"; type: "bool" } } @@ -3280,6 +3636,7 @@ Module { defaultProperty: "data" prototype: "QQuickImplicitSizeItem" exports: ["QtQuick/TextInput 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "EchoMode" values: { @@ -3482,6 +3839,7 @@ Module { name: "QQuickTouchPoint" prototype: "QObject" exports: ["QtQuick/TouchPoint 2.0"] + exportMetaObjectRevisions: [0] Property { name: "pointId"; type: "int"; isReadonly: true } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "x"; type: "double"; isReadonly: true } @@ -3502,6 +3860,7 @@ Module { defaultProperty: "animations" prototype: "QObject" exports: ["QtQuick/Transition 2.0"] + exportMetaObjectRevisions: [0] Property { name: "from"; type: "string" } Property { name: "to"; type: "string" } Property { name: "reversible"; type: "bool" } @@ -3513,6 +3872,7 @@ Module { name: "QQuickTranslate" prototype: "QQuickTransform" exports: ["QtQuick/Translate 2.0"] + exportMetaObjectRevisions: [0] Property { name: "x"; type: "double" } Property { name: "y"; type: "double" } } @@ -3520,6 +3880,7 @@ Module { name: "QQuickVector3dAnimation" prototype: "QQuickPropertyAnimation" exports: ["QtQuick/Vector3dAnimation 2.0"] + exportMetaObjectRevisions: [0] Property { name: "from"; type: "QVector3D" } Property { name: "to"; type: "QVector3D" } } @@ -3527,6 +3888,7 @@ Module { name: "QQuickViewSection" prototype: "QObject" exports: ["QtQuick/ViewSection 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "SectionCriteria" values: { @@ -3552,6 +3914,7 @@ Module { name: "QQuickViewTransitionAttached" prototype: "QObject" exports: ["QtQuick/ViewTransition 2.0"] + exportMetaObjectRevisions: [0] Property { name: "index"; type: "int"; isReadonly: true } Property { name: "item"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "destination"; type: "QPointF"; isReadonly: true } @@ -3559,134 +3922,10 @@ Module { Property { name: "targetItems"; type: "QObject"; isList: true; isReadonly: true } } Component { - name: "QQuickVisualDataGroup" - prototype: "QObject" - exports: ["QtQuick/VisualDataGroup 2.0"] - Property { name: "count"; type: "int"; isReadonly: true } - Property { name: "name"; type: "string" } - Property { name: "includeByDefault"; type: "bool" } - Signal { name: "defaultIncludeChanged" } - Signal { - name: "changed" - Parameter { name: "removed"; type: "QQmlV8Handle" } - Parameter { name: "inserted"; type: "QQmlV8Handle" } - } - Method { - name: "insert" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "create" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "resolve" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "remove" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "addGroups" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "removeGroups" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "setGroups" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "move" - Parameter { type: "QQmlV8Function"; isPointer: true } - } - Method { - name: "get" - type: "QQmlV8Handle" - Parameter { name: "index"; type: "int" } - } - } - Component { - name: "QQuickVisualDataModel" - defaultProperty: "delegate" - prototype: "QQuickVisualModel" - exports: ["QtQuick/VisualDataModel 2.0"] - attachedType: "QQuickVisualDataModelAttached" - Property { name: "model"; type: "QVariant" } - Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } - Property { name: "filterOnGroup"; type: "string" } - Property { name: "items"; type: "QQuickVisualDataGroup"; isReadonly: true; isPointer: true } - Property { - name: "persistedItems" - type: "QQuickVisualDataGroup" - isReadonly: true - isPointer: true - } - Property { name: "groups"; type: "QQuickVisualDataGroup"; isList: true; isReadonly: true } - Property { name: "parts"; type: "QObject"; isReadonly: true; isPointer: true } - Property { name: "rootIndex"; type: "QVariant" } - Signal { name: "filterGroupChanged" } - Signal { name: "defaultGroupsChanged" } - Method { - name: "modelIndex" - type: "QVariant" - Parameter { name: "idx"; type: "int" } - } - Method { name: "parentModelIndex"; type: "QVariant" } - } - Component { - name: "QQuickVisualDataModelAttached" - prototype: "QObject" - Property { name: "model"; type: "QQuickVisualDataModel"; isReadonly: true; isPointer: true } - Property { name: "groups"; type: "QStringList" } - Property { name: "isUnresolved"; type: "bool"; isReadonly: true } - Signal { name: "unresolvedChanged" } - } - Component { name: "QQuickVisualDataModelParts"; prototype: "QObject" } - Component { - name: "QQuickVisualItemModel" - defaultProperty: "children" - prototype: "QQuickVisualModel" - exports: ["QtQuick/VisualItemModel 2.0"] - attachedType: "QQuickVisualItemModelAttached" - Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true } - } - Component { - name: "QQuickVisualItemModelAttached" - prototype: "QObject" - Property { name: "index"; type: "int"; isReadonly: true } - } - Component { - name: "QQuickVisualModel" - prototype: "QObject" - Property { name: "count"; type: "int"; isReadonly: true } - Signal { - name: "modelUpdated" - Parameter { name: "changeSet"; type: "QQuickChangeSet" } - Parameter { name: "reset"; type: "bool" } - } - Signal { - name: "createdItem" - Parameter { name: "index"; type: "int" } - Parameter { name: "item"; type: "QQuickItem"; isPointer: true } - } - Signal { - name: "initItem" - Parameter { name: "index"; type: "int" } - Parameter { name: "item"; type: "QQuickItem"; isPointer: true } - } - Signal { - name: "destroyingItem" - Parameter { name: "item"; type: "QQuickItem"; isPointer: true } - } - } - Component { name: "QQuickWorkerScript" prototype: "QObject" exports: ["QtQuick/WorkerScript 2.0"] + exportMetaObjectRevisions: [0] Property { name: "source"; type: "QUrl" } Signal { name: "message" @@ -3701,6 +3940,7 @@ Module { name: "QRegExpValidator" prototype: "QValidator" exports: ["QtQuick/RegExpValidator 2.0"] + exportMetaObjectRevisions: [0] Property { name: "regExp"; type: "QRegExp" } Signal { name: "regExpChanged" @@ -3866,9 +4106,11 @@ Module { "SplashScreen": 15, "Desktop": 17, "SubWindow": 18, + "ForeignWindow": 33, "WindowType_Mask": 255, "MSWindowsFixedSizeDialogHint": 256, "MSWindowsOwnDC": 512, + "BypassWindowManagerHint": 1024, "X11BypassWindowManagerHint": 1024, "FramelessWindowHint": 2048, "WindowTitleHint": 4096, @@ -3907,9 +4149,11 @@ Module { "SplashScreen": 15, "Desktop": 17, "SubWindow": 18, + "ForeignWindow": 33, "WindowType_Mask": 255, "MSWindowsFixedSizeDialogHint": 256, "MSWindowsOwnDC": 512, + "BypassWindowManagerHint": 1024, "X11BypassWindowManagerHint": 1024, "FramelessWindowHint": 2048, "WindowTitleHint": 4096, @@ -4105,7 +4349,8 @@ Module { "AA_X11InitThreads": 10, "AA_SynthesizeTouchForUnhandledMouseEvents": 11, "AA_SynthesizeMouseForUnhandledTouchEvents": 12, - "AA_AttributeCount": 13 + "AA_UseHighDpiPixmaps": 13, + "AA_AttributeCount": 14 } } Enum { @@ -4790,6 +5035,15 @@ Module { } } Enum { + name: "Edge" + values: { + "TopEdge": 1, + "LeftEdge": 2, + "RightEdge": 4, + "BottomEdge": 8 + } + } + Enum { name: "ConnectionType" values: { "AutoConnection": 0, @@ -4916,6 +5170,7 @@ Module { "ImhDate": 128, "ImhTime": 256, "ImhPreferLatin": 512, + "ImhMultiLine": 1024, "ImhDigitsOnly": 65536, "ImhFormattedNumbersOnly": 131072, "ImhUppercaseOnly": 262144, @@ -4941,6 +5196,7 @@ Module { "ImhDate": 128, "ImhTime": 256, "ImhPreferLatin": 512, + "ImhMultiLine": 1024, "ImhDigitsOnly": 65536, "ImhFormattedNumbersOnly": 131072, "ImhUppercaseOnly": 262144, @@ -5010,7 +5266,8 @@ Module { "ItemIsDropEnabled": 8, "ItemIsUserCheckable": 16, "ItemIsEnabled": 32, - "ItemIsTristate": 64 + "ItemIsTristate": 64, + "ItemNeverHasChildren": 128 } } Enum { diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 7584241ca6..0bec4cddf2 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -291,6 +291,11 @@ Item { } function tryCompare(obj, prop, value, timeout) { + if (arguments.length == 2) { + qtest_results.fail("A value is required for tryCompare", + util.callerFile(), util.callerLine()) + throw new Error("QtQuickTest::fail") + } if (!timeout) timeout = 5000 if (!qtest_compareInternal(obj[prop], value)) diff --git a/src/imports/widgets/plugins.qmltypes b/src/imports/widgets/plugins.qmltypes index 583a36a357..9e73330c12 100644 --- a/src/imports/widgets/plugins.qmltypes +++ b/src/imports/widgets/plugins.qmltypes @@ -39,6 +39,7 @@ Module { Property { name: "visible"; type: "bool" } Property { name: "modality"; type: "Qt::WindowModality" } Property { name: "title"; type: "string" } + Property { name: "isWindow"; type: "bool"; isReadonly: true } Property { name: "x"; type: "int" } Property { name: "y"; type: "int" } Property { name: "width"; type: "int" } @@ -56,7 +57,7 @@ Module { Property { name: "selectExisting"; type: "bool" } Property { name: "selectMultiple"; type: "bool" } Property { name: "selectFolder"; type: "bool" } - Property { name: "folder"; type: "string" } + Property { name: "folder"; type: "QUrl" } Property { name: "nameFilters"; type: "QStringList" } Property { name: "selectedNameFilter"; type: "string" } Property { name: "fileUrl"; type: "QUrl"; isReadonly: true } @@ -86,7 +87,7 @@ Module { } Method { name: "setFolder" - Parameter { name: "f"; type: "string" } + Parameter { name: "f"; type: "QUrl" } } Method { name: "setNameFilters" diff --git a/src/imports/widgets/qquickqcolordialog.cpp b/src/imports/widgets/qquickqcolordialog.cpp index abe6ffd004..d10eacee60 100644 --- a/src/imports/widgets/qquickqcolordialog.cpp +++ b/src/imports/widgets/qquickqcolordialog.cpp @@ -68,8 +68,11 @@ public: virtual void exec() { m_dialog.exec(); } virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) { - m_dialog.windowHandle()->setTransientParent(parent); - m_dialog.windowHandle()->setFlags(f); + m_dialog.winId(); + QWindow *window = m_dialog.windowHandle(); + Q_ASSERT(window); + window->setTransientParent(parent); + window->setFlags(f); m_dialog.setWindowModality(m); m_dialog.setWindowTitle(QPlatformColorDialogHelper::options()->windowTitle()); m_dialog.setOptions((QColorDialog::ColorDialogOptions)((int)(QPlatformColorDialogHelper::options()->options()))); diff --git a/src/imports/widgets/qquickqfiledialog.cpp b/src/imports/widgets/qquickqfiledialog.cpp index 672c6d1bf4..498e34a24c 100644 --- a/src/imports/widgets/qquickqfiledialog.cpp +++ b/src/imports/widgets/qquickqfiledialog.cpp @@ -96,8 +96,11 @@ public: virtual void exec() { m_dialog.exec(); } virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) { - m_dialog.windowHandle()->setTransientParent(parent); - m_dialog.windowHandle()->setFlags(f); + m_dialog.winId(); + QWindow *window = m_dialog.windowHandle(); + Q_ASSERT(window); + window->setTransientParent(parent); + window->setFlags(f); m_dialog.setWindowModality(m); m_dialog.show(); return m_dialog.isVisible(); @@ -132,14 +135,14 @@ private: \qmlsignal QtQuick::Dialogs::FileDialog::accepted The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a filePath or \a filePaths properties to + dialog. You can then inspect the \a fileUrl or \a fileUrls properties to get the selection. Example: \qml FileDialog { - onAccepted: { console.log("Selected file: " + filePath) } + onAccepted: { console.log("Selected file: " + fileUrl) } } \endqml */ diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes index b79702edb6..59e69114e1 100644 --- a/src/imports/window/plugins.qmltypes +++ b/src/imports/window/plugins.qmltypes @@ -3,7 +3,7 @@ import QtQuick.tooling 1.1 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // -// This file was auto-generated with the command '../../../bin/qmlplugindump.app/Contents/MacOS/qmlplugindump QtQuick.Window 2.1 -notrelocatable'. +// This file was auto-generated with the command 'qmlplugindump QtQuick.Window 2.1 -notrelocatable'. Module { Component { @@ -23,15 +23,23 @@ Module { name: "QQuickScreen" prototype: "QObject" exports: ["QtQuick.Window/Screen 2.0"] + exportMetaObjectRevisions: [0] attachedType: "QQuickScreenAttached" } Component { name: "QQuickScreenAttached" prototype: "QObject" + Property { name: "name"; revision: 1; type: "string"; isReadonly: true } Property { name: "width"; type: "int"; isReadonly: true } Property { name: "height"; type: "int"; isReadonly: true } + Property { name: "desktopAvailableWidth"; revision: 1; type: "int"; isReadonly: true } + Property { name: "desktopAvailableHeight"; revision: 1; type: "int"; isReadonly: true } + Property { name: "logicalPixelDensity"; revision: 1; type: "double"; isReadonly: true } Property { name: "primaryOrientation"; type: "Qt::ScreenOrientation"; isReadonly: true } Property { name: "orientation"; type: "Qt::ScreenOrientation"; isReadonly: true } + Signal { name: "nameChanged"; revision: 1 } + Signal { name: "desktopGeometryChanged"; revision: 1 } + Signal { name: "logicalPixelDensityChanged"; revision: 1 } Method { name: "angleBetween" type: "int" @@ -62,6 +70,11 @@ Module { Signal { name: "beforeRendering" } Signal { name: "afterRendering" } Signal { + name: "closing" + revision: 1 + Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true } + } + Signal { name: "colorChanged" Parameter { type: "QColor" } } @@ -95,6 +108,7 @@ Module { Property { name: "maximumWidth"; revision: 1; type: "int" } Property { name: "maximumHeight"; revision: 1; type: "int" } Property { name: "visible"; type: "bool" } + Property { name: "active"; revision: 1; type: "bool"; isReadonly: true } Property { name: "visibility"; revision: 1; type: "Visibility" } Property { name: "contentOrientation"; revision: 1; type: "Qt::ScreenOrientation" } Property { name: "opacity"; revision: 1; type: "double" } @@ -155,6 +169,7 @@ Module { revision: 1 Parameter { name: "visibility"; type: "QWindow::Visibility" } } + Signal { name: "activeChanged"; revision: 1 } Signal { name: "contentOrientationChanged" revision: 1 @@ -169,6 +184,7 @@ Module { revision: 1 Parameter { name: "opacity"; type: "double" } } + Method { name: "requestActivate"; revision: 1 } Method { name: "setVisible" Parameter { name: "visible"; type: "bool" } @@ -222,5 +238,9 @@ Module { revision: 1 Parameter { name: "h"; type: "int" } } + Method { + name: "alert" + Parameter { name: "msec"; type: "int" } + } } } |