summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-06-04 11:27:38 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-20 14:19:06 -0700
commit6ba5b45c004e19b2845acdb549d727f3c80b5c51 (patch)
tree83ba40445fead286a25d9f9bf2c4bbc5fd965ac0 /qt-mobile
parentb09975f46a5223062c58453b7b867d5621586e5a (diff)
downloadsubsurface-6ba5b45c004e19b2845acdb549d727f3c80b5c51.tar.gz
Add FileOpen dialog to QML
Add a dialog to select dive files in the QML interface, and also add a menu entry to open the dialog. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/main.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml
index 52cfd9838..a98fb14d6 100644
--- a/qt-mobile/main.qml
+++ b/qt-mobile/main.qml
@@ -1,15 +1,28 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Window 2.2
+import QtQuick.Dialogs 1.2
ApplicationWindow {
title: qsTr("Subsurface")
width: 500;
height: 700
+
+ FileDialog {
+ id: fileOpen
+ selectExisting: true
+ selectMultiple: true
+ }
+
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
+ text: qsTr("Open")
+ onTriggered: fileOpen.open()
+ }
+
+ MenuItem {
text: qsTr("Exit")
onTriggered: Qt.quit();
}