mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
315a245868
Add a link between the C++ and QML parts of the app using the qmlRegisterType function. [Dirk Hohndel: changed the name to org.subsurfacedivelog.mobile] Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
40 lines
586 B
QML
40 lines
586 B
QML
import QtQuick 2.3
|
|
import QtQuick.Controls 1.2
|
|
import QtQuick.Window 2.2
|
|
import QtQuick.Dialogs 1.2
|
|
import org.subsurfacedivelog.mobile 1.0
|
|
|
|
ApplicationWindow {
|
|
title: qsTr("Subsurface")
|
|
width: 500;
|
|
height: 700
|
|
|
|
FileDialog {
|
|
id: fileOpen
|
|
selectExisting: true
|
|
selectMultiple: true
|
|
|
|
onAccepted: {
|
|
manager.setFilename(fileUrl)
|
|
}
|
|
}
|
|
|
|
QMLManager {
|
|
id: manager
|
|
}
|
|
|
|
menuBar: MenuBar {
|
|
Menu {
|
|
title: qsTr("File")
|
|
MenuItem {
|
|
text: qsTr("Open")
|
|
onTriggered: fileOpen.open()
|
|
}
|
|
|
|
MenuItem {
|
|
text: qsTr("Exit")
|
|
onTriggered: Qt.quit();
|
|
}
|
|
}
|
|
}
|
|
}
|