From 0f3d090bd1dc9a6b912eb0b1e587602573304b4a Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 17 Feb 2016 20:41:52 +0100 Subject: First attempt at QML hacking. Main and ServiceControl adapted. Project files --- po/de.po | 31 +- po/en_GB.po | 31 +- po/eu.po | 32 +- po/fr.po | 83 ++-- po/hu.po | 32 +- po/it.po | 90 ++-- po/pt.po | 72 ++-- po/rockwork.mzanetti.pot | 23 +- po/ru.po | 31 +- po/template.pot | 23 +- rockpool.pro.user | 407 ++++++++++++++++++ rockwork.pro.user | 407 ++++++++++++++++++ rockwork/artwork/back-cover.png | Bin 0 -> 1939 bytes rockwork/artwork/rockwork.svg | 275 ------------- rockwork/main.cpp | 36 +- rockwork/qml/AppSettingsPage.qml | 6 +- rockwork/qml/AppStoreDetailsPage.qml | 6 +- rockwork/qml/AppStorePage.qml | 400 +++++++++--------- rockwork/qml/ContentPeerPickerPage.qml | 7 +- rockwork/qml/CoverPage.qml | 44 ++ rockwork/qml/DeveloperToolsPage.qml | 8 +- rockwork/qml/FirmwareUpgradePage.qml | 4 +- rockwork/qml/HealthSettingsDialog.qml | 8 +- rockwork/qml/ImportPackagePage.qml | 6 +- rockwork/qml/InfoPage.qml | 6 +- rockwork/qml/InstalledAppDelegate.qml | 72 ++-- rockwork/qml/InstalledAppsPage.qml | 314 +++++++------- rockwork/qml/Main.qml | 20 +- rockwork/qml/MainMenuPage.qml | 455 ++++++++++----------- rockwork/qml/NotificationsPage.qml | 137 ++++--- rockwork/qml/PebbleModels.qml | 46 +-- rockwork/qml/PebblesPage.qml | 6 +- rockwork/qml/ScreenshotsPage.qml | 9 +- rockwork/qml/SettingsPage.qml | 7 +- rockwork/qml/SystemAppIcon.qml | 30 +- rockwork/rockpool.desktop | 9 +- rockwork/rockpool.png | Bin 0 -> 5507 bytes rockwork/rockwork.apparmor | 7 - rockwork/rockwork.pro | 125 +++--- rockwork/rockwork.qrc | 22 +- rockwork/rockwork.svg | 275 ------------- rockwork/rockwork.url-dispatcher | 5 - rockwork/servicecontrol.cpp | 133 +++--- rockwork/servicecontrol.h | 23 +- rockwork/snowywhite.png | Bin 14213 -> 0 bytes rockwork/snowywhite.svg | 241 ----------- rockworkd/jsfiles.qrc | 2 - rockworkd/libpebble/watchconnection.cpp | 18 +- .../sailfish/callchannelobserver.cpp | 9 +- .../sailfish/callchannelobserver.h | 2 +- .../sailfish/sailfishplatform.h | 6 +- .../sailfish/voicecallhandler.cpp | 372 +++++++++++++++++ .../sailfish/voicecallhandler.h | 96 +++++ .../sailfish/voicecallmanager.cpp | 315 ++++++++++++++ .../sailfish/voicecallmanager.h | 111 +++++ rockworkd/rockworkd.pro | 23 +- rpm/rockpool.spec | 16 +- rpm/rockpool.yaml | 11 +- 58 files changed, 2868 insertions(+), 2117 deletions(-) create mode 100644 rockpool.pro.user create mode 100644 rockwork.pro.user create mode 100644 rockwork/artwork/back-cover.png delete mode 100644 rockwork/artwork/rockwork.svg create mode 100644 rockwork/qml/CoverPage.qml create mode 100644 rockwork/rockpool.png delete mode 100644 rockwork/rockwork.apparmor delete mode 100644 rockwork/rockwork.svg delete mode 100644 rockwork/rockwork.url-dispatcher delete mode 100644 rockwork/snowywhite.png delete mode 100644 rockwork/snowywhite.svg delete mode 100644 rockworkd/jsfiles.qrc create mode 100644 rockworkd/platformintegration/sailfish/voicecallhandler.cpp create mode 100644 rockworkd/platformintegration/sailfish/voicecallhandler.h create mode 100644 rockworkd/platformintegration/sailfish/voicecallmanager.cpp create mode 100644 rockworkd/platformintegration/sailfish/voicecallmanager.h diff --git a/po/de.po b/po/de.po index 4ae253d..ee2254c 100644 --- a/po/de.po +++ b/po/de.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: rockwork\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: 2016-01-12 09:52+0000\n" "Last-Translator: Michael Zanetti \n" "Language-Team: German \n" -"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,7 +57,7 @@ msgstr "Neue App hinzufügen" msgid "Add new watchface" msgstr "Neues Ziffernblatt hinzufügen" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Alle anzeigen" @@ -76,26 +75,19 @@ msgstr "Bildschirmfotos" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -112,7 +104,7 @@ msgid "Firmware upgrade" msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -180,10 +172,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -237,7 +225,7 @@ msgid "Close" msgstr "Schließen" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 @@ -283,7 +271,8 @@ msgid "Open System Settings" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:230 diff --git a/po/en_GB.po b/po/en_GB.po index b1d9a45..bda1364 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: rockwork\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: 2016-01-26 18:00+0000\n" "Last-Translator: Emanuele Antonio Faraone \n" "Language-Team: English (United Kingdom) \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,7 +57,7 @@ msgstr "Add new watchapp" msgid "Add new watchface" msgstr "Add new watchface" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "See all" @@ -76,26 +75,19 @@ msgstr "Screenshots" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -112,7 +104,7 @@ msgid "Firmware upgrade" msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -180,10 +172,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -237,7 +225,7 @@ msgid "Close" msgstr "Close" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 @@ -283,7 +271,8 @@ msgid "Open System Settings" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:230 diff --git a/po/eu.po b/po/eu.po index 15aebaf..8377870 100644 --- a/po/eu.po +++ b/po/eu.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: rockwork\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: 2016-02-03 22:34+0000\n" "Last-Translator: Aitzol Berasategi \n" "Language-Team: Basque \n" -"Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,7 +57,7 @@ msgstr "Watchapp berria gehitu" msgid "Add new watchface" msgstr "Watchface berria gehitu" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Guztiak ikusi" @@ -76,26 +75,19 @@ msgstr "Pantaila-argazkiak" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -112,8 +104,7 @@ msgid "Firmware upgrade" msgstr "Firmware eguneraketa" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -#, fuzzy -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" "Firmware eguneraketa bat dago eskuragarri zure Pebble smartwatch-earentzat." @@ -184,10 +175,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -241,7 +228,7 @@ msgid "Close" msgstr "Itxi" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 @@ -290,7 +277,8 @@ msgid "Open System Settings" msgstr "Sistema Ezarpenak Ireki" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" "Zure Pebble smartwatch-ea fabrika moduan aurkitzen da eta beharrezkoa du " "berrezartzea." diff --git a/po/fr.po b/po/fr.po index 606940a..8223379 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: upebble\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" -"PO-Revision-Date: 2016-02-08 18:15+0000\n" -"Last-Translator: cm-t arudy \n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" +"PO-Revision-Date: 2016-02-07 15:41+0000\n" +"Last-Translator: Anne \n" "Language-Team: French \n" -"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -56,15 +55,15 @@ msgstr "Ajouter une nouvelle application pour montre" #: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:8 msgid "Add new watchface" -msgstr "Ajouter une nouveau cadran" +msgstr "Ajouter un nouveau thème de montre" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Tout voir" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:9 msgid "Developer Tools" -msgstr "Outils pour développeurs" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:28 #: /home/micha/Develop/upebble/rockwork/ScreenshotsPage.qml:11 @@ -74,10 +73,6 @@ msgstr "Captures d'écran" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:35 #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:102 msgid "Report problem" -msgstr "Signaler un problème" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 @@ -85,16 +80,13 @@ msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" -msgstr "Envoi de rockworkd.log" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "rockworkd.log" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" @@ -112,8 +104,7 @@ msgid "Firmware upgrade" msgstr "Mise à niveau du micrologiciel" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -#, fuzzy -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" "Une nouvelle version du logiciel est disponible pour votre montre connectée " "Pebble." @@ -148,27 +139,27 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:9 msgid "Health settings" -msgstr "Paramètre de Bien-Être" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:17 msgid "Health app enabled" -msgstr "L'application Bien-Être est activé" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Female" -msgstr "Femme" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Male" -msgstr "Homme" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:34 msgid "Age" -msgstr "Âge" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:47 msgid "Height (cm)" -msgstr "Taille (cm):" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:60 msgid "Weight" @@ -184,24 +175,20 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:95 msgid "OK" -msgstr "Valider" - -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" -msgstr "Version %1" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:40 msgid "Contributors" -msgstr "Contributeurs" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:52 msgid "Legal" -msgstr "Informations légales" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:74 msgid "" @@ -215,7 +202,7 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:9 msgid "Apps & Watchfaces" -msgstr "Applications & Cadrans" +msgstr "Applications & thèmes de montre" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:9 msgid "Apps" @@ -223,7 +210,7 @@ msgstr "Applications" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:9 msgid "Watchfaces" -msgstr "Cadrans" +msgstr "Thèmes de montre" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:167 msgid "Launch" @@ -243,12 +230,12 @@ msgid "Close" msgstr "Fermer" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 msgid "Developer tools" -msgstr "Outils de développement" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:52 msgid "Manage notifications" @@ -260,12 +247,12 @@ msgstr "Gérer les applications" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:67 msgid "Manage Watchfaces" -msgstr "Gérer les cadrans" +msgstr "Gérer les thèmes de montre" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:75 #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:8 msgid "Settings" -msgstr "Paramètres" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:190 #: /home/micha/Develop/upebble/rockwork/PebblesPage.qml:36 @@ -292,7 +279,8 @@ msgid "Open System Settings" msgstr "Ouvrir les paramètres système" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" "Votre montre connectée Pebble est en mode usine et a besoin d'être " "initialisée." @@ -349,23 +337,20 @@ msgstr "Enregistrer" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:19 msgid "Distance Units" -msgstr "Unités de Distance" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:35 msgid "Metric" -msgstr "Métrique" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:48 msgid "Imperial" -msgstr "Impérial" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:55 msgid "Calendar" -msgstr "Agenda" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:62 msgid "Sync calendar to timeline" -msgstr "Synchroniser l'agenda sur la Timeline." - -#~ msgid "Info" -#~ msgstr "Informations" +msgstr "" diff --git a/po/hu.po b/po/hu.po index fc87d6a..a49fd8a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: rockwork\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: 2016-02-02 09:30+0000\n" "Last-Translator: Richard Somlói \n" "Language-Team: Hungarian \n" -"Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,7 +57,7 @@ msgstr "Új alkalmazás hozzáadása" msgid "Add new watchface" msgstr "Új számlap hozzáadása" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Összes" @@ -76,26 +75,19 @@ msgstr "Képernyőképek" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -112,8 +104,7 @@ msgid "Firmware upgrade" msgstr "Firmware frissítés" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -#, fuzzy -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "Egy új firmware frissítés érhető el a Pebble okosórájához" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -183,10 +174,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -240,7 +227,7 @@ msgid "Close" msgstr "Bezárás" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 @@ -289,7 +276,8 @@ msgid "Open System Settings" msgstr "Rendszerbeállítások megnyitása" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "Az Pebble okosórája gyári állapotban van és inicializálni kell." #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:230 diff --git a/po/it.po b/po/it.po index e43daa1..80895f5 100644 --- a/po/it.po +++ b/po/it.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: upebble\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" -"PO-Revision-Date: 2016-02-08 13:28+0000\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" +"PO-Revision-Date: 2016-02-02 06:06+0000\n" "Last-Translator: Emanuele Antonio Faraone \n" "Language-Team: Italian \n" -"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,13 +57,13 @@ msgstr "Aggiungi una nuova watchapp" msgid "Add new watchface" msgstr "Aggiungi una nuova watchapp" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Mostra tutto" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:9 msgid "Developer Tools" -msgstr "Strumenti per lo sviluppo" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:28 #: /home/micha/Develop/upebble/rockwork/ScreenshotsPage.qml:11 @@ -74,31 +73,24 @@ msgstr "Screenshots" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:35 #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:102 msgid "Report problem" -msgstr "riporta un problema" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." -msgstr "preparando il log dei pacchetti..." +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" -msgstr "Invia rockworkd.log" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "rockworkd.log" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" -msgstr "Invia Log del Pebble" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:146 #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:110 @@ -112,8 +104,7 @@ msgid "Firmware upgrade" msgstr "Aggiornamento Firmware" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -#, fuzzy -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "Un nuovo aggiornamento del firmware è disponibile per il tuo Pebble." #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -145,70 +136,66 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:9 msgid "Health settings" -msgstr "Impostazioni Salute" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:17 msgid "Health app enabled" -msgstr "App Salute è attiva" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Female" -msgstr "Femmina" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Male" -msgstr "Maschio" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:34 msgid "Age" -msgstr "Età" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:47 msgid "Height (cm)" -msgstr "Altezza (cm)" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:60 msgid "Weight" -msgstr "Peso" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:73 msgid "I want to be more active" -msgstr "Vorrei Essere più attivo" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:84 msgid "I want to sleep more" -msgstr "Vorrei dormire di più" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:95 msgid "OK" -msgstr "OK" - -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" -msgstr "Versione %1" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:40 msgid "Contributors" -msgstr "Collaboratori" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:52 msgid "Legal" -msgstr "Note legali" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:74 msgid "" "This application is neither affiliated with nor endorsed by Pebble " "Technology Corp." -msgstr "Quest' applicazione non è affiliata con Pebble Technology Corp." +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:79 msgid "Pebble is a trademark of Pebble Technology Corp." -msgstr "Pebble è un Marchio Registrato di Pebble Technology Corp." +msgstr "" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:9 msgid "Apps & Watchfaces" @@ -240,12 +227,12 @@ msgid "Close" msgstr "Chiudi" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 msgid "Developer tools" -msgstr "Strumenti per sviluppatori" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:52 msgid "Manage notifications" @@ -262,7 +249,7 @@ msgstr "Gestisci le Watchfaces" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:75 #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:8 msgid "Settings" -msgstr "Impostazioni" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:190 #: /home/micha/Develop/upebble/rockwork/PebblesPage.qml:36 @@ -289,8 +276,10 @@ msgid "Open System Settings" msgstr "Impostazioni aperte" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." -msgstr "Il tuo Pebble è in modalitá di fabbrica e sta per essere inizializzato" +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." +msgstr "" +"Il tuo Pebble è in modalitá di fabbrica e sta per essere inizializzato" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:230 msgid "Initialize Pebble" @@ -343,23 +332,20 @@ msgstr "Salva" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:19 msgid "Distance Units" -msgstr "Unità di distanza" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:35 msgid "Metric" -msgstr "Metrica" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:48 msgid "Imperial" -msgstr "Imperiale" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:55 msgid "Calendar" -msgstr "Calendario" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:62 msgid "Sync calendar to timeline" -msgstr "Sincronizza con la timeline del calendario" - -#~ msgid "Info" -#~ msgstr "Informazioni" +msgstr "" diff --git a/po/pt.po b/po/pt.po index f18423a..406946e 100644 --- a/po/pt.po +++ b/po/pt.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: upebble\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" -"PO-Revision-Date: 2016-02-08 15:44+0000\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" +"PO-Revision-Date: 2016-02-05 15:12+0000\n" "Last-Translator: Vitor Loureiro \n" "Language-Team: Portuguese \n" -"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,13 +57,13 @@ msgstr "Adicionar nova watchapp" msgid "Add new watchface" msgstr "Adicionar nova watchface" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "Ver todos" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:9 msgid "Developer Tools" -msgstr "Ferramentas de Desenvolvimento" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:28 #: /home/micha/Develop/upebble/rockwork/ScreenshotsPage.qml:11 @@ -74,10 +73,6 @@ msgstr "Capturas de ecrã" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:35 #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:102 msgid "Report problem" -msgstr "Reportar problema" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 @@ -85,20 +80,17 @@ msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" -msgstr "Enviar rockworkd.log" - -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "rockworkd.log" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" -msgstr "Enviar logs do relógio" +msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:146 #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:110 @@ -112,8 +104,7 @@ msgid "Firmware upgrade" msgstr "Atualização do firmware" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -#, fuzzy -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" "Uma nova actualização do firmware está disponível para o seu Pebble " "smartwatch" @@ -155,52 +146,48 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Female" -msgstr "Feminino" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:28 msgid "Male" -msgstr "Masculino" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:34 msgid "Age" -msgstr "Idade" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:47 msgid "Height (cm)" -msgstr "Altura (cm)" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:60 msgid "Weight" -msgstr "Peso" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:73 msgid "I want to be more active" -msgstr "Eu quero ser mais ativo" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:84 msgid "I want to sleep more" -msgstr "Eu quero dormir mais" +msgstr "" #: /home/micha/Develop/upebble/rockwork/HealthSettingsDialog.qml:95 msgid "OK" -msgstr "OK" - -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" -msgstr "Versão %1" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:40 msgid "Contributors" -msgstr "Contribuidores" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:52 msgid "Legal" -msgstr "Legal" +msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:74 msgid "" @@ -210,7 +197,7 @@ msgstr "" #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:79 msgid "Pebble is a trademark of Pebble Technology Corp." -msgstr "Pebble é uma marca comercial da Pebble Technology Corp." +msgstr "" #: /home/micha/Develop/upebble/rockwork/InstalledAppsPage.qml:9 msgid "Apps & Watchfaces" @@ -242,12 +229,12 @@ msgid "Close" msgstr "Fechar" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 msgid "Developer tools" -msgstr "Ferramentas do programador" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:52 msgid "Manage notifications" @@ -264,7 +251,7 @@ msgstr "Gerir watchfaces" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:75 #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:8 msgid "Settings" -msgstr "Configurações" +msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:190 #: /home/micha/Develop/upebble/rockwork/PebblesPage.qml:36 @@ -288,7 +275,8 @@ msgid "Open System Settings" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" "O seu smartwatch Pebble está no modo de fábrica e precisa ser inicializado." @@ -343,15 +331,15 @@ msgstr "Guardar" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:19 msgid "Distance Units" -msgstr "Unidades de distância" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:35 msgid "Metric" -msgstr "Métrica" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:48 msgid "Imperial" -msgstr "Imperial" +msgstr "" #: /home/micha/Develop/upebble/rockwork/SettingsPage.qml:55 msgid "Calendar" diff --git a/po/rockwork.mzanetti.pot b/po/rockwork.mzanetti.pot index 0f5cbce..276f764 100644 --- a/po/rockwork.mzanetti.pot +++ b/po/rockwork.mzanetti.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,7 +57,7 @@ msgstr "" msgid "Add new watchface" msgstr "" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "" @@ -75,26 +75,19 @@ msgstr "" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -111,7 +104,7 @@ msgid "Firmware upgrade" msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -179,10 +172,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -236,7 +225,7 @@ msgid "Close" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 diff --git a/po/ru.po b/po/ru.po index b5622cc..7f29a5e 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,16 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: rockwork\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: 2016-01-23 13:33+0000\n" "Last-Translator: Eugene Marshal \n" "Language-Team: Russian \n" -"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2016-02-09 06:16+0000\n" +"X-Launchpad-Export-Date: 2016-02-08 05:41+0000\n" "X-Generator: Launchpad (build 17908)\n" #: /home/micha/Develop/upebble/rockwork/AppSettingsPage.qml:13 @@ -58,7 +57,7 @@ msgstr "Добавить приложение" msgid "Add new watchface" msgstr "Добавить циферблат" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "См. все" @@ -76,26 +75,19 @@ msgstr "Снимки экрана" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -112,7 +104,7 @@ msgid "Firmware upgrade" msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -180,10 +172,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -237,7 +225,7 @@ msgid "Close" msgstr "Закрыть" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 @@ -283,7 +271,8 @@ msgid "Open System Settings" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:221 -msgid "Your Pebble smartwatch is in factory mode and needs to be initialized." +msgid "" +"Your Pebble smartwatch is in factory mode and needs to be initialized." msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:230 diff --git a/po/template.pot b/po/template.pot index 0f5cbce..276f764 100644 --- a/po/template.pot +++ b/po/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-09 23:31+0100\n" +"POT-Creation-Date: 2016-02-08 03:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,7 +57,7 @@ msgstr "" msgid "Add new watchface" msgstr "" -#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:125 +#: /home/micha/Develop/upebble/rockwork/AppStorePage.qml:119 msgid "See all" msgstr "" @@ -75,26 +75,19 @@ msgstr "" msgid "Report problem" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:42 -msgid "Install app or watchface from file" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:109 msgid "Preparing logs package..." msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:120 -msgid "pebble.log" +#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 +msgid "rockworkd.log" msgstr "" #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:127 msgid "Send rockworkd.log" msgstr "" -#: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:132 -msgid "rockworkd.log" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/DeveloperToolsPage.qml:137 msgid "Send watch logs" msgstr "" @@ -111,7 +104,7 @@ msgid "Firmware upgrade" msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:16 -msgid "A new firmware upgrade is available for your Pebble smartwatch." +msgid "A new firmware upgrade is available for your Pebble smarwatch." msgstr "" #: /home/micha/Develop/upebble/rockwork/FirmwareUpgradePage.qml:23 @@ -179,10 +172,6 @@ msgstr "" msgid "OK" msgstr "" -#: /home/micha/Develop/upebble/rockwork/ImportPackagePage.qml:7 -msgid "Import watchapp or watchface" -msgstr "" - #: /home/micha/Develop/upebble/rockwork/InfoPage.qml:31 #, qt-format msgid "Version %1" @@ -236,7 +225,7 @@ msgid "Close" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:15 -msgid "About" +msgid "Info" msgstr "" #: /home/micha/Develop/upebble/rockwork/MainMenuPage.qml:22 diff --git a/rockpool.pro.user b/rockpool.pro.user new file mode 100644 index 0000000..a24f009 --- /dev/null +++ b/rockpool.pro.user @@ -0,0 +1,407 @@ + + + + + + EnvironmentId + {bfe4fced-130c-4a1d-b5dd-4ef663a59e13} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + MerSDK-SailfishOS-armv7hl + MerSDK-SailfishOS-armv7hl + {a1087e50-1b78-48e9-a186-a57cbfa9e4dd} + 1 + 2 + 0 + + D:/Git/build-rockpool-MerSDK_SailfishOS_armv7hl-Debug + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 3 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 2 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + D:/Git/build-rockpool-MerSDK_SailfishOS_armv7hl-Release + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 3 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 2 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + + true + RPM + + QmakeProjectManager.MerRpmBuildStep + + + true + RPM Validation + + QmakeProjectManager.MerRpmValidationStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy By Building An RPM Package + + QmakeProjectManager.MerMb2RpmBuildConfiguration + + + + + true + Prepare Target + + QmakeProjectManager.MerPrepareTargetStep + + + true + Rsync + + QmakeProjectManager.MerRsyncDeployStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy By Copying Binaries + + QmakeProjectManager.MerRSyncDeployConfiguration + + + + + true + Prepare Target + + QmakeProjectManager.MerPrepareTargetStep + + + true + RPM + + QmakeProjectManager.MerRpmDeployStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy As RPM Package + + QmakeProjectManager.MerRpmDeployConfiguration + + 3 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 1 + + rockpool (on Remote Device) + + QmakeProjectManager.MerRunConfiguration:rockpool + + rockpool + + false + + 3768 + false + true + false + false + true + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 1 + + rockpoold (on Remote Device) + + QmakeProjectManager.MerRunConfiguration:rockpoold + + rockpoold + + false + + 3768 + false + true + true + false + true + + 2 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/rockwork.pro.user b/rockwork.pro.user new file mode 100644 index 0000000..b336876 --- /dev/null +++ b/rockwork.pro.user @@ -0,0 +1,407 @@ + + + + + + EnvironmentId + {bfe4fced-130c-4a1d-b5dd-4ef663a59e13} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + MerSDK-SailfishOS-armv7hl + MerSDK-SailfishOS-armv7hl + {a1087e50-1b78-48e9-a186-a57cbfa9e4dd} + 0 + 0 + 0 + + D:/Git/build-rockwork-MerSDK_SailfishOS_armv7hl-Debug + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 3 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 2 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + D:/Git/build-rockwork-MerSDK_SailfishOS_armv7hl-Release + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 3 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Start SDK + + Mer.MerSdkStartStep + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 2 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + + true + RPM + + QmakeProjectManager.MerRpmBuildStep + + + true + RPM Validation + + QmakeProjectManager.MerRpmValidationStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy By Building An RPM Package + + QmakeProjectManager.MerMb2RpmBuildConfiguration + + + + + true + Prepare Target + + QmakeProjectManager.MerPrepareTargetStep + + + true + Rsync + + QmakeProjectManager.MerRsyncDeployStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy By Copying Binaries + + QmakeProjectManager.MerRSyncDeployConfiguration + + + + + true + Prepare Target + + QmakeProjectManager.MerPrepareTargetStep + + + true + RPM + + QmakeProjectManager.MerRpmDeployStep + + 2 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy As RPM Package + + QmakeProjectManager.MerRpmDeployConfiguration + + 3 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 1 + + rockworkd (on Remote Device) + + QmakeProjectManager.MerRunConfiguration:rockworkd + + rockworkd + + false + + 3768 + false + true + false + false + true + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + rockwork (on Remote Device) + + QmakeProjectManager.MerRunConfiguration:rockwork + + rockwork + + false + + 3768 + false + true + false + false + true + + 2 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/rockwork/artwork/back-cover.png b/rockwork/artwork/back-cover.png new file mode 100644 index 0000000..2d5ab14 Binary files /dev/null and b/rockwork/artwork/back-cover.png differ diff --git a/rockwork/artwork/rockwork.svg b/rockwork/artwork/rockwork.svg deleted file mode 100644 index e4e92c0..0000000 --- a/rockwork/artwork/rockwork.svg +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tomorrow - - diff --git a/rockwork/main.cpp b/rockwork/main.cpp index 70fd0d7..57a8772 100644 --- a/rockwork/main.cpp +++ b/rockwork/main.cpp @@ -12,26 +12,28 @@ #include "applicationsfiltermodel.h" #include "appstoreclient.h" #include "screenshotmodel.h" +#include int main(int argc, char *argv[]) { - QGuiApplication app(argc, argv); + QScopedPointer app(SailfishApp::application(argc, argv)); + app->setApplicationName("pebble"); + app->setOrganizationName(""); - qmlRegisterUncreatableType("RockWork", 1, 0, "Pebble", "Get them from the model"); - qmlRegisterUncreatableType("RockWork", 1, 0, "ApplicationsModel", "Get them from a Pebble object"); - qmlRegisterUncreatableType("RockWork", 1, 0, "AppItem", "Get them from an ApplicationsModel"); - qmlRegisterType("RockWork", 1, 0, "ApplicationsFilterModel"); - qmlRegisterType("RockWork", 1, 0, "Pebbles"); - qmlRegisterUncreatableType("RockWork", 1, 0, "NotificationSourceModel", "Get it from a Pebble object"); - qmlRegisterType("RockWork", 1, 0, "ServiceController"); - qmlRegisterType("RockWork", 1, 0, "AppStoreClient"); - qmlRegisterType("RockWork", 1, 0, "ScreenshotModel"); + qmlRegisterUncreatableType("RockPool", 1, 0, "Pebble", "Get them from the model"); + qmlRegisterUncreatableType("RockPool", 1, 0, "ApplicationsModel", "Get them from a Pebble object"); + qmlRegisterUncreatableType("RockPool", 1, 0, "AppItem", "Get them from an ApplicationsModel"); + qmlRegisterType("RockPool", 1, 0, "ApplicationsFilterModel"); + qmlRegisterType("RockPool", 1, 0, "Pebbles"); + qmlRegisterUncreatableType("RockPool", 1, 0, "NotificationSourceModel", "Get it from a Pebble object"); + qmlRegisterType("RockPool", 1, 0, "ServiceController"); + qmlRegisterType("RockPool", 1, 0, "AppStoreClient"); + qmlRegisterType("RockPool", 1, 0, "ScreenshotModel"); - QQuickView view; - view.engine()->rootContext()->setContextProperty("version", QStringLiteral(VERSION)); - view.engine()->rootContext()->setContextProperty("homePath", QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first()); - view.setSource(QUrl(QStringLiteral("qrc:///Main.qml"))); - view.setResizeMode(QQuickView::SizeRootObjectToView); - view.show(); - return app.exec(); + QScopedPointer view(SailfishApp::createView()); + view->rootContext()->setContextProperty("version", QStringLiteral(VERSION)); + view->setSource(SailfishApp::pathTo("qml/Main.qml")); + view->show(); + + return app->exec(); } diff --git a/rockwork/qml/AppSettingsPage.qml b/rockwork/qml/AppSettingsPage.qml index d8d865b..da7d577 100644 --- a/rockwork/qml/AppSettingsPage.qml +++ b/rockwork/qml/AppSettingsPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import Ubuntu.Web 0.2 -import Ubuntu.Components 1.3 -import com.canonical.Oxide 1.0 as Oxide +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: settings diff --git a/rockwork/qml/AppStoreDetailsPage.qml b/rockwork/qml/AppStoreDetailsPage.qml index 696e3c6..dbb8d5f 100644 --- a/rockwork/qml/AppStoreDetailsPage.qml +++ b/rockwork/qml/AppStoreDetailsPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 import QtGraphicalEffects 1.0 Page { diff --git a/rockwork/qml/AppStorePage.qml b/rockwork/qml/AppStorePage.qml index bb8712b..7e006da 100644 --- a/rockwork/qml/AppStorePage.qml +++ b/rockwork/qml/AppStorePage.qml @@ -1,11 +1,10 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import QtQuick.Layouts 1.1 -import RockWork 1.0 +import QtQuick 2.0 +import QtQml 2.1 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: showWatchApps ? i18n.tr("Add new watchapp") : i18n.tr("Add new watchface") property var pebble: null property bool showWatchApps: false @@ -20,247 +19,250 @@ Page { client.fetchHome(AppStoreClient.TypeWatchface) } } - - head { - actions: [ - Action { - iconName: "search" - onTriggered: { - if (searchField.shown) { - searchField.shown = false; - root.fetchHome(); - } else { - searchField.shown = true; + SilicaFlickable { + id: flickable + anchors.top: parent.top + width: parent.width + PageHeader { + title: showWatchApps ? qsTr("Add new watchapp") : qsTr("Add new watchface") + } + PullDownMenu { + MenuItem { + text: qsTr("Show search") + onClicked: { + if (searchField.shown) { + searchField.shown = false; + root.fetchHome(); + } else { + searchField.shown = true; + } } } - } - ] - } + } - Component.onCompleted: { - if (root.link) { - client.fetchLink(link) - } else { - root.fetchHome() + Component.onCompleted: { + if (root.link) { + client.fetchLink(link) + } else { + root.fetchHome() + } } - } - AppStoreClient { - id: client - hardwarePlatform: pebble.hardwarePlatform - } + AppStoreClient { + id: client + hardwarePlatform: pebble.hardwarePlatform + } - Item { - id: searchField - anchors { left: parent.left; right: parent.right; top: parent.top } - anchors.topMargin: shown ? 0 : -height - Behavior on anchors.topMargin { UbuntuNumberAnimation {} } - opacity: shown ? 1 : 0 - Behavior on opacity { UbuntuNumberAnimation {} } - height: units.gu(6) + Item { + id: searchField + anchors { left: parent.left; right: parent.right; top: parent.top } + anchors.topMargin: shown ? 0 : -height + Behavior on anchors.topMargin { NumberAnimation {} } + opacity: shown ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + height: units.gu(6) - property bool shown: false - onShownChanged: { - if (shown) { - searchTextField.focus = true; + property bool shown: false + onShownChanged: { + if (shown) { + searchTextField.focus = true; + } } - } - TextField { - id: searchTextField - anchors.centerIn: parent - width: parent.width - units.gu(2) - onDisplayTextChanged: { - searchTimer.restart() - } + SearchField { + id: searchTextField + anchors.centerIn: parent + width: parent.width - units.gu(2) + onDisplayTextChanged: { + searchTimer.restart() + } - Timer { - id: searchTimer - interval: 300 - onTriggered: { - client.search(searchTextField.displayText, root.showWatchApps ? AppStoreClient.TypeWatchapp : AppStoreClient.TypeWatchface); + Timer { + id: searchTimer + interval: 300 + onTriggered: { + client.search(searchTextField.displayText, root.showWatchApps ? AppStoreClient.TypeWatchapp : AppStoreClient.TypeWatchface); + } } } } - } - Item { - anchors { left: parent.left; top: searchField.bottom; right: parent.right; bottom: parent.bottom } - ListView { - anchors.fill: parent - model: ApplicationsFilterModel { - id: appsFilterModel - model: client.model - } - clip: true - section.property: "groupId" - section.labelPositioning: ViewSection.CurrentLabelAtStart | - ViewSection.InlineLabels - section.delegate: ListItem { - height: section ? label.implicitHeight + units.gu(3) : 0 - - Rectangle { - anchors.fill: parent - color: "white" + Item { + anchors { left: parent.left; top: searchField.bottom; right: parent.right; bottom: parent.bottom } + ListView { + anchors.fill: parent + model: ApplicationsFilterModel { + id: appsFilterModel + model: client.model } + clip: true + section.property: "groupId" + section.labelPositioning: ViewSection.CurrentLabelAtStart | + ViewSection.InlineLabels + section.delegate: ListItem { + height: section ? label.implicitHeight + units.gu(3) : 0 - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - Label { - id: label - text: client.model.groupName(section) - fontSize: "large" -// font.weight: Font.DemiBold - elide: Text.ElideRight - Layout.fillWidth: true + Rectangle { + anchors.fill: parent + color: "white" } - AbstractButton { - Layout.fillHeight: true - implicitWidth: seeAllLabel.implicitWidth + height - Row { - anchors.verticalCenter: parent.verticalCenter - Label { - id: seeAllLabel - text: i18n.tr("See all") + + Row { + anchors.fill: parent + anchors.margins: units.gu(1) + Label { + id: label + text: client.model.groupName(section) + font.pixelSize: Theme.fontSizeLarge + // font.weight: Font.DemiBold + elide: Text.ElideRight + width: parent.width + } + Button { + implicitWidth: seeAllLabel.implicitWidth + height + Row { + anchors.verticalCenter: parent.verticalCenter + Label { + id: seeAllLabel + text: qsTr("See all") + } + IconButton { + implicitHeight: parent.height + implicitWidth: height + icon.source: "image://theme/icon-m-forward" + } } - Icon { - implicitHeight: parent.height - implicitWidth: height - name: "go-next" + onClicked: { + pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, link: client.model.groupLink(section), title: client.model.groupName(section)}); } } - onClicked: { - pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, link: client.model.groupLink(section), title: client.model.groupName(section)}); - } } } - } - footer: Item { - height: client.model.links.length > 0 ? units.gu(6) : 0 - width: parent.width + footer: Item { + height: client.model.links.length > 0 ? units.gu(6) : 0 + width: parent.width - RowLayout { - anchors { - fill: parent - margins: units.gu(1) - } - spacing: units.gu(1) + Row { + anchors { + fill: parent + margins: units.gu(1) + } + spacing: units.gu(1) - Repeater { - model: client.model.links - Button { - text: client.model.linkName(client.model.links[index]) - onClicked: client.fetchLink(client.model.links[index]); - color: UbuntuColors.orange - Layout.fillWidth: true + Repeater { + model: client.model.links + Button { + text: client.model.linkName(client.model.links[index]) + onClicked: client.fetchLink(client.model.links[index]); + color: UbuntuColors.orange + width: parent.width + } } } } - } - - delegate: ListItem { - height: delegateColumn.height + units.gu(2) - RowLayout { - id: delegateRow - anchors.fill: parent - anchors.margins: units.gu(1) - spacing: units.gu(1) + delegate: ListItem { + height: delegateColumn.height + units.gu(2) - AnimatedImage { - Layout.fillHeight: true - Layout.preferredWidth: height - source: model.icon - asynchronous: true -// sourceSize.width: width -// sourceSize.height: height - } + Row { + id: delegateRow + anchors.fill: parent + anchors.margins: units.gu(1) + spacing: units.gu(1) - ColumnLayout { - id: delegateColumn - Layout.fillWidth: true; - Layout.fillHeight: true; - Label { - Layout.fillWidth: true - text: model.name - font.weight: Font.DemiBold - elide: Text.ElideRight + AnimatedImage { + source: model.icon + asynchronous: true + // sourceSize.width: width + // sourceSize.height: height } - Label { - Layout.fillWidth: true - text: model.category - } - RowLayout { - Icon { - name: "like" - Layout.preferredHeight: parent.height - Layout.preferredWidth: height - implicitHeight: parent.height + + Column { + id: delegateColumn + width: parent.width + //Layout.fillHeight: true; + Label { + width: parent.width + text: model.name + font.weight: Font.DemiBold + elide: Text.ElideRight } Label { - Layout.fillWidth: true - text: model.hearts + width: parent.width + text: model.category } - Icon { - id: tickIcon - name: "tick" - implicitHeight: parent.height - Layout.preferredWidth: height - visible: root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) - Connections { - target: root.pebble.installedApps - onChanged: { - tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) - } + Row { + IconButton { + icon.source: "image://theme/icon-m-back" + id: like + //Layout.preferredHeight: parent.height + //Layout.preferredWidth: height + implicitHeight: parent.height + } + Label { + width: parent.width + text: model.hearts } + IconButton { + id: tickIcon + icon.source: "image://theme/icon-m-acknowledge" + implicitHeight: parent.height + //Layout.preferredWidth: height + visible: root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + Connections { + target: root.pebble.installedApps + onTargetChanged: { + tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + } + } - Connections { - target: root.pebble.installedWatchfaces - onChanged: { - tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + Connections { + target: root.pebble.installedWatchfaces + onTargetChanged: { + tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + } } - } + } } } - } - } + } - onClicked: { - client.fetchAppDetails(model.storeId); - pageStack.push(Qt.resolvedUrl("AppStoreDetailsPage.qml"), {app: appsFilterModel.get(index), pebble: root.pebble}) + onClicked: { + client.fetchAppDetails(model.storeId); + pageStack.push(Qt.resolvedUrl("AppStoreDetailsPage.qml"), {app: appsFilterModel.get(index), pebble: root.pebble}) + } } } - } -// RowLayout { -// id: buttonRow -// anchors { left: parent.left; bottom: parent.bottom; right: parent.right; margins: units.gu(1) } -// spacing: units.gu(1) -// Button { -// text: i18n.tr("Previous") -// Layout.fillWidth: true -// enabled: client.offset > 0 -// onClicked: { -// client.previous() -// } -// } -// Button { -// text: i18n.tr("Next") -// Layout.fillWidth: true -// onClicked: { -// client.next() -// } -// } -// } - } + // RowLayout { + // id: buttonRow + // anchors { left: parent.left; bottom: parent.bottom; right: parent.right; margins: units.gu(1) } + // spacing: units.gu(1) + // Button { + // text: qsTr("Previous") + // Layout.fillWidth: true + // enabled: client.offset > 0 + // onClicked: { + // client.previous() + // } + // } + // Button { + // text: qsTr("Next") + // Layout.fillWidth: true + // onClicked: { + // client.next() + // } + // } + // } + } - ActivityIndicator { - anchors.centerIn: parent - running: client.busy + BusyIndicator { + anchors.centerIn: parent + running: client.busy + } } } diff --git a/rockwork/qml/ContentPeerPickerPage.qml b/rockwork/qml/ContentPeerPickerPage.qml index 7ee9702..9f9917f 100644 --- a/rockwork/qml/ContentPeerPickerPage.qml +++ b/rockwork/qml/ContentPeerPickerPage.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import Ubuntu.Content 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: pickerPage diff --git a/rockwork/qml/CoverPage.qml b/rockwork/qml/CoverPage.qml new file mode 100644 index 0000000..962e876 --- /dev/null +++ b/rockwork/qml/CoverPage.qml @@ -0,0 +1,44 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +CoverBackground { + property var pebble: null + Image { + fillMode: Image.PreserveAspectCrop + anchors.fill: parent + source: "back-cover.png" + } + + Label { + id: label + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: state.top + anchors.bottomMargin: Theme.paddingSmall + font.pointSize: Theme.fontSizeExtraLarge + text: pebble.name ? pebble.name : "Pebble" + } + Label { + id: state + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.verticalCenter + font.pointSize: Theme.fontSizeExtraSmall + color: Theme.highlightColor + text: pebble.connected ? qsTr("connected") : qsTr("disconnected") + } + + CoverActionList { + id: coverAction + enabled: pebble.connected + + CoverAction { + iconSource: pebble.connected ? "image://theme/icon-cover-transfers" : "image://theme/icon-cover-sync" + onTriggered: { + if (pebble.connected) { + pebble.requestScreenshot(); + } else { + pebble.reconnect(); + } + } + } + } +} diff --git a/rockwork/qml/DeveloperToolsPage.qml b/rockwork/qml/DeveloperToolsPage.qml index 2f77254..dec03d1 100644 --- a/rockwork/qml/DeveloperToolsPage.qml +++ b/rockwork/qml/DeveloperToolsPage.qml @@ -1,8 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Content 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/FirmwareUpgradePage.qml b/rockwork/qml/FirmwareUpgradePage.qml index 3281a12..0b0a6d5 100644 --- a/rockwork/qml/FirmwareUpgradePage.qml +++ b/rockwork/qml/FirmwareUpgradePage.qml @@ -1,5 +1,5 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: root diff --git a/rockwork/qml/HealthSettingsDialog.qml b/rockwork/qml/HealthSettingsDialog.qml index 94e5d22..66a0215 100644 --- a/rockwork/qml/HealthSettingsDialog.qml +++ b/rockwork/qml/HealthSettingsDialog.qml @@ -1,8 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Dialog { id: root diff --git a/rockwork/qml/ImportPackagePage.qml b/rockwork/qml/ImportPackagePage.qml index 4f86f78..5de3df0 100644 --- a/rockwork/qml/ImportPackagePage.qml +++ b/rockwork/qml/ImportPackagePage.qml @@ -1,6 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import Ubuntu.Content 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/InfoPage.qml b/rockwork/qml/InfoPage.qml index 3eec387..b23aed1 100644 --- a/rockwork/qml/InfoPage.qml +++ b/rockwork/qml/InfoPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { title: "About RockWork" diff --git a/rockwork/qml/InstalledAppDelegate.qml b/rockwork/qml/InstalledAppDelegate.qml index 89f6ba8..e910a40 100644 --- a/rockwork/qml/InstalledAppDelegate.qml +++ b/rockwork/qml/InstalledAppDelegate.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 ListItem { id: root @@ -17,71 +16,62 @@ ListItem { signal deleteApp(); signal configureApp(); - leadingActions: ListItemActions { - actions: [ - Action { - visible: !root.isSystemApp - iconName: "delete" - onTriggered: { - root.deleteApp(); - } + menu: ContextMenu { + MenuItem { + visible: !root.isSystemApp + text: "Delete" + onClicked: { + root.deleteApp(); } - ] - } - - trailingActions: ListItemActions { - actions: [ - Action { - visible: root.hasSettings - iconName: "settings" - onTriggered: { - print("settings triggered") - root.configureApp(); - } + } + MenuItem { + visible: root.hasSettings + text: "Settings" + onClicked: { + print("Settings triggered") + root.configureApp(); } - ] + } } - RowLayout { + Row { anchors { fill: parent - margins: units.gu(1) + //margins: units.gu(1) } - spacing: units.gu(1) + //spacing: units.gu(1) SystemAppIcon { - Layout.fillHeight: true - Layout.preferredWidth: height isSystemApp: root.isSystemApp uuid: root.uuid iconSource: root.iconSource } - ColumnLayout { - Layout.fillWidth: true + Column { + width: parent.width Label { text: root.name - Layout.fillWidth: true + width: parent.width } Label { text: root.vendor - Layout.fillWidth: true - fontSize: "small" + width: parent.width + font.pixelSize: Theme.fontSizeSmall } } Item { id: grip - Layout.fillHeight: true - Layout.preferredWidth: height +// Layout.fillHeight: true +// Layout.preferredWidth: height opacity: (root.contentMoving || root.swiped || root.dragging) ? 0 : 1 - Behavior on opacity { UbuntuNumberAnimation {} } - Icon { - width: units.gu(3) + Behavior on opacity { NumberAnimation {} } + IconButton { + //width: units.gu(3) height: width anchors.centerIn: parent - name: "grip-large" + icon.source: "image://theme/icon-m-gesture" } } } diff --git a/rockwork/qml/InstalledAppsPage.qml b/rockwork/qml/InstalledAppsPage.qml index a18cd3f..f7c8113 100644 --- a/rockwork/qml/InstalledAppsPage.qml +++ b/rockwork/qml/InstalledAppsPage.qml @@ -1,200 +1,204 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: showWatchApps ? (showWatchFaces ? i18n.tr("Apps & Watchfaces") : i18n.tr("Apps")) : i18n.tr("Watchfaces") property var pebble: null property bool showWatchApps: false property bool showWatchFaces: false - head { - actions: [ - Action { - iconName: "add" - onTriggered: pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, showWatchApps: root.showWatchApps, showWatchFaces: root.showWatchFaces}) + SilicaFlickable { + id: flickable + anchors.top: parent.top + width: parent.width + PullDownMenu { + MenuItem { + text: qsTr("Add") + onClicked: pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, showWatchApps: root.showWatchApps, showWatchFaces: root.showWatchFaces}) } - ] - } + } - function configureApp(uuid) { - // The health app is special :/ - if (uuid == "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}") { - var popup = PopupUtils.open(Qt.resolvedUrl("HealthSettingsDialog.qml"), root, {healthParams: pebble.healthParams}); - popup.accepted.connect(function() { - pebble.healthParams = popup.healthParams - }) - } else { - pebble.requestConfigurationURL(uuid); + PageHeader { + title: showWatchApps ? (showWatchFaces ? qsTr("Apps & Watchfaces") : qsTr("Apps")) : qsTr("Watchfaces") } - } - Item { - anchors.fill: parent - ListView { - id: listView - anchors.fill: parent - model: root.showWatchApps ? root.pebble.installedApps : root.pebble.installedWatchfaces - clip: true - property real realContentY: contentY + originY - - delegate: InstalledAppDelegate { - id: delegate - uuid: model.uuid - name: model.name - iconSource: model.icon - vendor: model.vendor - visible: dndArea.draggedIndex !== index - hasGrip: index > 0 - isSystemApp: model.isSystemApp - hasSettings: model.hasSettings - - onDeleteApp: { - pebble.removeApp(model.uuid) - } - onConfigureApp: { - root.configureApp(model.uuid) - } - onClicked: { - PopupUtils.open(dialogComponent, root, {app: listView.model.get(index)}) - } + function configureApp(uuid) { + // The health app is special :/ + if (uuid == "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}") { + var popup = PopupUtils.open(Qt.resolvedUrl("HealthSettingsDialog.qml"), root, {healthParams: pebble.healthParams}); + popup.accepted.connect(function() { + pebble.healthParams = popup.healthParams + }) + } else { + pebble.requestConfigurationURL(uuid); } } - MouseArea { - id: dndArea - anchors { - top: parent.top - bottom: parent.bottom - right: parent.right + + Item { + anchors.fill: parent + ListView { + id: listView + anchors.fill: parent + model: root.showWatchApps ? root.pebble.installedApps : root.pebble.installedWatchfaces + clip: true + property real realContentY: contentY + originY + + delegate: InstalledAppDelegate { + id: delegate + uuid: model.uuid + name: model.name + iconSource: model.icon + vendor: model.vendor + visible: dndArea.draggedIndex !== index + hasGrip: index > 0 + isSystemApp: model.isSystemApp + hasSettings: model.hasSettings + + onDeleteApp: { + pebble.removeApp(model.uuid) + } + onConfigureApp: { + root.configureApp(model.uuid) + } + onClicked: { + PopupUtils.open(dialogComponent, root, {app: listView.model.get(index)}) + } + } } - drag.axis: Drag.YAxis - propagateComposedEvents: true - width: units.gu(5) + MouseArea { + id: dndArea + anchors { + top: parent.top + bottom: parent.bottom + right: parent.right + } + drag.axis: Drag.YAxis + propagateComposedEvents: true + //width: units.gu(5) - property int startY: 0 - property int draggedIndex: -1 + property int startY: 0 + property int draggedIndex: -1 - onPressAndHold: { - startY = mouseY; - draggedIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) - if (draggedIndex == 0) { - print("cannot drag settings app"); - return; - } + onPressAndHold: { + startY = mouseY; + draggedIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) + if (draggedIndex == 0) { + print("cannot drag settings app"); + return; + } - var draggedItem = listView.model.get(draggedIndex); - fakeDragItem.uuid = draggedItem.uuid; - fakeDragItem.name = draggedItem.name; - fakeDragItem.vendor = draggedItem.vendor; - fakeDragItem.iconSource = draggedItem.icon; - fakeDragItem.isSystemApp = draggedItem.isSystemApp; - fakeDragItem.y = (fakeDragItem.height * draggedIndex) - listView.realContentY - drag.target = fakeDragItem; - } + var draggedItem = listView.model.get(draggedIndex); + fakeDragItem.uuid = draggedItem.uuid; + fakeDragItem.name = draggedItem.name; + fakeDragItem.vendor = draggedItem.vendor; + fakeDragItem.iconSource = draggedItem.icon; + fakeDragItem.isSystemApp = draggedItem.isSystemApp; + fakeDragItem.y = (fakeDragItem.height * draggedIndex) - listView.realContentY + drag.target = fakeDragItem; + } - onMouseYChanged: { - var newIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) + onMouseYChanged: { + var newIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) - if (newIndex > draggedIndex) { - newIndex = draggedIndex + 1; - } else if (newIndex < draggedIndex) { - newIndex = draggedIndex - 1; - } else { - return; - } + if (newIndex > draggedIndex) { + newIndex = draggedIndex + 1; + } else if (newIndex < draggedIndex) { + newIndex = draggedIndex - 1; + } else { + return; + } - if (newIndex >= 1 && newIndex < listView.count) { - listView.model.move(draggedIndex, newIndex); - draggedIndex = newIndex; + if (newIndex >= 1 && newIndex < listView.count) { + listView.model.move(draggedIndex, newIndex); + draggedIndex = newIndex; + } } - } - onReleased: { - if (draggedIndex > -1) { - listView.model.commitMove(); - draggedIndex = -1; - drag.target = null; + onReleased: { + if (draggedIndex > -1) { + listView.model.commitMove(); + draggedIndex = -1; + drag.target = null; + } } } } - } - InstalledAppDelegate { - id: fakeDragItem - visible: dndArea.draggedIndex != -1 + InstalledAppDelegate { + id: fakeDragItem + visible: dndArea.draggedIndex != -1 - } - - Component { - id: dialogComponent - Dialog { - id: dialog - property var app: null - - RowLayout { - SystemAppIcon { - height: titleCol.height - width: height - isSystemApp: app.isSystemApp - uuid: app.uuid - iconSource: app.icon - } - - ColumnLayout { - id: titleCol - Layout.fillWidth: true + } - Label { - Layout.fillWidth: true - text: app.name - fontSize: "large" + Component { + id: dialogComponent + Dialog { + id: dialog + property var app: null + + Row { + SystemAppIcon { + height: titleCol.height + width: height + isSystemApp: app.isSystemApp + uuid: app.uuid + iconSource: app.icon } - Label { - Layout.fillWidth: true - text: app.vendor + + Column { + id: titleCol + width: parent.width; + + Label { + width: parent.width; + text: app.name + font.pixelSize: Theme.fontSizeLarge + } + Label { + width: parent.width; + text: app.vendor + } } } - } - Button { - text: i18n.tr("Launch") - color: UbuntuColors.green - onClicked: { - pebble.launchApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Launch") + color: UbuntuColors.green + onClicked: { + pebble.launchApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Configure") - color: UbuntuColors.blue - visible: app.hasSettings - onClicked: { - root.configureApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Configure") + color: UbuntuColors.blue + visible: app.hasSettings + onClicked: { + root.configureApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Delete") - color: UbuntuColors.red - visible: !app.isSystemApp - onClicked: { - pebble.removeApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Delete") + color: UbuntuColors.red + visible: !app.isSystemApp + onClicked: { + pebble.removeApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Close") - onClicked: PopupUtils.close(dialog) + Button { + text: qsTr("Close") + onClicked: PopupUtils.close(dialog) + } } } } diff --git a/rockwork/qml/Main.qml b/rockwork/qml/Main.qml index 2bdece3..aae852b 100644 --- a/rockwork/qml/Main.qml +++ b/rockwork/qml/Main.qml @@ -1,26 +1,17 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 /*! \brief MainView with a Label and Button elements. */ -MainView { - applicationName: "rockwork.mzanetti" - - width: units.gu(40) - height: units.gu(70) +ApplicationWindow { + id: app ServiceController { id: serviceController - serviceName: "rockworkd" Component.onCompleted: { - if (!serviceController.serviceFileInstalled) { - print("Service file not installed. Installing now.") - serviceController.installServiceFile(); - } if (!serviceController.serviceRunning) { print("Service not running. Starting now.") serviceController.startService(); @@ -41,6 +32,7 @@ MainView { pageStack.clear() if (pebbles.count == 1) { pageStack.push(Qt.resolvedUrl("MainMenuPage.qml"), {pebble: pebbles.get(0)}) + app.cover.replace(Qt.resolvedUrl("CoverPage.qml"), {pebble: pebbles.get(0)}) } else { pageStack.push(Qt.resolvedUrl("PebblesPage.qml")) } diff --git a/rockwork/qml/MainMenuPage.qml b/rockwork/qml/MainMenuPage.qml index 32c7b96..6713d70 100644 --- a/rockwork/qml/MainMenuPage.qml +++ b/rockwork/qml/MainMenuPage.qml @@ -1,311 +1,286 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: root - title: pebble.name property var pebble: null - head { - actions: [ - Action { - iconName: "info" - text: i18n.tr("About") - onTriggered: { + SilicaFlickable { + id: flickable + anchors.fill: parent + contentHeight: column.height + + VerticalScrollDecorator { flickable: flickable } + + PullDownMenu { + MenuItem { + text: qsTr("About") + onClicked: { pageStack.push(Qt.resolvedUrl("InfoPage.qml")) } - }, - Action { - iconName: "ubuntu-sdk-symbolic" - text: i18n.tr("Developer tools") - onTriggered: { + } + MenuItem { + text: qsTr("Developer tools") + onClicked: { pageStack.push(Qt.resolvedUrl("DeveloperToolsPage.qml"), {pebble: root.pebble}) } } - ] - } - - //Creating the menu list this way to allow the text field to be translatable (http://askubuntu.com/a/476331) - ListModel { - id: mainMenuModel - dynamicRoles: true - } - - Component.onCompleted: { - populateMainMenu(); - } - - Connections { - target: root.pebble - onFirmwareUpgradeAvailableChanged: { - populateMainMenu(); } - } + Column { + id: column + width: root.width + spacing: Theme.paddingLarge + PageHeader { + title: qsTr("RockPool") + } - function populateMainMenu() { - mainMenuModel.clear(); - - mainMenuModel.append({ - icon: "stock_notification", - text: i18n.tr("Manage notifications"), - page: "NotificationsPage.qml", - color: "blue" - }); - - mainMenuModel.append({ - icon: "stock_application", - text: i18n.tr("Manage Apps"), - page: "InstalledAppsPage.qml", - showWatchApps: true, - color: UbuntuColors.green - }); - - mainMenuModel.append({ - icon: "clock-app-symbolic", - text: i18n.tr("Manage Watchfaces"), - page: "InstalledAppsPage.qml", - showWatchFaces: true, - color: "black" - }); - - mainMenuModel.append({ - icon: "settings", - text: i18n.tr("Settings"), - page: "SettingsPage.qml", - showWatchFaces: true, - color: "gold" - }); - - if (root.pebble.firmwareUpgradeAvailable) { - mainMenuModel.append({ - icon: "preferences-system-updates-symbolic", - text: i18n.tr("Firmware upgrade"), - page: "FirmwareUpgradePage.qml", - color: "red" - }); - } + ListView { + model: mainMenuModel + } - } + //Creating the menu list this way to allow the text field to be translatable (http://askubuntu.com/a/476331) + ListModel { + id: mainMenuModel + dynamicRoles: true + } - PebbleModels { - id: modelModel - } + Component.onCompleted: { + populateMainMenu(); + } - GridLayout { - anchors.fill: parent - columns: parent.width > parent.height ? 2 : 1 + Connections { + target: root.pebble + onFirmwareUpgradeAvailableChanged: { + populateMainMenu(); + } + } - Item { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.maximumHeight: units.gu(30) + function populateMainMenu() { + mainMenuModel.clear(); + + mainMenuModel.append({ + icon: "stock_notification", + text: qsTr("Manage notifications"), + page: "NotificationsPage.qml", + color: "blue" + }); + + mainMenuModel.append({ + icon: "stock_application", + text: qsTr("Manage Apps"), + page: "InstalledAppsPage.qml", + showWatchApps: true, + color: "green" + }); + + mainMenuModel.append({ + icon: "clock-app-symbolic", + text: qsTr("Manage Watchfaces"), + page: "InstalledAppsPage.qml", + showWatchFaces: true, + color: "black" + }); + + mainMenuModel.append({ + icon: "settings", + text: qsTr("Settings"), + page: "SettingsPage.qml", + showWatchFaces: true, + color: "gold" + }); + + if (root.pebble.firmwareUpgradeAvailable) { + mainMenuModel.append({ + icon: "preferences-system-updates-symbolic", + text: qsTr("Firmware upgrade"), + page: "FirmwareUpgradePage.qml", + color: "red" + }); + } + } - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - spacing: units.gu(1) + PebbleModels { + id: modelModel + } + Column { + anchors.fill: parent Item { - Layout.alignment: Qt.AlignHCenter - Layout.fillHeight: true - Layout.fillWidth: true - Layout.minimumWidth: watchImage.width + //Layout.alignment: Qt.AlignHCenter + width: root.width Image { id: watchImage width: implicitWidth * height / implicitHeight height: parent.height anchors.horizontalCenter: parent.horizontalCenter - source: modelModel.get(root.pebble.model).image + source: Qt.resolvedUrl("qrc:///"+modelModel.get(root.pebble.model).image) fillMode: Image.PreserveAspectFit + } + Item { + id: watchFace + height: parent.height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .5 : .515) + width: height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .85 : 1) + anchors.centerIn: parent + anchors.horizontalCenterOffset: units.dp(1) + anchors.verticalCenterOffset: units.dp(modelModel.get(root.pebble.model - 1).shape === "rectangle" ? 0 : 1) + + Image { + id: image + anchors.fill: parent + source: "file://" + root.pebble.screenshots.latestScreenshot + visible: false + } - Item { - id: watchFace - height: parent.height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .5 : .515) - width: height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .85 : 1) - anchors.centerIn: parent - anchors.horizontalCenterOffset: units.dp(1) - anchors.verticalCenterOffset: units.dp(modelModel.get(root.pebble.model - 1).shape === "rectangle" ? 0 : 1) - - Image { - id: image - anchors.fill: parent - source: "file://" + root.pebble.screenshots.latestScreenshot - visible: false - } - - Component.onCompleted: { - if (!root.pebble.screenshots.latestScreenshot) { - root.pebble.requestScreenshot(); - } + Component.onCompleted: { + if (!root.pebble.screenshots.latestScreenshot) { + root.pebble.requestScreenshot(); } + } - Rectangle { - id: textItem - anchors.fill: parent - layer.enabled: true - radius: modelModel.get(root.pebble.model - 1).shape === "rectangle" ? units.gu(.5) : height / 2 - // This item should be used as the 'mask' - layer.samplerName: "maskSource" - layer.effect: ShaderEffect { - property var colorSource: image; - fragmentShader: " - uniform lowp sampler2D colorSource; - uniform lowp sampler2D maskSource; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - void main() { - gl_FragColor = - texture2D(colorSource, qt_TexCoord0) - * texture2D(maskSource, qt_TexCoord0).a - * qt_Opacity; - } - " - } + Rectangle { + id: textItem + anchors.fill: parent + layer.enabled: true + radius: modelModel.get(root.pebble.model - 1).shape === "rectangle" ? units.gu(.5) : height / 2 + // This item should be used as the 'mask' + layer.samplerName: "maskSource" + layer.effect: ShaderEffect { + property var colorSource: image; + fragmentShader: " + uniform lowp sampler2D colorSource; + uniform lowp sampler2D maskSource; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main() { + gl_FragColor = + texture2D(colorSource, qt_TexCoord0) + * texture2D(maskSource, qt_TexCoord0).a + * qt_Opacity; + } + " } } } } - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true + Column { + width: root.width spacing: units.gu(2) Rectangle { height: units.gu(10) width: height radius: height / 2 - color: root.pebble.connected ? UbuntuColors.green : UbuntuColors.red + color: root.pebble.connected ? "green" : "red" - Icon { + IconButton { anchors.fill: parent anchors.margins: units.gu(2) - color: "white" - name: root.pebble.connected ? "tick" : "dialog-error-symbolic" + icon.source: root.pebble.connected ? "image://theme/icon-m-acknowledge" : "image://theme/icon-m-reset" } } Label { - text: root.pebble.connected ? i18n.tr("Connected") : i18n.tr("Disconnected") - Layout.fillWidth: true + text: root.pebble.connected ? qsTr("Connected") : qsTr("Disconnected") + width: root.width } } } - } - Column { - Layout.fillWidth: true - Layout.preferredHeight: childrenRect.height - spacing: menuRepeater.count > 0 ? 0 : units.gu(2) - Label { - text: i18n.tr("Your Pebble smartwatch is disconnected. Please make sure it is powered on, within range and it is paired properly in the Bluetooth System Settings.") - width: parent.width - units.gu(4) - anchors.horizontalCenter: parent.horizontalCenter - wrapMode: Text.WordWrap - visible: !root.pebble.connected - fontSize: "large" - horizontalAlignment: Text.AlignHCenter - } - - Button { - text: i18n.tr("Open System Settings") - visible: !root.pebble.connected - onClicked: Qt.openUrlExternally("settings://system/bluetooth") - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - } + Column { + width: root.width + //Layout.preferredHeight: childrenRect.height + spacing: menuRepeater.count > 0 ? 0 : units.gu(2) + Label { + text: qsTr("Your Pebble smartwatch is disconnected. Please make sure it is powered on, within range and it is paired properly in the Bluetooth System Settings.") + width: parent.width - units.gu(4) + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + visible: !root.pebble.connected + font.pixelSize: Theme.fontSizeLarge + horizontalAlignment: Text.AlignHCenter + } - Label { - text: i18n.tr("Your Pebble smartwatch is in factory mode and needs to be initialized.") - width: parent.width - units.gu(4) - anchors.horizontalCenter: parent.horizontalCenter - wrapMode: Text.WordWrap - visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware - fontSize: "large" - horizontalAlignment: Text.AlignHCenter - } - Button { - text: i18n.tr("Initialize Pebble") - onClicked: root.pebble.performFirmwareUpgrade(); - visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - } + Label { + text: qsTr("Your Pebble smartwatch is in factory mode and needs to be initialized.") + width: parent.width - units.gu(4) + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware + font.pixelSize: Theme.fontSizeLarge + horizontalAlignment: Text.AlignHCenter + } + Button { + text: qsTr("Initialize Pebble") + onClicked: root.pebble.performFirmwareUpgrade(); + visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware + color: "orange" + anchors.horizontalCenter: parent.horizontalCenter + } - Rectangle { - id: upgradeIcon - height: units.gu(10) - width: height - radius: width / 2 - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - Icon { - anchors.fill: parent - anchors.margins: units.gu(1) - name: "preferences-system-updates-symbolic" - color: "white" + Rectangle { + id: upgradeIcon + height: units.gu(10) + width: height + radius: width / 2 + color: Theme.highlightColor + anchors.horizontalCenter: parent.horizontalCenter + BusyIndicator { + anchors.horizontalCenter: parent.horizontalCenter + running: upgradeInProgress + size: BusyIndicatorSize.Large + } + visible: root.pebble.connected && root.pebble.upgradingFirmware } - RotationAnimation on rotation { - duration: 2000 - loops: Animation.Infinite - from: 0 - to: 360 - running: upgradeIcon.visible + Label { + text: qsTr("Upgrading...") + font.pixelSize: Theme.fontSizeLarge + anchors.horizontalCenter: parent.horizontalCenter + visible: root.pebble.connected && root.pebble.upgradingFirmware } - visible: root.pebble.connected && root.pebble.upgradingFirmware - } - Label { - text: i18n.tr("Upgrading...") - fontSize: "large" - anchors.horizontalCenter: parent.horizontalCenter - visible: root.pebble.connected && root.pebble.upgradingFirmware - } + Repeater { + id: menuRepeater + model: root.pebble.connected && !root.pebble.recovery && !root.pebble.upgradingFirmware ? mainMenuModel : null + delegate: ListItem { + + Row { + anchors.fill: parent + anchors.margins: units.gu(1) - Repeater { - id: menuRepeater - model: root.pebble.connected && !root.pebble.recovery && !root.pebble.upgradingFirmware ? mainMenuModel : null - delegate: ListItem { - - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - - UbuntuShape { - Layout.fillHeight: true - Layout.preferredWidth: height - backgroundColor: model.color - Icon { - anchors.fill: parent - anchors.margins: units.gu(.5) - name: model.icon - color: "white" + Rectangle { + //Layout.fillHeight: true + //Layout.preferredWidth: height + //backgroundColor: model.color + Image { + anchors.fill: parent + anchors.margins: units.gu(.5) + source: model.icon + } } - } - Label { - text: model.text - Layout.fillWidth: true + Label { + text: model.text + width: page.width + } } - } - onClicked: { - var options = {}; - options["pebble"] = root.pebble - var modelItem = mainMenuModel.get(index) - options["showWatchApps"] = modelItem.showWatchApps - options["showWatchFaces"] = modelItem.showWatchFaces - pageStack.push(Qt.resolvedUrl(model.page), options) + onClicked: { + var options = {}; + options["pebble"] = root.pebble + var modelItem = mainMenuModel.get(index) + options["showWatchApps"] = modelItem.showWatchApps + options["showWatchFaces"] = modelItem.showWatchFaces + pageStack.push(Qt.resolvedUrl(model.page), options) + } } } } } } - Connections { target: pebble onOpenURL: { diff --git a/rockwork/qml/NotificationsPage.qml b/rockwork/qml/NotificationsPage.qml index 9802b05..3942ecf 100644 --- a/rockwork/qml/NotificationsPage.qml +++ b/rockwork/qml/NotificationsPage.qml @@ -1,84 +1,95 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: i18n.tr("Notifications") property var pebble: null - ColumnLayout { + SilicaFlickable { + id: flickable anchors.fill: parent - anchors.topMargin: units.gu(1) + contentHeight: column.height + PageHeader { + title: qsTr("Notifications") + } + Column { - Item { - Layout.fillWidth: true - implicitHeight: infoLabel.height + anchors.fill: parent + anchors.topMargin: units.gu(1) - Label { - id: infoLabel - anchors { - left: parent.left - right: parent.right - margins: units.gu(2) - } - wrapMode: Text.WordWrap - text: i18n.tr("Entries here will be added as notifications appear on the phone. Selected notifications will be shown on your Pebble smartwatch.") + + Item { + width: parent.width + implicitHeight: infoLabel.height + + Label { + id: infoLabel + anchors { + left: parent.left + right: parent.right + margins: units.gu(2) + } + + wrapMode: Text.WordWrap + text: i18n.tr("Entries here will be added as notifications appear on the phone. Selected notifications will be shown on your Pebble smartwatch.") + } } - } - ListView { - Layout.fillWidth: true - Layout.fillHeight: true - clip: true - model: root.pebble.notifications + ListView { + width: parent.width + //Layout.fillHeight: true + clip: true + model: root.pebble.notifications - delegate: ListItem { - ListItemLayout { - title.text: model.name + delegate: ListItem { + Item { + Rectangle { + //SlotsLayout.position: SlotsLayout.Leading; + height: units.gu(5) + width: height + color: { + // Add some hacks for known icons + switch (model.icon) { + case "calendar": + return "orange"; + case "settings": + return "grey"; + case "dialog-question-symbolic": + return "red"; + case "alarm-clock": + return "purple"; + case "gpm-battery-050": + return "green"; + } + return "black" + } + // source: Image { + // height: parent.height + // width: parent.width + // source: model.icon.indexOf("/") === 0 ? "file://" + model.icon : "" + // } + Label { + text: model.name + } - UbuntuShape { - SlotsLayout.position: SlotsLayout.Leading; - height: units.gu(5) - width: height - backgroundColor: { - // Add some hacks for known icons - switch (model.icon) { - case "calendar": - return UbuntuColors.orange; - case "settings": - return "grey"; - case "dialog-question-symbolic": - return UbuntuColors.red; - case "alarm-clock": - return UbuntuColors.purple; - case "gpm-battery-050": - return UbuntuColors.green; + IconButton { + anchors.fill: parent + anchors.margins: units.gu(.5) + icon.source: model.icon.indexOf("/") !== 0 ? model.icon : "" + //color: "white" } - return "black" - } - source: Image { - height: parent.height - width: parent.width - source: model.icon.indexOf("/") === 0 ? "file://" + model.icon : "" } - Icon { - anchors.fill: parent - anchors.margins: units.gu(.5) - name: model.icon.indexOf("/") !== 0 ? model.icon : "" - color: "white" - } - } - Switch { - checked: model.enabled - SlotsLayout.position: SlotsLayout.Trailing; - onClicked: { - root.pebble.setNotificationFilter(model.name, checked) + Switch { + checked: model.enabled + // SlotsLayout.position: SlotsLayout.Trailing; + onClicked: { + root.pebble.setNotificationFilter(model.name, checked) + } } } } diff --git a/rockwork/qml/PebbleModels.qml b/rockwork/qml/PebbleModels.qml index 103064a..d2248c1 100644 --- a/rockwork/qml/PebbleModels.qml +++ b/rockwork/qml/PebbleModels.qml @@ -1,28 +1,28 @@ -import QtQuick 2.4 +import QtQuick 2.0 ListModel { id: modelModel - ListElement { image: 'artwork/tintin-black.png'; shape: "rectangle" } // Fallback for Unknown - ListElement { image: 'artwork/tintin-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-white.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-red.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-orange.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-grey.png'; shape: "rectangle" } - ListElement { image: 'artwork/bianca-silver.png'; shape: "rectangle" } - ListElement { image: 'artwork/bianca-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-blue.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-green.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-pink.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-white.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-red.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-silver.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-gold.png'; shape: "rectangle" } - ListElement { image: 'artwork/spalding-14mm-silver.png'; shape: "round" } - ListElement { image: 'artwork/spalding-14mm-black.png'; shape: "round" } - ListElement { image: 'artwork/spalding-20mm-silver.png'; shape: "round" } - ListElement { image: 'artwork/spalding-20mm-black.png'; shape: "round" } - ListElement { image: 'artwork/spalding-14mm-rose-gold.png'; shape: "round" } + ListElement { image: 'tintin-black.png'; shape: "rectangle" } // Fallback for Unknown + ListElement { image: 'tintin-black.png'; shape: "rectangle" } + ListElement { image: 'tintin-white.png'; shape: "rectangle" } + ListElement { image: 'tintin-red.png'; shape: "rectangle" } + ListElement { image: 'tintin-orange.png'; shape: "rectangle" } + ListElement { image: 'tintin-grey.png'; shape: "rectangle" } + ListElement { image: 'bianca-silver.png'; shape: "rectangle" } + ListElement { image: 'bianca-black.png'; shape: "rectangle" } + ListElement { image: 'tintin-blue.png'; shape: "rectangle" } + ListElement { image: 'tintin-green.png'; shape: "rectangle" } + ListElement { image: 'tintin-pink.png'; shape: "rectangle" } + ListElement { image: 'snowy-white.png'; shape: "rectangle" } + ListElement { image: 'snowy-black.png'; shape: "rectangle" } + ListElement { image: 'snowy-red.png'; shape: "rectangle" } + ListElement { image: 'bobby-silver.png'; shape: "rectangle" } + ListElement { image: 'bobby-black.png'; shape: "rectangle" } + ListElement { image: 'bobby-gold.png'; shape: "rectangle" } + ListElement { image: 'spalding-14mm-silver.png'; shape: "round" } + ListElement { image: 'spalding-14mm-black.png'; shape: "round" } + ListElement { image: 'spalding-20mm-silver.png'; shape: "round" } + ListElement { image: 'spalding-20mm-black.png'; shape: "round" } + ListElement { image: 'spalding-14mm-rose-gold.png'; shape: "round" } } diff --git a/rockwork/qml/PebblesPage.qml b/rockwork/qml/PebblesPage.qml index a973b0a..13aca60 100644 --- a/rockwork/qml/PebblesPage.qml +++ b/rockwork/qml/PebblesPage.qml @@ -1,6 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { title: i18n.tr("Manage Pebble Watches") diff --git a/rockwork/qml/ScreenshotsPage.qml b/rockwork/qml/ScreenshotsPage.qml index fdbeb9a..28ca866 100644 --- a/rockwork/qml/ScreenshotsPage.qml +++ b/rockwork/qml/ScreenshotsPage.qml @@ -1,9 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Content 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/SettingsPage.qml b/rockwork/qml/SettingsPage.qml index 153aaf4..8116f7a 100644 --- a/rockwork/qml/SettingsPage.qml +++ b/rockwork/qml/SettingsPage.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/SystemAppIcon.qml b/rockwork/qml/SystemAppIcon.qml index 88e37bc..3823cf2 100644 --- a/rockwork/qml/SystemAppIcon.qml +++ b/rockwork/qml/SystemAppIcon.qml @@ -1,5 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Item { id: root @@ -8,10 +9,10 @@ Item { property string uuid: "" property string iconSource: "" - UbuntuShape { + Rectangle { anchors.fill: parent visible: root.isSystemApp - backgroundColor: { + color: { switch (root.uuid) { case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}": return "gray"; @@ -32,28 +33,27 @@ Item { return ""; } } - Icon { + IconButton { anchors.fill: parent implicitHeight: height - anchors.margins: units.gu(1) + //anchors.margins: units.gu(1) visible: root.isSystemApp - color: "white" - name: { + icon.source: { switch (root.uuid) { case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}": - return "settings"; + return "image://theme/icon-m-developer-mode"; case "{18e443ce-38fd-47c8-84d5-6d0c775fbe55}": - return "clock-app-symbolic"; + return "image://theme/icon-m-clock"; case "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}": - return "like"; + return "image://theme/icon-m-like"; case "{1f03293d-47af-4f28-b960-f2b02a6dd757}": - return "stock_music"; + return "image://theme/icon-m-music"; case "{b2cae818-10f8-46df-ad2b-98ad2254a3c1}": - return "stock_notification"; + return "image://theme/icon-m-notifications"; case "{67a32d95-ef69-46d4-a0b9-854cc62f97f9}": - return "stock_alarm-clock"; + return "image://theme/icon-m-alarm"; case "{8f3c8686-31a1-4f5f-91f5-01600c9bdc59}": - return "clock-app-symbolic"; + return "image://theme/icon-m-clock"; } return ""; } diff --git a/rockwork/rockpool.desktop b/rockwork/rockpool.desktop index 0a75199..989d24d 100644 --- a/rockwork/rockpool.desktop +++ b/rockwork/rockpool.desktop @@ -1,8 +1,7 @@ [Desktop Entry] -Name=RockWork -Exec=rockwork -Icon=rockwork/rockwork.svg -Terminal=false +Name=RockPool +Exec=rockpool +Icon=rockpool Type=Application -X-Ubuntu-Touch=true +X-Nemo-Application-Type=silica-qt5 diff --git a/rockwork/rockpool.png b/rockwork/rockpool.png new file mode 100644 index 0000000..571ac11 Binary files /dev/null and b/rockwork/rockpool.png differ diff --git a/rockwork/rockwork.apparmor b/rockwork/rockwork.apparmor deleted file mode 100644 index 9756323..0000000 --- a/rockwork/rockwork.apparmor +++ /dev/null @@ -1,7 +0,0 @@ -{ - "policy_groups": [ - "networking" - ], - "policy_version": 1.3, - "template": "unconfined" -} diff --git a/rockwork/rockwork.pro b/rockwork/rockwork.pro index 0d04f81..a695e42 100644 --- a/rockwork/rockwork.pro +++ b/rockwork/rockwork.pro @@ -1,71 +1,54 @@ -TEMPLATE = app -TARGET = rockpool - -include(../version.pri) - -QT += qml quick dbus - -CONFIG += c++11 - -HEADERS += \ - notificationsourcemodel.h \ - servicecontrol.h \ - pebble.h \ - pebbles.h \ - applicationsmodel.h \ - applicationsfiltermodel.h \ - appstoreclient.h \ - screenshotmodel.h - -SOURCES += main.cpp \ - notificationsourcemodel.cpp \ - servicecontrol.cpp \ - pebble.cpp \ - pebbles.cpp \ - applicationsmodel.cpp \ - applicationsfiltermodel.cpp \ - appstoreclient.cpp \ - screenshotmodel.cpp - -RESOURCES += rockwork.qrc - -QML_FILES += $$files(*.qml,true) \ - $$files(*.js,true) - -CONF_FILES += rockwork.apparmor \ - rockwork.svg \ - rockwork.desktop \ - rockwork.url-dispatcher - -AP_TEST_FILES += tests/autopilot/run \ - $$files(tests/*.py,true) - -#show all the files in QtCreator -OTHER_FILES += $${CONF_FILES} \ - $${QML_FILES} \ - $${AP_TEST_FILES} \ - - -#specify where the config files are installed to -config_files.path = /rockpool -config_files.files += $${CONF_FILES} -INSTALLS+=config_files - -#install the desktop file, a translated version is -#automatically created in the build directory -desktop_file.path = /rockpool -desktop_file.files = $$OUT_PWD/rockpool.desktop -desktop_file.CONFIG += no_check_exist -INSTALLS+=desktop_file - -# Default rules for deployment. -target.path = /usr/bin -INSTALLS+=target - -DISTFILES += \ - NotificationsPage.qml \ - PebblesPage.qml \ - AppStorePage.qml \ - AppStoreDetailsPage.qml \ - PebbleModels.qml \ - InfoPage.qml +TARGET = rockpool + +include(../version.pri) + +QT += qml quick dbus webkit quick-private webkit-private + +CONFIG += c++11 +CONFIG += sailfishapp + +HEADERS += \ + notificationsourcemodel.h \ + servicecontrol.h \ + pebble.h \ + pebbles.h \ + applicationsmodel.h \ + applicationsfiltermodel.h \ + appstoreclient.h \ + screenshotmodel.h + +SOURCES += main.cpp \ + notificationsourcemodel.cpp \ + servicecontrol.cpp \ + pebble.cpp \ + pebbles.cpp \ + applicationsmodel.cpp \ + applicationsfiltermodel.cpp \ + appstoreclient.cpp \ + screenshotmodel.cpp + +RESOURCES += rockwork.qrc + +QML_FILES += $$files(qml/*.qml,true) + +CONF_FILES += rockpool.png \ + rockpool.desktop + +#show all the files in QtCreator +OTHER_FILES += $${QML_FILES} \ + $${CONF_FILES} + +#specify where the qml files are installed to +qml.path = /usr/share/rockpool/qml +qml.files += $${QML_FILES} +INSTALLS+=qml + +#and the app icon +icon.path = /usr/share/icons/hicolor/86x86/apps/ +icon.files = rockpool.png +INSTALLS+=icon + +# Default rules for deployment. +INSTALLS+=target icon +target.path = /usr/bin + diff --git a/rockwork/rockwork.qrc b/rockwork/rockwork.qrc index 3fc0cfb..3cb6f76 100644 --- a/rockwork/rockwork.qrc +++ b/rockwork/rockwork.qrc @@ -1,18 +1,6 @@ - Main.qml - NotificationsPage.qml - PebblesPage.qml - InstalledAppsPage.qml - MainMenuPage.qml - AppSettingsPage.qml - AppStorePage.qml - AppStoreDetailsPage.qml - InstalledAppDelegate.qml - SystemAppIcon.qml - ScreenshotsPage.qml - snowywhite.svg - snowywhite.png + artwork/back-cover.png artwork/bianca-black.png artwork/bianca-silver.png artwork/black-20mm-hole.png @@ -35,13 +23,5 @@ artwork/tintin-pink.png artwork/tintin-red.png artwork/tintin-white.png - PebbleModels.qml - FirmwareUpgradePage.qml - InfoPage.qml - artwork/rockwork.svg - DeveloperToolsPage.qml - ContentPeerPickerPage.qml - HealthSettingsDialog.qml - SettingsPage.qml diff --git a/rockwork/rockwork.svg b/rockwork/rockwork.svg deleted file mode 100644 index e4e92c0..0000000 --- a/rockwork/rockwork.svg +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tomorrow - - diff --git a/rockwork/rockwork.url-dispatcher b/rockwork/rockwork.url-dispatcher deleted file mode 100644 index 3453482..0000000 --- a/rockwork/rockwork.url-dispatcher +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "protocol": "pebblejs" - } -] diff --git a/rockwork/servicecontrol.cpp b/rockwork/servicecontrol.cpp index 4d6903f..ced7f1a 100644 --- a/rockwork/servicecontrol.cpp +++ b/rockwork/servicecontrol.cpp @@ -5,84 +5,42 @@ #include #include #include +#include -ServiceControl::ServiceControl(QObject *parent) : QObject(parent) +ServiceControl::ServiceControl(QObject *parent) : QObject(parent), + systemd(new QDBusInterface("org.freedesktop.systemd1", + "/org/freedesktop/systemd1", + "org.freedesktop.systemd1.Manager", + QDBusConnection::sessionBus(), this)) { + systemd->call("Subscribe"); -} + QDBusReply unit = systemd->call("LoadUnit", ROCKPOOLD_SYSTEMD_UNIT); + if (unit.isValid()) { + unitPath = unit.value(); -QString ServiceControl::serviceName() const -{ - return m_serviceName; -} + getUnitProperties(); -void ServiceControl::setServiceName(const QString &serviceName) -{ - if (m_serviceName != serviceName) { - m_serviceName = serviceName; - emit serviceNameChanged(); + QDBusConnection::sessionBus().connect( + "org.freedesktop.systemd1", unitPath.path(), + "org.freedesktop.DBus.Properties", "PropertiesChanged", + this, SLOT(onPropertiesChanged(QString,QMap,QStringList))); + } else { + qWarning() << unit.error().message(); } } -bool ServiceControl::serviceFileInstalled() const +void ServiceControl::onPropertiesChanged(QString interface, QMap changed, QStringList invalidated) { - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set."; - return false; - } - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - return f.exists(); -} - -bool ServiceControl::installServiceFile() -{ - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set. Cannot generate service file."; - return false; - } - - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - if (f.exists()) { - qDebug() << "Service file already existing..."; - return false; - } - - if (!f.open(QFile::WriteOnly | QFile::Truncate)) { - qDebug() << "Cannot create service file"; - return false; - } - - QString appDir = qApp->applicationDirPath(); - // Try to replace version with "current" to be more robust against updates - appDir.replace(QRegExp("rockwork.mzanetti\/[0-9.]*\/"), "rockwork.mzanetti/current/"); - - f.write("start on started unity8\n"); - f.write("pre-start script\n"); - f.write(" initctl set-env LD_LIBRARY_PATH=" + appDir.toUtf8() + "/../:$LD_LIBRARY_PATH\n"); - f.write("end script\n"); - f.write("exec " + appDir.toUtf8() + "/" + m_serviceName.toUtf8() + "\n"); - f.close(); - return true; -} - -bool ServiceControl::removeServiceFile() -{ - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set."; - return false; - } - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - return f.remove(); + qDebug() << Q_FUNC_INFO << interface << changed << invalidated; + if (interface != "org.freedesktop.systemd1.Unit") return; + if (invalidated.contains("UnitFileState") || invalidated.contains("ActiveState")) + getUnitProperties(); } bool ServiceControl::serviceRunning() const { - QProcess p; - p.start("initctl", {"status", m_serviceName}); - p.waitForFinished(); - QByteArray output = p.readAll(); - qDebug() << output; - return output.contains("running"); + return unitProperties["UnitFileState"].toString() == "enabled"; } bool ServiceControl::setServiceRunning(bool running) @@ -97,22 +55,49 @@ bool ServiceControl::setServiceRunning(bool running) bool ServiceControl::startService() { - qDebug() << "should start service"; - int ret = QProcess::execute("start", {m_serviceName}); - return ret == 0; + QDBusError reply; + systemd->call("EnableUnitFiles", QStringList() << ROCKPOOLD_SYSTEMD_UNIT, false, true); + if (reply.isValid()) { + qWarning() << reply.message(); + return false; + } else { + systemd->call("Reload"); + return true; + } } bool ServiceControl::stopService() { - qDebug() << "should stop service"; - int ret = QProcess::execute("stop", {m_serviceName}); - return ret == 0; + QDBusError reply; + systemd->call("DisableUnitFiles", QStringList() << ROCKPOOLD_SYSTEMD_UNIT, false); + if (reply.isValid()) { + qWarning() << reply.message(); + return false; + } else { + systemd->call("Reload"); + return true; + } } bool ServiceControl::restartService() { - qDebug() << "should stop service"; - int ret = QProcess::execute("restart", {m_serviceName}); - return ret == 0; + return stopService() && startService(); } +void ServiceControl::getUnitProperties() +{ + QDBusMessage request = QDBusMessage::createMethodCall( + "org.freedesktop.systemd1", unitPath.path(), + "org.freedesktop.DBus.Properties", "GetAll"); + request << "org.freedesktop.systemd1.Unit"; + QDBusReply reply = QDBusConnection::sessionBus().call(request); + if (reply.isValid()) { + QVariantMap newProperties = reply.value(); + //bool emitEnabledChanged = (unitProperties["UnitFileState"] != newProperties["UnitFileState"]); + bool emitRunningChanged = (unitProperties["ActiveState"] != newProperties["ActiveState"]); + unitProperties = newProperties; + if (emitRunningChanged) emit serviceRunning(); + } else { + qWarning() << reply.error().message(); + } +} diff --git a/rockwork/servicecontrol.h b/rockwork/servicecontrol.h index 4689506..ebab061 100644 --- a/rockwork/servicecontrol.h +++ b/rockwork/servicecontrol.h @@ -1,38 +1,37 @@ #ifndef SERVICECONTROL_H #define SERVICECONTROL_H +#include #include +static const QString ROCKPOOLD_SYSTEMD_UNIT("rockpoold.service"); + class ServiceControl : public QObject { Q_OBJECT - Q_PROPERTY(QString serviceName READ serviceName WRITE setServiceName NOTIFY serviceNameChanged) - Q_PROPERTY(bool serviceFileInstalled READ serviceFileInstalled NOTIFY serviceFileInstalledChanged) Q_PROPERTY(bool serviceRunning READ serviceRunning WRITE setServiceRunning NOTIFY serviceRunningChanged) public: explicit ServiceControl(QObject *parent = 0); - QString serviceName() const; - void setServiceName(const QString &serviceName); - - bool serviceFileInstalled() const; - Q_INVOKABLE bool installServiceFile(); - Q_INVOKABLE bool removeServiceFile(); - bool serviceRunning() const; bool setServiceRunning(bool running); Q_INVOKABLE bool startService(); Q_INVOKABLE bool stopService(); Q_INVOKABLE bool restartService(); +private slots: + void getUnitProperties(); + void onPropertiesChanged(QString interface, QMap changed, QStringList invalidated); + signals: - void serviceNameChanged(); - void serviceFileInstalledChanged(); void serviceRunningChanged(); private: - QString m_serviceName; + QDBusInterface *systemd; + QDBusObjectPath unitPath; + QVariantMap unitProperties; + }; #endif // SERVICECONTROL_H diff --git a/rockwork/snowywhite.png b/rockwork/snowywhite.png deleted file mode 100644 index 1a354b4..0000000 Binary files a/rockwork/snowywhite.png and /dev/null differ diff --git a/rockwork/snowywhite.svg b/rockwork/snowywhite.svg deleted file mode 100644 index 0544670..0000000 --- a/rockwork/snowywhite.svg +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rockworkd/jsfiles.qrc b/rockworkd/jsfiles.qrc deleted file mode 100644 index 807350d..0000000 --- a/rockworkd/jsfiles.qrc +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/rockworkd/libpebble/watchconnection.cpp b/rockworkd/libpebble/watchconnection.cpp index 0778a1d..dabacf4 100644 --- a/rockworkd/libpebble/watchconnection.cpp +++ b/rockworkd/libpebble/watchconnection.cpp @@ -32,7 +32,7 @@ UploadManager *WatchConnection::uploadManager() const void WatchConnection::scheduleReconnect() { - if (m_connectionAttempts == 0) { + if (m_connectionAttempts < 2) { reconnect(); } else if (m_connectionAttempts < 25) { qDebug() << "Attempting to reconnect in 10 seconds"; @@ -49,21 +49,27 @@ void WatchConnection::scheduleReconnect() void WatchConnection::reconnect() { QBluetoothLocalDevice localBtDev; + qDebug() << "Reconnection"; if (localBtDev.pairingStatus(m_pebbleAddress) == QBluetoothLocalDevice::Unpaired) { // Try again in one 10 secs, give the user some time to pair it + qDebug() << "Unpaired."; m_connectionAttempts = 1; scheduleReconnect(); return; } if (m_socket) { + qDebug() << "Socket exists."; if (m_socket->state() == QBluetoothSocket::ConnectedState) { qDebug() << "Already connected."; return; } - delete m_socket; + m_socket->deleteLater(); } + m_connectionAttempts++; + + qDebug() << "Creating socket."; m_socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol, this); connect(m_socket, &QBluetoothSocket::connected, this, &WatchConnection::pebbleConnected); connect(m_socket, &QBluetoothSocket::readyRead, this, &WatchConnection::readyRead); @@ -71,7 +77,6 @@ void WatchConnection::reconnect() connect(m_socket, &QBluetoothSocket::disconnected, this, &WatchConnection::pebbleDisconnected); //connect(socket, SIGNAL(bytesWritten(qint64)), SLOT(onBytesWritten(qint64))); - m_connectionAttempts++; // FIXME: Assuming port 1 (with Pebble) m_socket->connectToService(m_pebbleAddress, 1); @@ -141,8 +146,12 @@ void WatchConnection::pebbleConnected() void WatchConnection::pebbleDisconnected() { qDebug() << "Disconnected"; - m_socket->close(); + emit watchDisconnected(); + QBluetoothSocket *socket = qobject_cast(sender()); + if (!socket) return; + + socket->deleteLater(); if (!m_reconnectTimer.isActive()) { scheduleReconnect(); } @@ -152,7 +161,6 @@ void WatchConnection::socketError(QBluetoothSocket::SocketError error) { Q_UNUSED(error); // We seem to get UnknownError anyways all the time qDebug() << "SocketError" << error; - m_socket->close(); emit watchConnectionFailed(); if (!m_reconnectTimer.isActive()) { scheduleReconnect(); diff --git a/rockworkd/platformintegration/sailfish/callchannelobserver.cpp b/rockworkd/platformintegration/sailfish/callchannelobserver.cpp index 534c360..a9f41f3 100644 --- a/rockworkd/platformintegration/sailfish/callchannelobserver.cpp +++ b/rockworkd/platformintegration/sailfish/callchannelobserver.cpp @@ -15,9 +15,10 @@ TelepathyMonitor::TelepathyMonitor(QObject *parent): QObject(parent) { Tp::registerTypes(); - QTimer::singleShot(0, this, SLOT(accountManagerSetup)); - m_contactManager = new QContactManager("org.nemomobile.contacts.sqlite"); - m_contactManager->setParent(this); + QTimer::singleShot(0, this, SLOT(accountManagerSetup())); + QMap parameters; + parameters.insert(QString::fromLatin1("mergePresenceChanges"), QString::fromLatin1("false")); + m_contactManager = new QContactManager("", parameters, this); } void TelepathyMonitor::hangupCall(uint cookie) @@ -42,7 +43,7 @@ void TelepathyMonitor::accountManagerReady(Tp::PendingOperation* operation) { if (operation->isError()) { qDebug() << "TelepathyMonitor: accountManager init error."; - QTimer::singleShot(1000, this, SLOT(TelepathyMonitor::accountManagerSetup)); // again + QTimer::singleShot(1000, this, SLOT(accountManagerSetup())); // again return; } qDebug() << "Telepathy account manager ready"; diff --git a/rockworkd/platformintegration/sailfish/callchannelobserver.h b/rockworkd/platformintegration/sailfish/callchannelobserver.h index cc2b7aa..ba3415d 100644 --- a/rockworkd/platformintegration/sailfish/callchannelobserver.h +++ b/rockworkd/platformintegration/sailfish/callchannelobserver.h @@ -27,7 +27,7 @@ public: signals: void callStarted(Tp::CallChannelPtr callChannel); -// void callEnded(); + void callEnded(); private: Tp::AccountPtr mAccount; diff --git a/rockworkd/platformintegration/sailfish/sailfishplatform.h b/rockworkd/platformintegration/sailfish/sailfishplatform.h index dd4f56d..e18b986 100644 --- a/rockworkd/platformintegration/sailfish/sailfishplatform.h +++ b/rockworkd/platformintegration/sailfish/sailfishplatform.h @@ -1,5 +1,5 @@ -#ifndef UBUNTUPLATFORM_H -#define UBUNTUPLATFORM_H +#ifndef SAILFISHPLATFORM_H +#define SAILFISHPLATFORM_H #include "libpebble/platforminterface.h" #include "libpebble/enums.h" @@ -55,4 +55,4 @@ private: QTimer m_syncTimer; }; -#endif // UBUNTUPLATFORM_H +#endif // SAILFISHPLATFORM_H diff --git a/rockworkd/platformintegration/sailfish/voicecallhandler.cpp b/rockworkd/platformintegration/sailfish/voicecallhandler.cpp new file mode 100644 index 0000000..2ae5087 --- /dev/null +++ b/rockworkd/platformintegration/sailfish/voicecallhandler.cpp @@ -0,0 +1,372 @@ +#include "voicecallhandler.h" + +#include +#include +#include +#include +#include + +/*! + \class VoiceCallHandler + \brief This is the D-Bus proxy for communicating with the voice call manager + from a declarative context, this interface specifically interfaces with + the managers' voice call handler instances. +*/ +class VoiceCallHandlerPrivate +{ + Q_DECLARE_PUBLIC(VoiceCallHandler) + +public: + VoiceCallHandlerPrivate(VoiceCallHandler *q, const QString &pHandlerId) + : q_ptr(q), handlerId(pHandlerId), interface(NULL) + , duration(0), status(0), emergency(false), incoming(false) + , multiparty(false) , forwarded(false), remoteHeld(false) + { /* ... */ } + + VoiceCallHandler *q_ptr; + + QString handlerId; + + QDBusInterface *interface; + + int duration; + int status; + QString statusText; + QString lineId; + QString providerId; + QDateTime startedAt; + bool emergency; + bool incoming; + bool multiparty; + bool forwarded; + bool remoteHeld; +}; + +/*! + Constructs a new proxy interface for the provided voice call handlerId. +*/ +VoiceCallHandler::VoiceCallHandler(const QString &handlerId, QObject *parent) + : QObject(parent), l(metaObject()->className()), d_ptr(new VoiceCallHandlerPrivate(this, handlerId)) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << QString("Creating D-Bus interface to: ") + handlerId; + d->interface = new QDBusInterface("org.nemomobile.voicecall", + "/calls/" + handlerId, + "org.nemomobile.voicecall.VoiceCall", + QDBusConnection::sessionBus(), + this); + this->initialize(true); +} + +VoiceCallHandler::~VoiceCallHandler() +{ + Q_D(VoiceCallHandler); + delete d; +} + +void VoiceCallHandler::initialize(bool notifyError) +{ + Q_D(VoiceCallHandler); + + if (d->interface->isValid()) { + if (getProperties()) { + emit durationChanged(); + emit statusChanged(); + emit lineIdChanged(); + emit startedAtChanged(); + emit multipartyChanged(); + emit emergencyChanged(); + emit forwardedChanged(); + + connect(d->interface, SIGNAL(error(QString)), SIGNAL(error(QString))); + connect(d->interface, SIGNAL(statusChanged(int, QString)), SLOT(onStatusChanged(int, QString))); + connect(d->interface, SIGNAL(lineIdChanged(QString)), SLOT(onLineIdChanged(QString))); + connect(d->interface, SIGNAL(durationChanged(int)), SLOT(onDurationChanged(int))); + connect(d->interface, SIGNAL(startedAtChanged(QDateTime)), SLOT(onStartedAtChanged(QDateTime))); + connect(d->interface, SIGNAL(emergencyChanged(bool)), SLOT(onEmergencyChanged(bool))); + connect(d->interface, SIGNAL(multipartyChanged(bool)), SLOT(onMultipartyChanged(bool))); + connect(d->interface, SIGNAL(forwardedChanged(bool)), SLOT(onForwardedChanged(bool))); + connect(d->interface, SIGNAL(remoteHeldChanged(bool)), SLOT(onRemoteHeldChanged(bool))); + } + else { + if (notifyError) emit this->error("Failed to get VoiceCall properties from VCM D-Bus service."); + } + } + else { + qCCritical(l) << d->interface->lastError().name() << d->interface->lastError().message(); + } +} + +bool VoiceCallHandler::getProperties() +{ + Q_D(VoiceCallHandler); + + QDBusInterface props(d->interface->service(), d->interface->path(), + "org.freedesktop.DBus.Properties", d->interface->connection()); + + QDBusReply reply = props.call("GetAll", d->interface->interface()); + if (reply.isValid()) { + QVariantMap props = reply.value(); + qCDebug(l) << props; + d->providerId = props["providerId"].toString(); + d->duration = props["duration"].toInt(); + d->status = props["status"].toInt(); + d->statusText = props["statusText"].toString(); + d->lineId = props["lineId"].toString(); + d->startedAt = QDateTime::fromMSecsSinceEpoch(props["startedAt"].toULongLong()); + d->multiparty = props["isMultiparty"].toBool(); + d->emergency = props["isEmergency"].toBool(); + d->forwarded = props["isForwarded"].toBool(); + d->incoming = props["isIncoming"].toBool(); + d->remoteHeld = props["isIncoming"].toBool(); + return true; + } + else { + qCCritical(l) << "Failed to get VoiceCall properties from VCM D-Bus service."; + return false; + } +} + +void VoiceCallHandler::onDurationChanged(int duration) +{ + Q_D(VoiceCallHandler); + //qCDebug(l) <<"onDurationChanged"<duration = duration; + emit durationChanged(); +} + +void VoiceCallHandler::onStatusChanged(int status, QString statusText) +{ + Q_D(VoiceCallHandler); + qCDebug(l) <<"onStatusChanged" << status << statusText; + d->status = status; + d->statusText = statusText; + if (status) getProperties(); // make sure all properties are present + emit statusChanged(); +} + +void VoiceCallHandler::onLineIdChanged(QString lineId) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onLineIdChanged" << lineId; + d->lineId = lineId; + emit lineIdChanged(); +} + +void VoiceCallHandler::onStartedAtChanged(const QDateTime &startedAt) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onStartedAtChanged" << startedAt; + d->startedAt = d->interface->property("startedAt").toDateTime(); + emit startedAtChanged(); +} + +void VoiceCallHandler::onEmergencyChanged(bool isEmergency) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onEmergencyChanged" << isEmergency; + d->emergency = isEmergency; + emit emergencyChanged(); +} + +void VoiceCallHandler::onMultipartyChanged(bool isMultiparty) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onMultipartyChanged" << isMultiparty; + d->multiparty = isMultiparty; + emit multipartyChanged(); +} + +void VoiceCallHandler::onForwardedChanged(bool isForwarded) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onForwardedChanged" << isForwarded; + d->forwarded = isForwarded; + emit forwardedChanged(); +} + +void VoiceCallHandler::onRemoteHeldChanged(bool isRemoteHeld) +{ + Q_D(VoiceCallHandler); + qCDebug(l) << "onRemoteHeldChanged" << isRemoteHeld; + d->forwarded = isRemoteHeld; + emit remoteHeldChanged(); +} + +/*! + Returns this voice calls' handler id. + */ +QString VoiceCallHandler::handlerId() const +{ + Q_D(const VoiceCallHandler); + return d->handlerId; +} + +/*! + Returns this voice calls' provider id. + */ +QString VoiceCallHandler::providerId() const +{ + Q_D(const VoiceCallHandler); + return d->providerId; +} + +/*! + Returns this voice calls' call status. + */ +int VoiceCallHandler::status() const +{ + Q_D(const VoiceCallHandler); + return d->status; +} + +/*! + Returns this voice calls' call status as a symbolic string. + */ +QString VoiceCallHandler::statusText() const +{ + Q_D(const VoiceCallHandler); + return d->statusText; +} + +/*! + Returns this voice calls' remote end-point line id. + */ +QString VoiceCallHandler::lineId() const +{ + Q_D(const VoiceCallHandler); + return d->lineId; +} + +/*! + Returns this voice calls' started at property. + */ +QDateTime VoiceCallHandler::startedAt() const +{ + Q_D(const VoiceCallHandler); + return d->startedAt; +} + +/*! + Returns this voice calls' duration property. + */ +int VoiceCallHandler::duration() const +{ + Q_D(const VoiceCallHandler); + return d->duration; +} + +/*! + Returns this voice calls' incoming call flag property. + */ +bool VoiceCallHandler::isIncoming() const +{ + Q_D(const VoiceCallHandler); + return d->incoming; +} + +/*! + Returns this voice calls' multiparty flag property. + */ +bool VoiceCallHandler::isMultiparty() const +{ + Q_D(const VoiceCallHandler); + return d->multiparty; +} + +/*! + Returns this voice calls' forwarded flag property. + */ +bool VoiceCallHandler::isForwarded() const +{ + Q_D(const VoiceCallHandler); + return d->forwarded; +} + +/*! + Returns this voice calls' emergency flag property. + */ +bool VoiceCallHandler::isEmergency() const +{ + Q_D(const VoiceCallHandler); + return d->emergency; +} + +/*! + Returns this voice calls' remoteHeld flag property. + */ +bool VoiceCallHandler::isRemoteHeld() const +{ + Q_D(const VoiceCallHandler); + return d->remoteHeld; +} + +/*! + Initiates answering this call, if the call is an incoming call. + */ +void VoiceCallHandler::answer() +{ + Q_D(VoiceCallHandler); + QDBusPendingCall call = d->interface->asyncCall("answer"); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +/*! + Initiates droping the call, unless the call is disconnected. + */ +void VoiceCallHandler::hangup() +{ + Q_D(VoiceCallHandler); + QDBusPendingCall call = d->interface->asyncCall("hangup"); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +/*! + Initiates holding the call, unless the call is disconnected. + */ +void VoiceCallHandler::hold(bool on) +{ + Q_D(VoiceCallHandler); + QDBusPendingCall call = d->interface->asyncCall("hold", on); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +/*! + Initiates deflecting the call to the provided target phone number. + */ +void VoiceCallHandler::deflect(const QString &target) +{ + Q_D(VoiceCallHandler); + QDBusPendingCall call = d->interface->asyncCall("deflect", target); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +void VoiceCallHandler::sendDtmf(const QString &tones) +{ + Q_D(VoiceCallHandler); + QDBusPendingCall call = d->interface->asyncCall("sendDtmf", tones); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +void VoiceCallHandler::onPendingCallFinished(QDBusPendingCallWatcher *watcher) +{ + QDBusPendingReply reply = *watcher; + + if (reply.isError()) { + qCCritical(l) << QString::fromLatin1("Received error reply for member: %1 (%2)").arg(reply.reply().member()).arg(reply.error().message()); + emit this->error(reply.error().message()); + watcher->deleteLater(); + } else { + qCDebug(l) << QString::fromLatin1("Received successful reply for member: %1").arg(reply.reply().member()); + } +} diff --git a/rockworkd/platformintegration/sailfish/voicecallhandler.h b/rockworkd/platformintegration/sailfish/voicecallhandler.h new file mode 100644 index 0000000..e718abb --- /dev/null +++ b/rockworkd/platformintegration/sailfish/voicecallhandler.h @@ -0,0 +1,96 @@ +#ifndef VOICECALLHANDLER_H +#define VOICECALLHANDLER_H + +#include +#include +#include +#include + +class VoiceCallHandler : public QObject +{ + Q_OBJECT + QLoggingCategory l; + + Q_ENUMS(VoiceCallStatus) + + Q_PROPERTY(QString handlerId READ handlerId CONSTANT) + Q_PROPERTY(QString providerId READ providerId CONSTANT) + Q_PROPERTY(int status READ status NOTIFY statusChanged) + Q_PROPERTY(QString statusText READ statusText NOTIFY statusChanged) + Q_PROPERTY(QString lineId READ lineId NOTIFY lineIdChanged) + Q_PROPERTY(QDateTime startedAt READ startedAt NOTIFY startedAtChanged) + Q_PROPERTY(int duration READ duration NOTIFY durationChanged) + Q_PROPERTY(bool isIncoming READ isIncoming CONSTANT) + Q_PROPERTY(bool isEmergency READ isEmergency NOTIFY emergencyChanged) + Q_PROPERTY(bool isMultiparty READ isMultiparty NOTIFY multipartyChanged) + Q_PROPERTY(bool isForwarded READ isForwarded NOTIFY forwardedChanged) + Q_PROPERTY(bool isRemoteHeld READ isRemoteHeld NOTIFY remoteHeldChanged) + +public: + enum VoiceCallStatus { + STATUS_NULL, + STATUS_ACTIVE, + STATUS_HELD, + STATUS_DIALING, + STATUS_ALERTING, + STATUS_INCOMING, + STATUS_WAITING, + STATUS_DISCONNECTED + }; + + explicit VoiceCallHandler(const QString &handlerId, QObject *parent = 0); + ~VoiceCallHandler(); + + QString handlerId() const; + QString providerId() const; + int status() const; + QString statusText() const; + QString lineId() const; + QDateTime startedAt() const; + int duration() const; + bool isIncoming() const; + bool isMultiparty() const; + bool isEmergency() const; + bool isForwarded() const; + bool isRemoteHeld() const; + +Q_SIGNALS: + void error(const QString &error); + void statusChanged(); + void lineIdChanged(); + void durationChanged(); + void startedAtChanged(); + void emergencyChanged(); + void multipartyChanged(); + void forwardedChanged(); + void remoteHeldChanged(); + +public Q_SLOTS: + void answer(); + void hangup(); + void hold(bool on); + void deflect(const QString &target); + void sendDtmf(const QString &tones); + +protected Q_SLOTS: + void initialize(bool notifyError = false); + bool getProperties(); + + void onPendingCallFinished(QDBusPendingCallWatcher *watcher); + void onDurationChanged(int duration); + void onStatusChanged(int status, QString statusText); + void onLineIdChanged(QString lineId); + void onStartedAtChanged(const QDateTime &startedAt); + void onEmergencyChanged(bool isEmergency); + void onMultipartyChanged(bool isMultiparty); + void onForwardedChanged(bool isForwarded); + void onRemoteHeldChanged(bool isRemoteHeld); + +private: + class VoiceCallHandlerPrivate *d_ptr; + + Q_DISABLE_COPY(VoiceCallHandler) + Q_DECLARE_PRIVATE(VoiceCallHandler) +}; + +#endif // VOICECALLHANDLER_H diff --git a/rockworkd/platformintegration/sailfish/voicecallmanager.cpp b/rockworkd/platformintegration/sailfish/voicecallmanager.cpp new file mode 100644 index 0000000..afb3629 --- /dev/null +++ b/rockworkd/platformintegration/sailfish/voicecallmanager.cpp @@ -0,0 +1,315 @@ +#include "voicecallmanager.h" + +#include +#include +#include +#include + +class VoiceCallManagerPrivate +{ + Q_DECLARE_PUBLIC(VoiceCallManager) + +public: + VoiceCallManagerPrivate(VoiceCallManager *q) + : q_ptr(q), + interface(NULL), + activeVoiceCall(NULL), + connected(false) + { /*...*/ } + + VoiceCallManager *q_ptr; + + QDBusInterface *interface; + + QList voicecalls; + QHash providers; + + VoiceCallHandler* activeVoiceCall; + + bool connected; +}; + +VoiceCallManager::VoiceCallManager(Settings *settings, QObject *parent) + : QObject(parent), l(metaObject()->className()), d_ptr(new VoiceCallManagerPrivate(this)), settings(settings) +{ + this->initialize(); +} + +VoiceCallManager::~VoiceCallManager() +{ + Q_D(VoiceCallManager); + delete d; +} + +void VoiceCallManager::initialize(bool notifyError) +{ + Q_D(VoiceCallManager); + bool success = false; + + delete d->interface; + d->interface = new QDBusInterface("org.nemomobile.voicecall", + "/", + "org.nemomobile.voicecall.VoiceCallManager", + QDBusConnection::sessionBus(), + this); + + if(d->interface->isValid()) + { + success = true; + success &= (bool)QObject::connect(d->interface, SIGNAL(error(QString)), SIGNAL(error(QString))); + success &= (bool)QObject::connect(d->interface, SIGNAL(voiceCallsChanged()), SLOT(onVoiceCallsChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(providersChanged()), SLOT(onProvidersChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(activeVoiceCallChanged()), SLOT(onActiveVoiceCallChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(audioModeChanged()), SIGNAL(audioModeChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(audioRoutedChanged()), SIGNAL(audioRoutedChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(microphoneMutedChanged()), SIGNAL(microphoneMutedChanged())); + success &= (bool)QObject::connect(d->interface, SIGNAL(speakerMutedChanged()), SIGNAL(speakerMutedChanged())); + + onVoiceCallsChanged(); + onActiveVoiceCallChanged(); + } + + if(!(d->connected = success)) + { + QTimer::singleShot(2000, this, SLOT(initialize())); + if(notifyError) emit this->error("Failed to connect to VCM D-Bus service."); + } +} + +QDBusInterface* VoiceCallManager::interface() const +{ + Q_D(const VoiceCallManager); + return d->interface; +} + +VoiceCallHandlerList VoiceCallManager::voiceCalls() const +{ + Q_D(const VoiceCallManager); + return d->voicecalls; +} + +VoiceCallProviderHash VoiceCallManager::providers() const +{ + Q_D(const VoiceCallManager); + return d->providers; +} + +QString VoiceCallManager::defaultProviderId() const +{ + Q_D(const VoiceCallManager); + if(d->providers.count() == 0) { + qCDebug(l) << Q_FUNC_INFO << "No provider added"; + return QString::null; + } + + QStringList keys = d->providers.keys(); + qSort(keys); + + VoiceCallProviderData provider = d->providers.value(keys.value(0)); + return provider.id; +} + +VoiceCallHandler* VoiceCallManager::activeVoiceCall() const +{ + Q_D(const VoiceCallManager); + return d->activeVoiceCall; +} + +QString VoiceCallManager::audioMode() const +{ + Q_D(const VoiceCallManager); + return d->interface->property("audioMode").toString(); +} + +bool VoiceCallManager::isAudioRouted() const +{ + Q_D(const VoiceCallManager); + return d->interface->property("isAudioRouted").toBool(); +} + +bool VoiceCallManager::isMicrophoneMuted() const +{ + Q_D(const VoiceCallManager); + return d->interface->property("isMicrophoneMuted").toBool(); +} + +bool VoiceCallManager::isSpeakerMuted() const +{ + Q_D(const VoiceCallManager); + return d->interface->property("isSpeakerMuted").toBool(); +} + +void VoiceCallManager::dial(const QString &provider, const QString &msisdn) +{ + Q_D(VoiceCallManager); + QDBusPendingCall call = d->interface->asyncCall("dial", provider, msisdn); + + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingCallFinished(QDBusPendingCallWatcher*))); +} + +void VoiceCallManager::hangupAll() +{ + foreach (VoiceCallHandler* handler, voiceCalls()) { + handler->hangup(); + } +} + +void VoiceCallManager::silenceRingtone() +{ + Q_D(const VoiceCallManager); + QDBusPendingCall call = d->interface->asyncCall("silenceRingtone"); + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); + QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(onPendingSilenceFinished(QDBusPendingCallWatcher*))); +} + +/* + - Use of method calls instead of property setters to allow status checking. + */ +bool VoiceCallManager::setAudioMode(const QString &mode) +{ + Q_D(const VoiceCallManager); + QDBusPendingReply reply = d->interface->call("setAudioMode", mode); + return reply.isError() ? false : reply.value(); +} + +bool VoiceCallManager::setAudioRouted(bool on) +{ + Q_D(const VoiceCallManager); + QDBusPendingReply reply = d->interface->call("setAudioRouted", on); + return reply.isError() ? false : reply.value(); +} + +bool VoiceCallManager::setMuteMicrophone(bool on) +{ + Q_D(VoiceCallManager); + QDBusPendingReply reply = d->interface->call("setMuteMicrophone", on); + return reply.isError() ? false : reply.value(); +} + +bool VoiceCallManager::setMuteSpeaker(bool on) +{ + Q_D(VoiceCallManager); + QDBusPendingReply reply = d->interface->call("setMuteSpeaker", on); + return reply.isError() ? false : reply.value(); +} + +void VoiceCallManager::onVoiceCallsChanged() +{ + Q_D(VoiceCallManager); + QStringList nIds = d->interface->property("voiceCalls").toStringList(); + QStringList oIds; + + QStringList added; + QStringList removed; + + // Map current call handlers to handler ids for easy indexing. + foreach(VoiceCallHandler *handler, d->voicecalls) + { + oIds.append(handler->handlerId()); + } + + // Index new handlers to be added. + foreach(QString nId, nIds) + { + if(!oIds.contains(nId)) added.append(nId); + } + + // Index old handlers to be removed. + foreach(QString oId, oIds) + { + if(!nIds.contains(oId)) removed.append(oId); + } + + // Remove handlers that need to be removed. + foreach(QString removeId, removed) + { + for (int i = 0; i < d->voicecalls.count(); ++i) { + VoiceCallHandler *handler = d->voicecalls.at(i); + if(handler->handlerId() == removeId) + { + handler->disconnect(this); + d->voicecalls.removeAt(i); + handler->deleteLater(); + break; + } + } + } + + // Add handlers that need to be added. + foreach(QString addId, added) + { + VoiceCallHandler *handler = new VoiceCallHandler(addId, this); + d->voicecalls.append(handler); + } + + emit this->voiceCallsChanged(); +} + +void VoiceCallManager::onProvidersChanged() +{ + Q_D(VoiceCallManager); + d->providers.clear(); + foreach(QString provider, d->interface->property("providers").toStringList()) + { + QStringList parts = provider.split(':'); + d->providers.insert(parts.first(), VoiceCallProviderData(parts.first(), + parts.last(), + parts.first())); + } + + emit this->providersChanged(); +} + +void VoiceCallManager::onActiveVoiceCallChanged() +{ + Q_D(VoiceCallManager); + QString voiceCallId = d->interface->property("activeVoiceCall").toString(); + + if(d->voicecalls.count() == 0 || voiceCallId.isNull() || voiceCallId.isEmpty()) + { + d->activeVoiceCall = NULL; + } + else + { + bool found = false; + d->activeVoiceCall = NULL; + foreach(VoiceCallHandler* handler, d->voicecalls) + { + if(handler->handlerId() == voiceCallId) + { + d->activeVoiceCall = handler; + found = true; + } + if(!found) d->activeVoiceCall = NULL; + } + } + + emit this->activeVoiceCallChanged(); +} + +void VoiceCallManager::onPendingCallFinished(QDBusPendingCallWatcher *watcher) +{ + QDBusPendingReply reply = *watcher; + + if (reply.isError()) { + emit this->error(reply.error().message()); + } else { + qCDebug(l) << QString("Received successful reply for member: ") + reply.reply().member(); + } + + watcher->deleteLater(); +} + +void VoiceCallManager::onPendingSilenceFinished(QDBusPendingCallWatcher *watcher) +{ + QDBusPendingReply<> reply = *watcher; + + if (reply.isError()) { + emit this->error(reply.error().message()); + } else { + qCDebug(l) << QString("Received successful reply for member: ") + reply.reply().member(); + } + + watcher->deleteLater(); +} diff --git a/rockworkd/platformintegration/sailfish/voicecallmanager.h b/rockworkd/platformintegration/sailfish/voicecallmanager.h new file mode 100644 index 0000000..ec51230 --- /dev/null +++ b/rockworkd/platformintegration/sailfish/voicecallmanager.h @@ -0,0 +1,111 @@ +#ifndef VOICECALLMANAGER_H +#define VOICECALLMANAGER_H + +#include "voicecallhandler.h" +#include "settings.h" + +#include +#include +#include +#include + +class VoiceCallProviderData +{ +public: + VoiceCallProviderData() {/*..*/} + VoiceCallProviderData(const QString &pId, const QString &pType, const QString &pLabel) + : id(pId), type(pType), label(pLabel) {/*...*/} + + QString id; + QString type; + QString label; +}; + +typedef QHash VoiceCallProviderHash; + +typedef QList VoiceCallHandlerList; + +class VoiceCallManager : public QObject +{ + Q_OBJECT + QLoggingCategory l; + + Q_PROPERTY(QDBusInterface* interface READ interface) + + Q_PROPERTY(VoiceCallHandlerList voiceCalls READ voiceCalls NOTIFY voiceCallsChanged) + Q_PROPERTY(VoiceCallProviderHash providers READ providers NOTIFY providersChanged) + + Q_PROPERTY(QString defaultProviderId READ defaultProviderId NOTIFY defaultProviderChanged) + + Q_PROPERTY(VoiceCallHandler* activeVoiceCall READ activeVoiceCall NOTIFY activeVoiceCallChanged) + + Q_PROPERTY(QString audioMode READ audioMode WRITE setAudioMode NOTIFY audioModeChanged) + Q_PROPERTY(bool isAudioRouted READ isAudioRouted WRITE setAudioRouted NOTIFY audioRoutedChanged) + Q_PROPERTY(bool isMicrophoneMuted READ isMicrophoneMuted WRITE setMuteMicrophone NOTIFY microphoneMutedChanged) + Q_PROPERTY(bool isSpeakerMuted READ isSpeakerMuted WRITE setMuteSpeaker NOTIFY speakerMutedChanged) + +public: + explicit VoiceCallManager(Settings *settings, QObject *parent = 0); + ~VoiceCallManager(); + + QDBusInterface* interface() const; + + VoiceCallHandlerList voiceCalls() const; + VoiceCallProviderHash providers() const; + + QString defaultProviderId() const; + + VoiceCallHandler* activeVoiceCall() const; + + QString audioMode() const; + bool isAudioRouted() const; + + bool isMicrophoneMuted() const; + bool isSpeakerMuted() const; + +Q_SIGNALS: + void error(const QString &message); + + void providersChanged(); + void voiceCallsChanged(); + + void defaultProviderChanged(); + + void activeVoiceCallChanged(); + + void audioModeChanged(); + void audioRoutedChanged(); + void microphoneMutedChanged(); + void speakerMutedChanged(); + +public Q_SLOTS: + void dial(const QString &providerId, const QString &msisdn); + void hangupAll(); + + void silenceRingtone(); + + bool setAudioMode(const QString &mode); + bool setAudioRouted(bool on); + bool setMuteMicrophone(bool on = true); + bool setMuteSpeaker(bool on = true); + +protected Q_SLOTS: + void initialize(bool notifyError = false); + + void onProvidersChanged(); + void onVoiceCallsChanged(); + void onActiveVoiceCallChanged(); + + void onPendingCallFinished(QDBusPendingCallWatcher *watcher); + void onPendingSilenceFinished(QDBusPendingCallWatcher *watcher); + +private: + class VoiceCallManagerPrivate *d_ptr; + + Settings *settings; + + Q_DISABLE_COPY(VoiceCallManager) + Q_DECLARE_PRIVATE(VoiceCallManager) +}; + +#endif // VOICECALLMANAGER_H diff --git a/rockworkd/rockworkd.pro b/rockworkd/rockworkd.pro index a15d64d..888fefc 100644 --- a/rockworkd/rockworkd.pro +++ b/rockworkd/rockworkd.pro @@ -4,14 +4,12 @@ QT -= gui include(../version.pri) TARGET = rockpoold -CONFIG += c++11 -#CONFIG -= app_bundle - -TEMPLATE = app -INCLUDEPATH += /usr/lib/arm-linux-gnueabihf/glib-2.0/include /usr/lib/x86_64-linux-gnu/glib-2.0/include/ /usr/include/glib-2.0/ +CONFIG += c++11 +CONFIG += console +CONFIG += link_pkgconfig -INCLUDEPATH += /usr/include/telepathy-qt5/ /usr/include/quazip/ +INCLUDEPATH += /usr/include/telepathy-qt5/ $$[QT_HOST_PREFIX]/include/quazip/ LIBS += -lquazip -ltelepathy-qt5 SOURCES += main.cpp \ @@ -48,6 +46,8 @@ SOURCES += main.cpp \ # Platform integration part platformintegration/sailfish/sailfishplatform.cpp \ platformintegration/sailfish/callchannelobserver.cpp \ +# platformintegration/sailfish/voicecallmanager.cpp \ +# platformintegration/sailfish/voicecallhandler.cpp \ libpebble/blobdb.cpp \ libpebble/timelineitem.cpp \ libpebble/notification.cpp \ @@ -99,6 +99,8 @@ HEADERS += \ # Platform integration part platformintegration/sailfish/sailfishplatform.h \ platformintegration/sailfish/callchannelobserver.h \ +# platformintegration/sailfish/voicecallmanager.h \ +# platformintegration/sailfish/voicecallhandler.h \ libpebble/blobdb.h \ libpebble/timelineitem.h \ libpebble/notification.h \ @@ -124,19 +126,14 @@ testing: { QT += qml quick } -libs.files = /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5.4.1 \ - /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5 \ - /usr/lib/arm-linux-gnueabihf/libquazip-qt5.so.1.0.0 \ - /usr/lib/arm-linux-gnueabihf/libquazip-qt5.so.1 -libs.path = /usr/ -INSTALLS += libs +INSTALLS += target systemd systemd.files = $${TARGET}.service systemd.path = /usr/lib/systemd/user # Default rules for deployment. target.path = /usr/bin -INSTALLS+=target RESOURCES += \ libpebble/jskit/jsfiles.qrc + diff --git a/rpm/rockpool.spec b/rpm/rockpool.spec index 5e19eb5..4e4365a 100644 --- a/rpm/rockpool.spec +++ b/rpm/rockpool.spec @@ -13,7 +13,7 @@ Name: rockpool %{!?qtc_make:%define qtc_make make} %{?qtc_builddir:%define _builddir %qtc_builddir} Summary: Support for Pebble watches in SailfishOS -Version: 1.0 +Version: 0.1 Release: 1 Group: Qt/Qt License: GPL3 @@ -23,19 +23,24 @@ Source100: rockpool.yaml Requires: sailfishsilica-qt5 >= 0.10.9 Requires: systemd-user-session-targets Requires: nemo-qml-plugin-dbus-qt5 +Requires: quazip BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Bluetooth) BuildRequires: pkgconfig(Qt5Contacts) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: pkgconfig(Qt5Location) +BuildRequires: pkgconfig(Qt5Organizer) BuildRequires: pkgconfig(mlite5) BuildRequires: pkgconfig(sailfishapp) >= 0.0.10 BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(zlib) +BuildRequires: desktop-file-utils %description -Support for Pebble watch to receive events from SailfishOS device via Bluetooth. +Support for Pebble watch on SailfishOS devices. %prep @@ -67,6 +72,10 @@ mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants ln -s ../rockpoold.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/ # << install post +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/*.desktop + %post # >> post su nemo -c 'systemctl --user daemon-reload' @@ -78,8 +87,7 @@ update-desktop-database %defattr(-,root,root,-) %{_bindir} %{_datadir}/%{name}/qml -%{_datadir}/%{name}/jsfiles.qrc -%{_datadir}/%{name}/translations +%{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/86x86/apps/%{name}.png %{_libdir}/systemd/user/%{name}d.service %{_libdir}/systemd/user/user-session.target.wants/%{name}d.service diff --git a/rpm/rockpool.yaml b/rpm/rockpool.yaml index 51d72b6..5ec39ca 100644 --- a/rpm/rockpool.yaml +++ b/rpm/rockpool.yaml @@ -1,6 +1,6 @@ Name: rockpool Summary: Support for Pebble watches in SailfishOS -Version: 1.0 +Version: 0.1 Release: 1 Group: Qt/Qt URL: http://getpebble.com/ @@ -8,7 +8,7 @@ License: GPL3 Sources: - '%{name}-%{version}.tar.xz' Description: | - Support for Pebble watch to receive events from SailfishOS device via Bluetooth. + Support for Pebble watch on SailfishOS devices. Configure: none Builder: qtc5 QMakeOptions: @@ -20,6 +20,9 @@ PkgConfigBR: - Qt5Quick - Qt5Qml - Qt5Core +- Qt5Network +- Qt5Location +- Qt5Organizer - mlite5 - sailfishapp >= 0.0.10 - icu-i18n @@ -28,11 +31,11 @@ Requires: - sailfishsilica-qt5 >= 0.10.9 - systemd-user-session-targets - nemo-qml-plugin-dbus-qt5 +- quazip Files: - '%{_bindir}' - '%{_datadir}/%{name}/qml' -- '%{_datadir}/%{name}/jsfiles.qrc' -- '%{_datadir}/%{name}/translations' +- '%{_datadir}/applications/%{name}.desktop' - '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png' - '%{_libdir}/systemd/user/%{name}d.service' - '%{_libdir}/systemd/user/user-session.target.wants/%{name}d.service' -- cgit v1.2.3