diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2016-02-16 23:40:04 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2016-02-16 23:40:04 +0100 |
| commit | 07fb609095291f8d8544441925dea3d60d636f87 (patch) | |
| tree | f17f17badc7c0ad8f0147b8968bae91016244a97 /rockwork/qml/ImportPackagePage.qml | |
| parent | e54ee938a3e637f654b393f41ce2ad123d448639 (diff) | |
Moved qml to subdir to unbundle
Diffstat (limited to 'rockwork/qml/ImportPackagePage.qml')
| -rw-r--r-- | rockwork/qml/ImportPackagePage.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rockwork/qml/ImportPackagePage.qml b/rockwork/qml/ImportPackagePage.qml new file mode 100644 index 0000000..4f86f78 --- /dev/null +++ b/rockwork/qml/ImportPackagePage.qml @@ -0,0 +1,32 @@ +import QtQuick 2.4 +import Ubuntu.Components 1.3 +import Ubuntu.Content 1.3 + +Page { + id: root + title: i18n.tr("Import watchapp or watchface") + + property var pebble: null + + ContentPeerPicker { + anchors.fill: parent + handler: ContentHandler.Source + contentType: ContentType.All + showTitle: false + + onPeerSelected: { + var transfer = peer.request(); + + transfer.stateChanged.connect(function() { + if (transfer.state == ContentTransfer.Charged) { + for (var i = 0; i < transfer.items.length; i++) { + print("sideloading package", transfer.items[i].url) + root.pebble.sideloadApp(transfer.items[i].url) + } + pageStack.pop(); + } + }) + } + } +} + |
