Rinomina in harbour-tide
@@ -1,4 +1,4 @@
|
||||
# harbour-maree
|
||||
# harbour-tide
|
||||
|
||||
Previsioni di marea **universali** per Sailfish OS — client nativo Silica con
|
||||
motore armonico locale (nessuna API di maree: calcolo offline, per sempre).
|
||||
@@ -47,14 +47,14 @@ qml/pages/ MainPage (porti + ricerca libera), DetailPage
|
||||
(grafico canvas, eventi, card porto vicino, astro),
|
||||
SettingsPage (lingua, unità, intervallo, porto)
|
||||
qml/cover/ cover con porto preferito e prossima marea
|
||||
translations/ harbour-maree.ts (EN sorgente), harbour-maree_it.ts
|
||||
translations/ harbour-tide.ts (EN sorgente), harbour-tide_it.ts
|
||||
icons/ icone 86/108/128/172 (make_icons.py, stile harbour)
|
||||
rpm/ spec e desktop file (SailJail: Internet)
|
||||
```
|
||||
|
||||
## Configurazione
|
||||
|
||||
File: `~/.config/harbour/maree/maree.conf` (QSettings, zona persistente
|
||||
File: `~/.config/harbour/tide/tide.conf` (QSettings, zona persistente
|
||||
della sandbox SailJail). Chiavi: `language` (system/en/it), `preferredPort`,
|
||||
`unit` (m/ft), `days` (1/2/3).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
TEMPLATE = app
|
||||
TARGET = harbour-maree
|
||||
TARGET = harbour-tide
|
||||
|
||||
CONFIG += sailfishapp
|
||||
CONFIG += c++11
|
||||
@@ -12,31 +12,31 @@ HEADERS += \
|
||||
src/settings.h
|
||||
|
||||
OTHER_FILES += \
|
||||
qml/harbour-maree.qml \
|
||||
qml/harbour-tide.qml \
|
||||
qml/pages/*.qml \
|
||||
qml/cover/*.qml \
|
||||
qml/js/*.js \
|
||||
rpm/harbour-maree.spec \
|
||||
rpm/harbour-maree.desktop \
|
||||
translations/harbour-maree.ts \
|
||||
translations/harbour-maree_it.ts
|
||||
rpm/harbour-tide.spec \
|
||||
rpm/harbour-tide.desktop \
|
||||
translations/harbour-tide.ts \
|
||||
translations/harbour-tide_it.ts
|
||||
|
||||
DISTFILES += $$OTHER_FILES
|
||||
|
||||
# Le traduzioni NON sono gestite dal template sailfishapp_i18n sul kit 5.1
|
||||
# (il .qm non viene generato/installato in modo affidabile). Lo spec compila
|
||||
# il catalogo con lrelease e lo installa in /usr/share/harbour-maree/translations;
|
||||
# il catalogo con lrelease e lo installa in /usr/share/harbour-tide/translations;
|
||||
# main.cpp carica il catalogo italiano esplicitamente (pattern calibreweb).
|
||||
# Le stringhe sorgente sono INGLESI (lingua di default); harbour-maree_it.ts
|
||||
# Le stringhe sorgente sono INGLESI (lingua di default); harbour-tide_it.ts
|
||||
# fornisce il catalogo italiano.
|
||||
|
||||
# Icone installate via make install (struttura standard hicolor)
|
||||
icons86.path = /usr/share/icons/hicolor/86x86/apps
|
||||
icons86.files = $$PWD/icons/86x86/harbour-maree.png
|
||||
icons86.files = $$PWD/icons/86x86/harbour-tide.png
|
||||
icons108.path = /usr/share/icons/hicolor/108x108/apps
|
||||
icons108.files = $$PWD/icons/108x108/harbour-maree.png
|
||||
icons108.files = $$PWD/icons/108x108/harbour-tide.png
|
||||
icons128.path = /usr/share/icons/hicolor/128x128/apps
|
||||
icons128.files = $$PWD/icons/128x128/harbour-maree.png
|
||||
icons128.files = $$PWD/icons/128x128/harbour-tide.png
|
||||
icons172.path = /usr/share/icons/hicolor/172x172/apps
|
||||
icons172.files = $$PWD/icons/172x172/harbour-maree.png
|
||||
icons172.files = $$PWD/icons/172x172/harbour-tide.png
|
||||
INSTALLS += icons86 icons108 icons128 icons172
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -72,7 +72,7 @@ def draw_icon(size):
|
||||
def main():
|
||||
for s in (86, 108, 128, 172):
|
||||
os.makedirs(f"icons/{s}x{s}", exist_ok=True)
|
||||
draw_icon(s).save(f"icons/{s}x{s}/harbour-maree.png")
|
||||
draw_icon(s).save(f"icons/{s}x{s}/harbour-tide.png")
|
||||
print("icone scritte: 86, 108, 128, 172")
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ Name=Maree
|
||||
Name[it_IT]=Maree
|
||||
Comment=Universal tide predictions
|
||||
Comment[it_IT]=Previsioni di marea universali
|
||||
Exec=harbour-maree
|
||||
Icon=harbour-maree
|
||||
Exec=harbour-tide
|
||||
Icon=harbour-tide
|
||||
Type=Application
|
||||
X-Nemo-Application-Type=silica-qt5
|
||||
Categories=Utility;
|
||||
@@ -1,10 +1,10 @@
|
||||
Name: harbour-maree
|
||||
Name: harbour-tide
|
||||
Summary: Universal tide predictions
|
||||
Version: 0.1.0
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
License: MIT
|
||||
URL: https://git.hackatoniclife.com/kaneda/harbour-maree
|
||||
URL: https://git.hackatoniclife.com/kaneda/harbour-tide
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}.desktop
|
||||
|
||||
@@ -15,7 +15,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
// Identita' allineata al profilo X-Sailjail del desktop file:
|
||||
// AppConfigLocation = ~/.config/harbour/maree (zona persistente della sandbox).
|
||||
app->setOrganizationName(QStringLiteral("harbour"));
|
||||
app->setApplicationName(QStringLiteral("maree"));
|
||||
app->setApplicationName(QStringLiteral("tide"));
|
||||
app->setApplicationVersion(QStringLiteral("0.1.0"));
|
||||
|
||||
Settings settings;
|
||||
@@ -24,7 +24,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
// lingua UI di Sailfish, "en" forza l'inglese (default, stringhe sorgente),
|
||||
// "it" carica il catalogo italiano dal data dir dell'app (il validatore
|
||||
// RPM rifiuta /usr/share/translations, quindi il .qm sta in
|
||||
// /usr/share/harbour-maree/translations e libsailfishapp non lo carica).
|
||||
// /usr/share/harbour-tide/translations e libsailfishapp non lo carica).
|
||||
QString lang = settings.language();
|
||||
if (lang == QLatin1String("system")) {
|
||||
const QString sys = QLocale::system().name();
|
||||
@@ -38,23 +38,23 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
t->deleteLater();
|
||||
}
|
||||
QTranslator *translator = new QTranslator(app);
|
||||
if (translator->load(QStringLiteral("harbour-maree_it"),
|
||||
QStringLiteral("/usr/share/harbour-maree/translations"))) {
|
||||
if (translator->load(QStringLiteral("harbour-tide_it"),
|
||||
QStringLiteral("/usr/share/harbour-tide/translations"))) {
|
||||
app->installTranslator(translator);
|
||||
} else {
|
||||
qWarning("harbour-maree: cannot load harbour-maree_it.qm");
|
||||
qWarning("harbour-tide: cannot load harbour-tide_it.qm");
|
||||
}
|
||||
}
|
||||
|
||||
QQuickView *view = SailfishApp::createView();
|
||||
|
||||
qDebug() << "harbour-maree v0.1.0 build" << __DATE__ << __TIME__;
|
||||
qDebug() << "harbour-tide v0.1.0 build" << __DATE__ << __TIME__;
|
||||
|
||||
view->rootContext()->setContextProperty(QStringLiteral("appSettings"), &settings);
|
||||
view->rootContext()->setContextProperty(QStringLiteral("appVersion"),
|
||||
QCoreApplication::applicationVersion());
|
||||
|
||||
view->setSource(SailfishApp::pathTo(QStringLiteral("qml/harbour-maree.qml")));
|
||||
view->setSource(SailfishApp::pathTo(QStringLiteral("qml/harbour-tide.qml")));
|
||||
view->show();
|
||||
|
||||
return app->exec();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Settings::Settings(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_settings(QStringLiteral("harbour"), QStringLiteral("maree"))
|
||||
, m_settings(QStringLiteral("harbour"), QStringLiteral("tide"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||