[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/poetaster/harbour-dwd.git</param>
<param name="branch">main</param>
- <param name="revision">0.7.1</param>
+ <param name="revision">0.8.0</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/harbour-dwd.desktop
^
|
@@ -1,7 +1,8 @@
[Desktop Entry]
Type=Application
Icon=harbour-dwd
-Exec=sailjail -p harbour-dwd.desktop /usr/bin/harbour-dwd
+X-Nemo-Application-Type=silica-qt5
+Exec=harbour-dwd
Name=German Weather Service
[X-Sailjail]
@@ -9,8 +10,8 @@
ApplicationName=harbour-dwd
Permissions=Internet;Location
-# translation example:
-# your app name in German locale (de)
+#[X-HarbourBackup]
+#BackupPathList=.local/share/de.poetaster/harbour-dwd
Name[de]=Deutscher Wetter Dienst
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/qml/delegates/WeatherItem.qml
^
|
@@ -51,7 +51,7 @@
spacing: Theme.paddingSmall
Column {
id: column
- width: parent.width / 3
+ width: parent.width * .30
spacing: Theme.paddingMedium
/*Text{
// this is a hack, obviously
@@ -78,7 +78,7 @@
}
Column {
id: column2
- width: parent.width / 3
+ width: parent.width * .30
spacing: Theme.paddingMedium
Label {
topPadding: 24
@@ -88,7 +88,7 @@
wrapMode: Text.WordWrap
font.pixelSize: Theme.fontSizeExtraLarge + 24
color: Theme.highlightColor
- horizontalAlignment: "AlignHCenter"
+ //horizontalAlignment: "AlignHCenter"
verticalAlignment: "AlignVCenter"
}
@@ -119,7 +119,7 @@
}
Column {
id: column3
- width: parent.width / 3
+ width: parent.width * .40
spacing: Theme.paddingMedium
/*Label {
topPadding: 8
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/qml/pages/ManageLocations.qml
^
|
@@ -25,14 +25,15 @@
import "../js/storage.js" as Store
import "../delegates"
Page {
- property var cities;
- property variant coordinate;
- property var debug;
- property var now;
- property var coord;
- property var lat;
- property var lon;
- property var name;
+
+ property var cities
+ property variant coordinate
+ property var debug: false
+ property var now
+ property var coord
+ property var lat
+ property var lon
+ property var name
id: managePage
allowedOrientations: Orientation.All
@@ -41,28 +42,28 @@
//fetchStoredCities();
}
function titleCase(str) {
- //str.toLowerCase().replace('/\b(\w)/g');
- //return str.toUpperCase();
+ //str.toLowerCase().replace('/\b(\w)/g');
+ //return str.toUpperCase();
str = str.toLowerCase();
var words = str.split(' ');
var results = [];
for (var i = 0; i < words.length; i++) {
- var letter = words[i].charAt(0).toUpperCase();
- results.push(letter + words[i].slice(1));
+ var letter = words[i].charAt(0).toUpperCase();
+ results.push(letter + words[i].slice(1));
}
return results.join(' ');
}
function printableMethod(method) {
- if (method === PositionSource.SatellitePositioningMethods)
- return "Satellite";
- else if (method === PositionSource.NoPositioningMethods)
- return "Not available"
- else if (method === PositionSource.NonSatellitePositioningMethods)
- return "Non-satellite"
- else if (method === PositionSource.AllPositioningMethods)
- return "Multiple"
- return "source error";
+ if (method === PositionSource.SatellitePositioningMethods)
+ return "Satellite";
+ else if (method === PositionSource.NoPositioningMethods)
+ return "Not available"
+ else if (method === PositionSource.NonSatellitePositioningMethods)
+ return "Non-satellite"
+ else if (method === PositionSource.AllPositioningMethods)
+ return "Multiple"
+ return "source error";
}
/*
"id": 4732,
@@ -77,6 +78,7 @@
"last_record": "2021-07-03T11:00:00+00:00",
"distance": 4470.0
*/
+
function fetchCities() {
debug = false;
var response = Store.getLocationsList();
@@ -111,13 +113,15 @@
}
function search(string) {
var ret = [];
- //console.debug(JSON.stringify(cities[0]));
+ if (debug) console.debug(JSON.stringify(cities[0]));
listModel.clear();
for (var i = 0; i < cities.length; i++) {
if (string !== "" && cities[i].name.indexOf(string) >= 0) {
+
ret.push({"name": cities[i].name});
listModel.append(cities[i])
//if(debug) console.debug(JSON.stringify(i));
+
if(debug) console.debug(JSON.stringify(cities[i].name));
//if(debug) console.debug(JSON.stringify(listModel.count));
}
@@ -126,9 +130,10 @@
return ret;
}
- anchors.fill: parent
PositionSource {
id: positionSource
+ //active: true
+
onPositionChanged: {
coord = positionSource.position.coordinate;
if (debug) console.log("Coordinate:", coord.longitude, coord.latitude);
@@ -140,8 +145,7 @@
onSourceErrorChanged: {
if (sourceError == PositionSource.NoError)
return
-
- console.log("Source error: " + sourceError)
+ if (debug) console.log("Source error: " + sourceError)
activityText.fadeOut = true
stop()
}
@@ -150,15 +154,17 @@
activityText.fadeOut = true
}*/
}
+
SilicaFlickable {
+ id:container
anchors.fill: parent
contentHeight: column.height
+ //contentHeight: contentItem.childrenRect.heighta
PageHeader {
id: header
title: qsTr("Position (GPS) Locations")
}
-
// PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
PullDownMenu {
MenuItem {
@@ -180,7 +186,51 @@
}
}
}
- /*SearchField {
+
+ Column {
+ id: column
+ y:60
+ spacing: 10
+ width: parent.width
+ Item {
+ width: parent.width
+ height: Theme.paddingLarge
+ }
+ Label {
+ id: posText
+ font.bold: true
+ padding:Theme.paddingLarge
+ text: "Longitude: "+ coord.longitude + "\n" + "Latitude: " + coord.latitude
+ }
+ Item {
+ width: parent.width
+ height: Theme.paddingLarge
+ }
+ Text {
+ id: activityText;
+ color: Theme.backgroundGlowColor
+ font.bold: true
+ padding:Theme.paddingLarge
+ property bool fadeOut: false
+ visible: true
+ text: {
+ if (fadeOut)
+ return qsTr("Timeout occurred!")
+ else if (positionSource.active)
+ // this will, given source is marked active always be true
+ // why this is different than in 3.4, I don't know
+ return qsTr("Retrieving update...")
+ else
+ return ""
+ }
+
+ Timer {
+ id: fadeoutTimer; repeat: false; interval: 3000; running: activityText.fadeOut
+ onTriggered: { activityText.fadeOut = false; }
+ }
+ }
+ /* Consider adding a search by Lat/Long
+ SearchField {
placeholderText: qsTr("Search")
id: searchField
width: parent.width
@@ -192,24 +242,23 @@
if (text != "") searchField.focus = false
}
}*/
- Column {
- id: column
- width: parent.width
- anchors.top: header.bottom
SilicaListView {
+ //anchors.top: header.bottom
id:listView
- leftMargin: 40
+ leftMargin: Theme.paddingLarge
+ topMargin: Theme.paddingLarge
width: parent.width - 2*x
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/src/harbour-dwd.cpp
^
|
@@ -9,6 +9,16 @@
#include <QtQuick>
#endif
+
+#include <QGuiApplication>
+#include <QLocale>
+#include <QQuickView>
+#include <QScopedPointer>
+#include <QStandardPaths>
+#include <QString>
+#include <QStringList>
+#include <QTranslator>
+#include <QtQml>
#include <QDebug>
#include <QDir>
#include <QFile>
@@ -57,8 +67,29 @@
// To display the view, call "show()" (will show fullscreen on device).
// first check if we've got the new paths in place
+ // this has to be done here, before we assign name below
migrateLocalStorage();
- return SailfishApp::main(argc, argv);
+ QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
+
+ app->setOrganizationDomain("de.poetaster");
+ app->setOrganizationName("de.poetaster"); // needed for Sailjail
+ app->setApplicationName("harbour-dwd");
+
+ // install translations, though this is probably automagical, to-do see actual values
+ // QLocale::system().name()
+ QTranslator *appTranslator = new QTranslator;
+ appTranslator->load("harbour-dwd-" + QLocale::system().name(), SailfishApp::pathTo("translations").path());
+ app->installTranslator(appTranslator);
+
+ QScopedPointer<QQuickView> view(SailfishApp::createView());
+ //view->rootContext()->setContextProperty("dateParser", &dateParser);
+ //view->rootContext()->setContextProperty("json", &json);
+
+ view->setSource(SailfishApp::pathTo("qml/harbour-dwd.qml"));
+ view->setTitle("German Weath Service");
+ view->showFullScreen();
+
+ return app->exec();
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/translations/harbour-dwd-de_DE.ts
^
|
@@ -91,37 +91,37 @@
<context>
<name>ManageLocations</name>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="159"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="166"/>
<source>Position (GPS) Locations</source>
<translation type="unfinished">GPS Orte hinzufügen</translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="165"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="171"/>
<source>About</source>
<translation>Über</translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="171"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="177"/>
<source>Add Locations</source>
<translation type="unfinished">Ort hinzufügen</translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="177"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="183"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="215"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="264"/>
<source> meters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="272"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="218"/>
<source>Timeout occurred!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="274"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="222"/>
<source>Retrieving update...</source>
<translation type="unfinished"></translation>
</message>
@@ -136,7 +136,7 @@
<message>
<location filename="../qml/pages/OverviewPage.qml" line="139"/>
<source>GPS Locations</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">GPS Orte hinzufügen</translation>
</message>
<message>
<location filename="../qml/pages/OverviewPage.qml" line="145"/>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dwd-0.8.0.tar.bz2/translations/harbour-dwd.ts
^
|
@@ -91,37 +91,37 @@
<context>
<name>ManageLocations</name>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="159"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="166"/>
<source>Position (GPS) Locations</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="165"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="171"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="171"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="177"/>
<source>Add Locations</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="177"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="183"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="215"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="264"/>
<source> meters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="272"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="218"/>
<source>Timeout occurred!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qml/pages/ManageLocations.qml" line="274"/>
+ <location filename="../qml/pages/ManageLocations.qml" line="222"/>
<source>Retrieving update...</source>
<translation type="unfinished"></translation>
</message>
|