aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/ios/subsurface-ios/main.qml
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2016-03-06 06:46:26 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-06 11:02:48 -0800
commit710b3615fe875cd99a78f643790201b587ffef97 (patch)
tree8cdf544c07bb6e7a67135b60479bac0a77616800 /packaging/ios/subsurface-ios/main.qml
parent74e6e0ed3798863ccffb39ab46dd88e67b4b460c (diff)
downloadsubsurface-710b3615fe875cd99a78f643790201b587ffef97.tar.gz
iOS build: add various support files
It's unclear why the build fails if we don't add the sample app files as well. [Dirk Hohndel: refactored the patches] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/ios/subsurface-ios/main.qml')
-rw-r--r--packaging/ios/subsurface-ios/main.qml40
1 files changed, 40 insertions, 0 deletions
diff --git a/packaging/ios/subsurface-ios/main.qml b/packaging/ios/subsurface-ios/main.qml
new file mode 100644
index 000000000..26b1a7998
--- /dev/null
+++ b/packaging/ios/subsurface-ios/main.qml
@@ -0,0 +1,40 @@
+import QtQuick 2.6
+import QtQuick.Controls 1.5
+import QtQuick.Dialogs 1.2
+
+ApplicationWindow {
+ visible: true
+ width: 640
+ height: 480
+ title: qsTr("Hello World")
+
+ menuBar: MenuBar {
+ Menu {
+ title: qsTr("File")
+ MenuItem {
+ text: qsTr("&Open")
+ onTriggered: console.log("Open action triggered");
+ }
+ MenuItem {
+ text: qsTr("Exit")
+ onTriggered: Qt.quit();
+ }
+ }
+ }
+
+ MainForm {
+ anchors.fill: parent
+ button1.onClicked: messageDialog.show(qsTr("Button 1 pressed"))
+ button2.onClicked: messageDialog.show(qsTr("Button 2 pressed"))
+ }
+
+ MessageDialog {
+ id: messageDialog
+ title: qsTr("May I have your attention, please?")
+
+ function show(caption) {
+ messageDialog.text = caption;
+ messageDialog.open();
+ }
+ }
+}