From db2c0781218b7dfa03f7bc39b1e2115dbf4a0fb0 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Mon, 16 Dec 2013 20:48:08 +0100 Subject: Qt Quick File Picker Change-Id: I6195c49f1647c78b16d9d47770ab37ba998a61a5 Reviewed-by: Jocelyn Turcotte --- src/webengine/ui/FilePicker.qml | 51 +++++++++++++++++++++++++++++++++++++++++ src/webengine/ui/qmldir | 1 + src/webengine/ui/ui.pro | 1 + 3 files changed, 53 insertions(+) create mode 100644 src/webengine/ui/FilePicker.qml (limited to 'src/webengine/ui') diff --git a/src/webengine/ui/FilePicker.qml b/src/webengine/ui/FilePicker.qml new file mode 100644 index 000000000..02b0bebea --- /dev/null +++ b/src/webengine/ui/FilePicker.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick.Dialogs 1.1 + +FileDialog { + + signal filesSelected(var fileList); + + onAccepted: { + filesSelected(fileUrls); + } +} diff --git a/src/webengine/ui/qmldir b/src/webengine/ui/qmldir index bb942a81a..69ebe1bad 100644 --- a/src/webengine/ui/qmldir +++ b/src/webengine/ui/qmldir @@ -1,6 +1,7 @@ module QtWebEngine.UIDelegates AlertDialog 1.0 AlertDialog.qml ConfirmDialog 1.0 ConfirmDialog.qml +FilePicker 1.0 FilePicker.qml PromptDialog 1.0 PromptDialog.qml Menu 1.0 Menu.qml MenuItem 1.0 MenuItem.qml diff --git a/src/webengine/ui/ui.pro b/src/webengine/ui/ui.pro index 049b428f5..a5ae648cb 100644 --- a/src/webengine/ui/ui.pro +++ b/src/webengine/ui/ui.pro @@ -4,6 +4,7 @@ QML_FILES += \ # JS Dialogs AlertDialog.qml \ ConfirmDialog.qml \ + FilePicker.qml \ PromptDialog.qml \ # Menus. Based on Qt Quick Controls Menu.qml \ -- cgit v1.2.3