]> git.tdb.fi Git - xinema.git/blobdiff - remote/qml/pages/ConnectPage.qml
Add a remote control program for Sailfish OS
[xinema.git] / remote / qml / pages / ConnectPage.qml
diff --git a/remote/qml/pages/ConnectPage.qml b/remote/qml/pages/ConnectPage.qml
new file mode 100644 (file)
index 0000000..4117cc7
--- /dev/null
@@ -0,0 +1,53 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import fi.mikkosoft.xinema 0.1
+
+Page
+{
+       id: page
+
+       Item
+       {
+               width: page.width
+               height: page.height
+
+               PageHeader
+               {
+                       title: qsTr("Connecting...")
+               }
+
+               Column
+               {
+                       width: parent.width
+                       spacing: Theme.paddingSmall
+                       anchors.verticalCenter: parent.verticalCenter
+
+                       Label
+                       {
+                               width: parent.width
+                               text: "Searching for Xinema server"
+                               horizontalAlignment: Text.AlignHCenter
+                       }
+                       Label
+                       {
+                               width: parent.width
+                               text: "Please wait"
+                               horizontalAlignment: Text.AlignHCenter
+                       }
+               }
+
+               Discovery
+               {
+                       id: discovery
+                       active: true
+
+                       onServerNameChanged:
+                       {
+                               discovery.active = false;
+                               xinemaControl.connect(discovery.serverName);
+                               pageStack.replace("BrowsePage.qml");
+                       }
+               }
+       }
+}
+