mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
b09975f46a
commit
6ba5b45c00
1 changed files with 13 additions and 0 deletions
|
@ -1,14 +1,27 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
title: qsTr("Subsurface")
|
title: qsTr("Subsurface")
|
||||||
width: 500;
|
width: 500;
|
||||||
height: 700
|
height: 700
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: fileOpen
|
||||||
|
selectExisting: true
|
||||||
|
selectMultiple: true
|
||||||
|
}
|
||||||
|
|
||||||
menuBar: MenuBar {
|
menuBar: MenuBar {
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("File")
|
title: qsTr("File")
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Open")
|
||||||
|
onTriggered: fileOpen.open()
|
||||||
|
}
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Exit")
|
text: qsTr("Exit")
|
||||||
onTriggered: Qt.quit();
|
onTriggered: Qt.quit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue