diff options
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml')
-rw-r--r-- | examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml index 9abbb294d..c089f6b1b 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -52,10 +52,11 @@ Rectangle { signal fileSelected(string file) function selectFile(file) { - if (file != "") + if (file !== "") { folder = loader.item.folders.folder + fileBrowser.fileSelected(file) + } loader.sourceComponent = undefined - fileBrowser.fileSelected(file) } Loader { @@ -101,10 +102,11 @@ Rectangle { Rectangle { id: wrapper function launch() { + var path = "file:///" + filePath if (folders.isFolder(index)) - down(filePath); + down(path); else - fileBrowser.selectFile(filePath) + fileBrowser.selectFile(path) } width: root.width height: 52 @@ -160,28 +162,6 @@ Rectangle { } } - Rectangle { - id: cancelButton - width: 100 - height: titleBar.height - 7 - color: "black" - anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } - - Text { - anchors { fill: parent; margins: 4 } - text: "Cancel" - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - } - - MouseArea { - anchors.fill: parent - onClicked: fileBrowser.selectFile("") - } - } - ListView { id: view1 anchors.top: titleBar.bottom @@ -279,6 +259,28 @@ Rectangle { Keys.onPressed: root.keyPressed(event.key) } + Rectangle { + id: cancelButton + width: 100 + height: titleBar.height - 7 + color: "black" + anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } + + Text { + anchors { fill: parent; margins: 4 } + text: "Cancel" + color: "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 20 + } + + MouseArea { + anchors.fill: parent + onClicked: fileBrowser.selectFile("") + } + } + Keys.onPressed: { root.keyPressed(event.key); if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) { |