Schermata principale con tutte le macchine, avviso di fine lavaggio, IT/EN
- la chiave si chiede una volta sola: poi la schermata principale mostra ogni macchina dell'account col suo stato e il suo comando - avviso di sistema a fine lavaggio, anche se il ciclo e' finito mentre l'app era chiusa (si annota il numero di ciclo gia' avvisato) - comandi per singola macchina: avvio/stop, spegnimento, risveglio, stop ritardato (nel menu della macchina, tocco prolungato sul nome) - le macchine non raggiungibili vengono segnate come non collegate, senza riempire la barra dei messaggi ad ogni aggiornamento - multilingua italiano/inglese, catalogo verificato dal banco di prova (52 controlli)
This commit is contained in:
1 parent
fe961b438c
commit
e2c6f28613
14 files changed
+973
-499
No files matched your search
+10
-4
@@ -2,7 +2,11 @@ import QtQuick 2.2
|
||||
import Sailfish.Silica 1.0
|
||||
import "../js/status.js" as Status
|
||||
|
||||
// Copertina: la macchina che sta lavorando (se ce n'e' una), altrimenti la
|
||||
// prima. Stesse funzioni della schermata principale: una sola verita'.
|
||||
CoverBackground {
|
||||
property int shown: api.activeIndex()
|
||||
|
||||
Column {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - 2 * Theme.paddingMedium
|
||||
@@ -13,7 +17,7 @@ CoverBackground {
|
||||
width: Theme.itemSizeSmall / 2.2
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: Status.statusColor(api.statusLevel)
|
||||
color: Status.statusColor(api.statusLevelAt(shown))
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -22,16 +26,18 @@ CoverBackground {
|
||||
elide: Text.ElideRight
|
||||
color: Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: api.hasState ? api.phaseText : qsTr("No data")
|
||||
text: api.validIndex(shown) && api.hasStateAt(shown)
|
||||
? api.phaseTextAt(shown)
|
||||
: qsTr("No data")
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
visible: api.remainText.length > 0
|
||||
visible: api.validIndex(shown) && api.remainTextAt(shown).length > 0
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
text: api.remainText
|
||||
text: api.validIndex(shown) ? api.remainTextAt(shown) : ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.2
|
||||
import Sailfish.Silica 1.0
|
||||
import Nemo.Notifications 1.0
|
||||
import "pages"
|
||||
import "cover"
|
||||
|
||||
@@ -8,4 +9,25 @@ ApplicationWindow
|
||||
initialPage: Component { MainPage { } }
|
||||
cover: Component { CoverPage { } }
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
// Avviso di fine lavaggio. La macchina lo racconta al cloud, l'app lo
|
||||
// chiede al cloud: nessun server di mezzo. Arriva quando l'app e' viva e
|
||||
// ha appena visto il ciclo finire; se nel frattempo era chiusa, arriva
|
||||
// alla prima riapertura.
|
||||
Notification {
|
||||
id: cycleNotice
|
||||
appName: "ThinQ"
|
||||
appIcon: "harbour-thinq"
|
||||
urgency: Notification.Normal
|
||||
expireTimeout: 10000
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: api
|
||||
onCycleFinished: {
|
||||
cycleNotice.summary = qsTr("Washing finished")
|
||||
cycleNotice.body = label
|
||||
cycleNotice.publish()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,20 @@
|
||||
import QtQuick 2.2
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
// Stop ritardato: 3-19 ore, gli unici valori che questa macchina accetta.
|
||||
// Stop ritardato: 3-19 ore, gli unici valori che queste macchine accettano.
|
||||
// Si apre dal menu di UNA macchina: senza l'indice il comando andrebbe a
|
||||
// quella sbagliata.
|
||||
Dialog {
|
||||
id: dialog
|
||||
|
||||
property int deviceIndex: -1
|
||||
property int hours: api.delayHours
|
||||
|
||||
canAccept: true
|
||||
canAccept: api.canCommandAt(deviceIndex)
|
||||
|
||||
onAccepted: {
|
||||
api.setDelayHours(hours)
|
||||
api.sendDelay()
|
||||
api.sendDelayAt(deviceIndex)
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -19,7 +22,8 @@ Dialog {
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
DialogHeader {
|
||||
title: qsTr("Delayed stop")
|
||||
title: api.validIndex(deviceIndex) ? api.labelAt(deviceIndex)
|
||||
: qsTr("Delayed stop")
|
||||
acceptText: qsTr("Set")
|
||||
}
|
||||
|
||||
|
||||
+158
-81
@@ -2,13 +2,17 @@ import QtQuick 2.2
|
||||
import Sailfish.Silica 1.0
|
||||
import "../js/status.js" as Status
|
||||
|
||||
// Prima schermata. Due volti:
|
||||
// * senza chiave di accesso -> si chiede una volta sola (qui, non nelle
|
||||
// impostazioni) e poi non se ne parla piu';
|
||||
// * con la chiave -> l'elenco delle macchine, ognuna col suo stato.
|
||||
Page {
|
||||
id: page
|
||||
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
// La macchina si aggiorna solo mentre la schermata e' in primo piano:
|
||||
// e' quello che l'utente ha scelto (niente ponte, niente servizio).
|
||||
// niente ponte, niente servizio che gira di nascosto.
|
||||
onStatusChanged: {
|
||||
if (status === PageStatus.Active)
|
||||
api.startPolling()
|
||||
@@ -23,22 +27,9 @@ Page {
|
||||
PullDownMenu {
|
||||
MenuItem {
|
||||
text: qsTr("Refresh")
|
||||
enabled: api.configured
|
||||
onClicked: api.refresh()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Delayed stop…")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("DelayDialog.qml"))
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Switch off")
|
||||
enabled: api.canCommand
|
||||
onClicked: api.powerOff()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Wake the display up")
|
||||
enabled: api.canCommand
|
||||
onClicked: api.wakeUp()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Settings")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
|
||||
@@ -51,131 +42,217 @@ Page {
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
PageHeader {
|
||||
title: api.alias
|
||||
title: qsTr("My machines")
|
||||
description: api.configured
|
||||
? (api.stale ? qsTr("Not up to date") : api.updatedText)
|
||||
: qsTr("Not configured")
|
||||
? (api.busy ? qsTr("Updating…") : qsTr("%1 found").arg(api.deviceCount))
|
||||
: qsTr("First setup")
|
||||
}
|
||||
|
||||
// Prima di tutto: se manca qualcosa per parlare con la macchina,
|
||||
// dirlo qui invece di mostrare una schermata vuota.
|
||||
// ---------------------------------------------------------------
|
||||
// Primo avvio: le credenziali si chiedono qui, una volta sola.
|
||||
// ---------------------------------------------------------------
|
||||
Column {
|
||||
width: parent.width
|
||||
visible: !api.configured
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
visible: !api.configured
|
||||
wrapMode: Text.WordWrap
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("Enter the LG access token in Settings and pick your machine.")
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
text: qsTr("The access token comes from connect-pat.lgthinq.com and stays on this phone only. If LG starts refusing it, paste a new one here.")
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: setupToken
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
label: qsTr("Access token")
|
||||
placeholderText: qsTr("paste the token")
|
||||
echoMode: TextInput.Password
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: setupCountry
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
label: qsTr("Country code")
|
||||
placeholderText: "IT"
|
||||
onTextChanged: appSettings.country = text
|
||||
Component.onCompleted: text = appSettings.country
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: !api.configured
|
||||
text: qsTr("Settings")
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
height: Theme.itemSizeMedium
|
||||
enabled: setupToken.text.length > 0 && !api.busy
|
||||
text: qsTr("Connect")
|
||||
onClicked: {
|
||||
appSettings.token = setupToken.text
|
||||
api.reloadCredentials()
|
||||
api.discover()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- stato ---
|
||||
// ---------------------------------------------------------------
|
||||
// Ogni macchina dell'account, col suo stato e il suo comando.
|
||||
// ---------------------------------------------------------------
|
||||
Repeater {
|
||||
model: api.configured ? api.deviceCount : 0
|
||||
|
||||
delegate: Column {
|
||||
id: machine
|
||||
width: column.width
|
||||
spacing: Theme.paddingSmall
|
||||
|
||||
// Nome e fase: il tocco prolungato apre le azioni della
|
||||
// macchina (stop ritardato, spegni, risveglia).
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Theme.itemSizeLarge
|
||||
visible: api.configured
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
height: Math.max(lamp.height, nameBox.height)
|
||||
|
||||
Rectangle {
|
||||
id: lamp
|
||||
x: Theme.horizontalPageMargin
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Theme.itemSizeSmall / 2.2
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: Status.statusColor(api.statusLevel)
|
||||
color: Status.statusColor(api.statusLevelAt(index))
|
||||
|
||||
SequentialAnimation on opacity {
|
||||
running: Status.isActive(api.statusLevel)
|
||||
running: Status.isActive(api.statusLevelAt(index))
|
||||
loops: Animation.Infinite
|
||||
PropertyAnimation { to: 0.35; duration: 900 }
|
||||
PropertyAnimation { to: 1.0; duration: 900 }
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Column {
|
||||
id: nameBox
|
||||
anchors.left: lamp.right
|
||||
anchors.leftMargin: Theme.paddingLarge
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.horizontalPageMargin
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
truncationMode: TruncationMode.Fade
|
||||
text: api.phaseText
|
||||
color: Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
}
|
||||
}
|
||||
spacing: Theme.paddingTiny
|
||||
|
||||
// --- tempo rimanente ---
|
||||
Column {
|
||||
Label {
|
||||
width: parent.width
|
||||
visible: api.configured
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: api.remainText.length > 0 ? api.remainText : "--"
|
||||
color: api.stale ? "orange" : Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeHuge
|
||||
truncationMode: TruncationMode.Fade
|
||||
text: api.labelAt(index)
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
}
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
visible: api.totalText.length > 0
|
||||
text: qsTr("of %1").arg(api.totalText)
|
||||
width: parent.width
|
||||
truncationMode: TruncationMode.Fade
|
||||
text: api.offlineAt(index)
|
||||
? qsTr("Not connected")
|
||||
: api.phaseTextAt(index)
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
}
|
||||
|
||||
// --- righe informative ---
|
||||
Column {
|
||||
width: parent.width
|
||||
visible: api.configured
|
||||
spacing: Theme.paddingSmall
|
||||
|
||||
DetailItem {
|
||||
label: qsTr("Cycle")
|
||||
value: api.cycleCount > 0 ? String(api.cycleCount) : "--"
|
||||
}
|
||||
|
||||
DetailItem {
|
||||
label: qsTr("Remote start")
|
||||
value: api.remoteEnabled ? qsTr("on") : qsTr("off")
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressAndHold: machineMenu.open(this)
|
||||
}
|
||||
}
|
||||
|
||||
// Se il comando a distanza e' spento, dirlo con le parole necessarie
|
||||
// invece di lasciare un tasto che non funziona.
|
||||
Label {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: api.hasStateAt(index)
|
||||
text: api.remainTextAt(index).length > 0 ? api.remainTextAt(index) : "--"
|
||||
color: api.staleAt(index) ? "orange" : Theme.primaryColor
|
||||
font.pixelSize: Theme.fontSizeHuge
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: api.totalLineAt(index).length > 0
|
||||
text: api.totalLineAt(index)
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
|
||||
// Se la macchina non risponde o ha l'avvio a distanza
|
||||
// spento, dirlo con le parole necessarie invece di lasciare
|
||||
// un tasto che non funziona.
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
visible: api.configured && api.hasState && !api.remoteEnabled
|
||||
wrapMode: Text.WordWrap
|
||||
visible: api.hasStateAt(index) && !api.remoteEnabledAt(index)
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
text: qsTr("To send commands, switch remote start on from the machine panel.")
|
||||
}
|
||||
|
||||
// --- UN comando, che cambia secondo lo stato ---
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
wrapMode: Text.WordWrap
|
||||
visible: api.offlineAt(index)
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
text: qsTr("The washing machine is not connected (switched off or offline)")
|
||||
}
|
||||
|
||||
// UN comando per macchina, che cambia secondo il suo stato.
|
||||
Button {
|
||||
id: primaryButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
height: Theme.itemSizeLarge
|
||||
visible: api.configured
|
||||
enabled: api.canCommand && !api.busy
|
||||
text: api.primaryLabel
|
||||
onClicked: api.runPrimary()
|
||||
height: Theme.itemSizeMedium
|
||||
visible: api.hasStateAt(index)
|
||||
enabled: api.canCommandAt(index) && !api.busy
|
||||
text: api.primaryLabelAt(index)
|
||||
onClicked: api.runPrimaryAt(index)
|
||||
}
|
||||
|
||||
ContextMenu {
|
||||
id: machineMenu
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Delayed stop…")
|
||||
enabled: api.canCommandAt(index)
|
||||
onClicked: pageStack.push(Qt.resolvedUrl("DelayDialog.qml"),
|
||||
{ "deviceIndex": index })
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Switch off")
|
||||
enabled: api.canCommandAt(index)
|
||||
onClicked: api.powerOffAt(index)
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Wake the display up")
|
||||
enabled: api.canCommandAt(index)
|
||||
onClicked: api.wakeUpAt(index)
|
||||
}
|
||||
}
|
||||
|
||||
Separator {
|
||||
width: parent.width
|
||||
color: Theme.secondaryHighlightColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Chiave presente ma nessuna macchina: dirlo qui, non con una
|
||||
// schermata vuota.
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
wrapMode: Text.WordWrap
|
||||
visible: api.configured && api.deviceCount === 0 && !api.busy
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("No machine found yet. Pull down to search again.")
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
|
||||
+12
-30
@@ -1,6 +1,8 @@
|
||||
import QtQuick 2.2
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
// Impostazioni: la chiave, il paese, la lingua. Le macchine non si scelgono
|
||||
// piu' qui: la schermata principale le mostra tutte.
|
||||
Page {
|
||||
id: page
|
||||
|
||||
@@ -67,7 +69,16 @@ Page {
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Machine")
|
||||
text: qsTr("Machines")
|
||||
}
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
wrapMode: Text.WordWrap
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("%1 found").arg(api.deviceCount)
|
||||
}
|
||||
|
||||
Button {
|
||||
@@ -76,35 +87,6 @@ Page {
|
||||
onClicked: api.discover()
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
label: qsTr("Machine")
|
||||
visible: api.deviceCount > 0
|
||||
currentIndex: api.selectedDevice
|
||||
menu: ContextMenu {
|
||||
Repeater {
|
||||
model: api.deviceCount
|
||||
MenuItem {
|
||||
text: api.deviceLabels[index]
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex >= 0 && currentIndex !== api.selectedDevice)
|
||||
api.chooseDevice(currentIndex)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
visible: appSettings.deviceAlias.length > 0
|
||||
color: Theme.secondaryColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
text: qsTr("Selected: %1").arg(appSettings.deviceAlias)
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Language")
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: harbour-thinq
|
||||
Summary: Control an LG ThinQ washing machine
|
||||
Version: 0.1.2
|
||||
Version: 0.2.0
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
License: MIT
|
||||
@@ -26,6 +26,14 @@ ThinQ Connect cloud from the phone: no server in between. The access token
|
||||
is stored only on the device, in the app private configuration file.
|
||||
|
||||
%changelog
|
||||
* Mon Oct 12 2026 Carlo - 0.2.0-1
|
||||
- la schermata principale chiede la chiave una volta sola, poi mostra tutte le
|
||||
macchine dell'account con lo stato di ciascuna
|
||||
- avviso di sistema a fine lavaggio (anche se il ciclo e' finito mentre l'app
|
||||
era chiusa)
|
||||
- comandi per singola macchina: avvio/stop, spegnimento, risveglio, stop ritardato
|
||||
- multilingua italiano/inglese
|
||||
|
||||
* Mon Oct 12 2026 Carlo - 0.1.2-1
|
||||
- nome mostrato nel launcher: ThinQ
|
||||
|
||||
|
||||
@@ -53,6 +53,18 @@ IT = {
|
||||
"Language": "Lingua",
|
||||
"System": "Sistema",
|
||||
"Version %1": "Versione %1",
|
||||
"My machines": "Le mie macchine",
|
||||
"Updating…": "Aggiornamento…",
|
||||
"%1 found": "%1 trovate",
|
||||
"First setup": "Primo avvio",
|
||||
"Connect": "Collega",
|
||||
"Not connected": "Non collegata",
|
||||
"No machine found yet. Pull down to search again.":
|
||||
"Nessuna macchina trovata. Trascina in basso per cercare di nuovo.",
|
||||
"Washing finished": "Lavaggio finito",
|
||||
"Machines": "Macchine",
|
||||
"The access token is missing": "Manca la chiave di accesso",
|
||||
"No machine to command": "Nessuna macchina da comandare",
|
||||
"Washing machine": "Lavatrice",
|
||||
"Start": "Avvia",
|
||||
"Stop": "Ferma",
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
|
||||
app->setOrganizationName(QStringLiteral("harbour"));
|
||||
app->setApplicationName(QStringLiteral("thinq"));
|
||||
app->setApplicationVersion(QStringLiteral("0.1.2"));
|
||||
app->setApplicationVersion(QStringLiteral("0.2.0"));
|
||||
|
||||
Settings settings;
|
||||
ThinQClient api(&settings);
|
||||
@@ -34,7 +34,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
QQuickView *view = SailfishApp::createView();
|
||||
|
||||
// Prima riga del log: dice se il device sta girando la build nuova o una stale.
|
||||
qDebug() << "harbour-thinq v0.1.2 build" << __DATE__ << __TIME__;
|
||||
qDebug() << "harbour-thinq v0.2.0 build" << __DATE__ << __TIME__;
|
||||
|
||||
view->rootContext()->setContextProperty(QStringLiteral("appSettings"), &settings);
|
||||
view->rootContext()->setContextProperty(QStringLiteral("api"), &api);
|
||||
|
||||
@@ -104,3 +104,18 @@ void Settings::setLanguage(const QString &value)
|
||||
m_settings.sync();
|
||||
emit languageChanged();
|
||||
}
|
||||
|
||||
int Settings::notifiedCycleFor(const QString &deviceId) const
|
||||
{
|
||||
if (deviceId.isEmpty())
|
||||
return 0;
|
||||
return m_settings.value(QStringLiteral("notified/") + deviceId, 0).toInt();
|
||||
}
|
||||
|
||||
void Settings::setNotifiedCycleFor(const QString &deviceId, int cycle)
|
||||
{
|
||||
if (deviceId.isEmpty() || cycle <= 0)
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("notified/") + deviceId, cycle);
|
||||
m_settings.sync();
|
||||
}
|
||||
@@ -41,6 +41,12 @@ public:
|
||||
QString language() const { return m_language; }
|
||||
void setLanguage(const QString &value);
|
||||
|
||||
// Ciclo gia' avvisato per ciascuna macchina: serve a non ripetere l'avviso
|
||||
// di fine lavaggio, e a recuperarlo se l'app era chiusa quando la macchina
|
||||
// ha finito.
|
||||
int notifiedCycleFor(const QString &deviceId) const;
|
||||
void setNotifiedCycleFor(const QString &deviceId, int cycle);
|
||||
|
||||
signals:
|
||||
void tokenChanged();
|
||||
void countryChanged();
|
||||
|
||||
+280
-98
@@ -3,7 +3,6 @@
|
||||
#include "settings.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
@@ -27,72 +26,145 @@ ThinQClient::ThinQClient(Settings *settings, QObject *parent)
|
||||
, m_settings(settings)
|
||||
{
|
||||
m_pollTimer.setSingleShot(true);
|
||||
// Una richiesta per volta: il timer riparte dopo ogni risposta (vedi scheduleNextPoll).
|
||||
// Una macchina per volta: ogni risposta fa partire la richiesta successiva
|
||||
// (pumpQueue), cosi' l'app non bombarda il cloud LG.
|
||||
connect(&m_pollTimer, &QTimer::timeout, this, [this]() { refresh(); });
|
||||
|
||||
connect(m_settings, &Settings::tokenChanged, this, [this]() {
|
||||
m_state = WasherState();
|
||||
m_stale = false;
|
||||
m_updated.clear();
|
||||
emit infoChanged();
|
||||
m_devices.clear();
|
||||
m_queue.clear();
|
||||
m_stateInFlight = false;
|
||||
setBusy(false);
|
||||
emit devicesChanged();
|
||||
emit stateChanged();
|
||||
});
|
||||
connect(m_settings, &Settings::deviceChanged, this, [this]() {
|
||||
m_state = WasherState();
|
||||
emit infoChanged();
|
||||
emit stateChanged();
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
||||
bool ThinQClient::configured() const
|
||||
{
|
||||
return !m_settings->token().isEmpty() && !m_settings->deviceId().isEmpty();
|
||||
return !m_settings->token().isEmpty();
|
||||
}
|
||||
|
||||
QString ThinQClient::alias() const
|
||||
int ThinQClient::activeIndex() const
|
||||
{
|
||||
const QString a = m_settings->deviceAlias();
|
||||
return a.isEmpty() ? QCoreApplication::translate("ThinQ", "Washing machine") : a;
|
||||
for (int i = 0; i < m_devices.size(); ++i) {
|
||||
if (ThinQJson::statusLevel(m_devices.at(i).state) == 1)
|
||||
return i;
|
||||
}
|
||||
for (int i = 0; i < m_devices.size(); ++i) {
|
||||
if (m_devices.at(i).hasState)
|
||||
return i;
|
||||
}
|
||||
return m_devices.isEmpty() ? -1 : 0;
|
||||
}
|
||||
|
||||
QString ThinQClient::phaseText() const
|
||||
bool ThinQClient::validIndex(int index) const
|
||||
{
|
||||
if (!m_state.valid)
|
||||
return index >= 0 && index < m_devices.size();
|
||||
}
|
||||
|
||||
QString ThinQClient::labelAt(int index) const
|
||||
{
|
||||
if (!validIndex(index))
|
||||
return QString();
|
||||
const QString label = m_devices.at(index).label;
|
||||
return label.isEmpty()
|
||||
? QCoreApplication::translate("ThinQ", "Washing machine")
|
||||
: label;
|
||||
}
|
||||
|
||||
bool ThinQClient::hasStateAt(int index) const
|
||||
{
|
||||
return validIndex(index) && m_devices.at(index).hasState;
|
||||
}
|
||||
|
||||
bool ThinQClient::offlineAt(int index) const
|
||||
{
|
||||
return validIndex(index) && m_devices.at(index).offline;
|
||||
}
|
||||
|
||||
bool ThinQClient::staleAt(int index) const
|
||||
{
|
||||
return validIndex(index) && m_devices.at(index).stale;
|
||||
}
|
||||
|
||||
QString ThinQClient::phaseTextAt(int index) const
|
||||
{
|
||||
if (!hasStateAt(index))
|
||||
return QCoreApplication::translate("ThinQ", "No data");
|
||||
return ThinQJson::phaseLabel(m_state);
|
||||
return ThinQJson::phaseLabel(m_devices.at(index).state);
|
||||
}
|
||||
|
||||
int ThinQClient::statusLevel() const
|
||||
int ThinQClient::statusLevelAt(int index) const
|
||||
{
|
||||
return ThinQJson::statusLevel(m_state);
|
||||
if (!validIndex(index))
|
||||
return -1;
|
||||
return ThinQJson::statusLevel(m_devices.at(index).state);
|
||||
}
|
||||
|
||||
QString ThinQClient::remainText() const
|
||||
QString ThinQClient::remainTextAt(int index) const
|
||||
{
|
||||
return ThinQJson::durationText(m_state.remainMinutes);
|
||||
if (!validIndex(index))
|
||||
return QString();
|
||||
return ThinQJson::durationText(m_devices.at(index).state.remainMinutes);
|
||||
}
|
||||
|
||||
QString ThinQClient::totalText() const
|
||||
QString ThinQClient::totalTextAt(int index) const
|
||||
{
|
||||
return ThinQJson::durationText(m_state.totalMinutes);
|
||||
if (!validIndex(index))
|
||||
return QString();
|
||||
return ThinQJson::durationText(m_devices.at(index).state.totalMinutes);
|
||||
}
|
||||
|
||||
QString ThinQClient::primaryLabel() const
|
||||
QString ThinQClient::totalLineAt(int index) const
|
||||
{
|
||||
if (!m_state.valid)
|
||||
const QString total = totalTextAt(index);
|
||||
if (total.isEmpty())
|
||||
return QString();
|
||||
return QCoreApplication::translate("ThinQ", "of %1").arg(total);
|
||||
}
|
||||
|
||||
int ThinQClient::cycleCountAt(int index) const
|
||||
{
|
||||
if (!validIndex(index))
|
||||
return 0;
|
||||
return m_devices.at(index).state.cycleCount;
|
||||
}
|
||||
|
||||
bool ThinQClient::remoteEnabledAt(int index) const
|
||||
{
|
||||
if (!hasStateAt(index))
|
||||
return false;
|
||||
return m_devices.at(index).state.remoteEnabled;
|
||||
}
|
||||
|
||||
QString ThinQClient::primaryLabelAt(int index) const
|
||||
{
|
||||
if (!hasStateAt(index))
|
||||
return QCoreApplication::translate("ThinQ", "Start");
|
||||
return ThinQJson::primaryActionLabel(m_state);
|
||||
return ThinQJson::primaryActionLabel(m_devices.at(index).state);
|
||||
}
|
||||
|
||||
bool ThinQClient::canCommand() const
|
||||
bool ThinQClient::canCommandAt(int index) const
|
||||
{
|
||||
return configured() && m_state.valid && m_state.remoteEnabled;
|
||||
if (!hasStateAt(index))
|
||||
return false;
|
||||
const DeviceEntry &e = m_devices.at(index);
|
||||
return !e.offline && e.state.remoteEnabled;
|
||||
}
|
||||
|
||||
QString ThinQClient::updatedText() const
|
||||
QString ThinQClient::updatedTextAt(int index) const
|
||||
{
|
||||
return m_updated;
|
||||
if (!validIndex(index))
|
||||
return QString();
|
||||
return m_devices.at(index).updated;
|
||||
}
|
||||
|
||||
QString ThinQClient::deviceIdAt(int index) const
|
||||
{
|
||||
if (!validIndex(index))
|
||||
return QString();
|
||||
return m_devices.at(index).id;
|
||||
}
|
||||
|
||||
void ThinQClient::setDelayHours(int hours)
|
||||
@@ -143,6 +215,10 @@ void ThinQClient::startPolling()
|
||||
{
|
||||
if (!configured())
|
||||
return;
|
||||
// Primo avvio con la chiave gia' salvata: prima le macchine, poi lo stato.
|
||||
if (m_devices.isEmpty())
|
||||
discover();
|
||||
else
|
||||
refresh();
|
||||
if (!m_pollTimer.isActive()) {
|
||||
m_pollTimer.start(m_pollInterval);
|
||||
@@ -162,61 +238,90 @@ void ThinQClient::scheduleNextPoll()
|
||||
m_pollTimer.start(m_pollInterval);
|
||||
}
|
||||
|
||||
void ThinQClient::queueAllStates()
|
||||
{
|
||||
m_queue.clear();
|
||||
for (int i = 0; i < m_devices.size(); ++i)
|
||||
m_queue << i;
|
||||
}
|
||||
|
||||
void ThinQClient::pumpQueue()
|
||||
{
|
||||
if (m_stateInFlight || !configured())
|
||||
return;
|
||||
if (m_devices.isEmpty()) {
|
||||
scheduleNextPoll();
|
||||
return;
|
||||
}
|
||||
if (m_queue.isEmpty()) {
|
||||
scheduleNextPoll();
|
||||
return;
|
||||
}
|
||||
|
||||
const int index = m_queue.takeFirst();
|
||||
if (!validIndex(index)) {
|
||||
pumpQueue();
|
||||
return;
|
||||
}
|
||||
|
||||
m_stateInFlight = true;
|
||||
setBusy(true);
|
||||
get(QStringLiteral("devices/%1/state").arg(m_devices.at(index).id), KindState, index);
|
||||
}
|
||||
|
||||
void ThinQClient::refresh()
|
||||
{
|
||||
if (!configured())
|
||||
return;
|
||||
get(QStringLiteral("devices/%1/state").arg(m_settings->deviceId()), KindState);
|
||||
if (m_devices.isEmpty()) {
|
||||
discover();
|
||||
return;
|
||||
}
|
||||
queueAllStates();
|
||||
pumpQueue();
|
||||
}
|
||||
|
||||
void ThinQClient::discover()
|
||||
{
|
||||
if (m_settings->token().isEmpty()) {
|
||||
if (!configured()) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Enter the access token first"), true);
|
||||
return;
|
||||
}
|
||||
get(QStringLiteral("devices"), KindDevices);
|
||||
}
|
||||
|
||||
void ThinQClient::chooseDevice(int index)
|
||||
void ThinQClient::runPrimaryAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= m_deviceIds.size())
|
||||
return;
|
||||
const QString id = m_deviceIds.at(index);
|
||||
const QString label = m_deviceLabels.at(index);
|
||||
m_selected = index;
|
||||
m_settings->setDeviceAlias(label);
|
||||
m_settings->setDeviceId(id);
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Machine selected"), false);
|
||||
emit devicesChanged();
|
||||
}
|
||||
|
||||
void ThinQClient::runPrimary()
|
||||
{
|
||||
if (!m_state.valid) {
|
||||
if (!hasStateAt(index)) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "No data from the machine yet"), true);
|
||||
return;
|
||||
}
|
||||
post(QStringLiteral("devices/%1/control").arg(m_settings->deviceId()),
|
||||
ThinQJson::operationPayload(ThinQJson::primaryAction(m_state)));
|
||||
post(QStringLiteral("devices/%1/control").arg(m_devices.at(index).id),
|
||||
ThinQJson::operationPayload(ThinQJson::primaryAction(m_devices.at(index).state)), index);
|
||||
}
|
||||
|
||||
void ThinQClient::powerOff()
|
||||
void ThinQClient::powerOffAt(int index)
|
||||
{
|
||||
post(QStringLiteral("devices/%1/control").arg(m_settings->deviceId()),
|
||||
ThinQJson::operationPayload(QStringLiteral("POWER_OFF")));
|
||||
if (!validIndex(index))
|
||||
return;
|
||||
post(QStringLiteral("devices/%1/control").arg(m_devices.at(index).id),
|
||||
ThinQJson::operationPayload(QStringLiteral("POWER_OFF")), index);
|
||||
}
|
||||
|
||||
void ThinQClient::wakeUp()
|
||||
void ThinQClient::wakeUpAt(int index)
|
||||
{
|
||||
post(QStringLiteral("devices/%1/control").arg(m_settings->deviceId()),
|
||||
ThinQJson::operationPayload(QStringLiteral("WAKE_UP")));
|
||||
if (!validIndex(index))
|
||||
return;
|
||||
post(QStringLiteral("devices/%1/control").arg(m_devices.at(index).id),
|
||||
ThinQJson::operationPayload(QStringLiteral("WAKE_UP")), index);
|
||||
}
|
||||
|
||||
void ThinQClient::sendDelay()
|
||||
void ThinQClient::sendDelayAt(int index)
|
||||
{
|
||||
post(QStringLiteral("devices/%1/control").arg(m_settings->deviceId()),
|
||||
ThinQJson::delayPayload(m_delayHours));
|
||||
if (!validIndex(index))
|
||||
return;
|
||||
post(QStringLiteral("devices/%1/control").arg(m_devices.at(index).id),
|
||||
ThinQJson::delayPayload(m_delayHours), index);
|
||||
}
|
||||
|
||||
void ThinQClient::prepare(QNetworkRequest &request, bool command) const
|
||||
@@ -237,13 +342,13 @@ void ThinQClient::prepare(QNetworkRequest &request, bool command) const
|
||||
request.setRawHeader("x-conditional-control", "true");
|
||||
}
|
||||
|
||||
void ThinQClient::get(const QString &endpoint, RequestKind kind)
|
||||
void ThinQClient::get(const QString &endpoint, RequestKind kind, int deviceIndex)
|
||||
{
|
||||
const QUrl url(ThinQJson::apiBase(m_settings->country()) + QLatin1Char('/') + endpoint);
|
||||
QNetworkRequest request(url);
|
||||
prepare(request, /*command=*/false);
|
||||
|
||||
if (kind == KindState || kind == KindCommand)
|
||||
if (kind == KindDevices)
|
||||
setBusy(true);
|
||||
|
||||
QNetworkReply *reply = m_nam.get(request);
|
||||
@@ -255,18 +360,23 @@ void ThinQClient::get(const QString &endpoint, RequestKind kind)
|
||||
connect(guard, &QTimer::timeout, reply, &QNetworkReply::abort);
|
||||
guard->start(kRequestTimeoutMs);
|
||||
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply, kind]() {
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply, kind, deviceIndex]() {
|
||||
reply->deleteLater();
|
||||
const QByteArray body = reply->readAll();
|
||||
const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
|
||||
if (kind == KindState)
|
||||
setBusy(false);
|
||||
m_stateInFlight = false;
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError || status < 200 || status >= 300) {
|
||||
const QString netErr = reply->error() == QNetworkReply::NoError
|
||||
? QString() : reply->errorString();
|
||||
handleFailure(status, body, netErr, kind == KindCommand);
|
||||
setBusy(false);
|
||||
handleFailure(status, body, netErr, kind == KindCommand, deviceIndex);
|
||||
if (kind == KindState)
|
||||
pumpQueue(); // una macchina muta non blocca le altre
|
||||
else
|
||||
scheduleNextPoll();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -276,8 +386,8 @@ void ThinQClient::get(const QString &endpoint, RequestKind kind)
|
||||
: QJsonValue(doc.isArray() ? QJsonValue(doc.array()) : QJsonValue());
|
||||
|
||||
if (kind == KindDevices) {
|
||||
m_deviceLabels.clear();
|
||||
m_deviceIds.clear();
|
||||
setBusy(false);
|
||||
m_devices.clear();
|
||||
const QJsonArray arr = response.toArray();
|
||||
for (int i = 0; i < arr.size(); ++i) {
|
||||
const QJsonObject dev = arr.at(i).toObject();
|
||||
@@ -287,43 +397,61 @@ void ThinQClient::get(const QString &endpoint, RequestKind kind)
|
||||
&& !type.startsWith(QLatin1String("DEVICE_WASHCOMBO"))
|
||||
&& !type.startsWith(QLatin1String("DEVICE_WASHTOWER"))
|
||||
&& !type.startsWith(QLatin1String("DEVICE_DRYER"))) {
|
||||
continue; // l'app controlla lavatrici e lavasciughe
|
||||
continue; // questa app comanda lavatrici e lavasciughe
|
||||
}
|
||||
QString label = info.value(QStringLiteral("alias")).toString();
|
||||
if (label.isEmpty())
|
||||
label = info.value(QStringLiteral("modelName")).toString();
|
||||
m_deviceLabels << label;
|
||||
m_deviceIds << dev.value(QStringLiteral("deviceId")).toString();
|
||||
DeviceEntry entry;
|
||||
entry.id = dev.value(QStringLiteral("deviceId")).toString();
|
||||
entry.label = info.value(QStringLiteral("alias")).toString();
|
||||
if (entry.label.isEmpty())
|
||||
entry.label = info.value(QStringLiteral("modelName")).toString();
|
||||
m_devices << entry;
|
||||
}
|
||||
m_selected = m_deviceIds.indexOf(m_settings->deviceId());
|
||||
emit devicesChanged();
|
||||
if (m_deviceLabels.isEmpty())
|
||||
if (m_devices.isEmpty()) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "No washing machine found on this account"), true);
|
||||
else
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Machines found: %1").arg(m_deviceLabels.size()), false);
|
||||
scheduleNextPoll();
|
||||
} else {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Machines found: %1").arg(m_devices.size()), false);
|
||||
queueAllStates();
|
||||
pumpQueue();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (kind == KindState) {
|
||||
setBusy(false);
|
||||
if (!validIndex(deviceIndex)) {
|
||||
pumpQueue();
|
||||
return;
|
||||
}
|
||||
const bool hadState = m_devices.at(deviceIndex).hasState;
|
||||
const int previousLevel = hadState
|
||||
? ThinQJson::statusLevel(m_devices.at(deviceIndex).state) : -1;
|
||||
const QByteArray payload = QJsonDocument(response.toArray()).toJson(QJsonDocument::Compact);
|
||||
applyState(ThinQJson::parseState(payload));
|
||||
applyState(deviceIndex, hadState, previousLevel, ThinQJson::parseState(payload));
|
||||
pumpQueue();
|
||||
return;
|
||||
}
|
||||
|
||||
// kind == KindCommand
|
||||
m_pendingCommand = false;
|
||||
setBusy(false);
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Command sent"), false);
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
||||
void ThinQClient::post(const QString &endpoint, const QString &payload)
|
||||
void ThinQClient::post(const QString &endpoint, const QString &payload, int deviceIndex)
|
||||
{
|
||||
if (!configured()) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Set the access token and the machine first"), true);
|
||||
setNotice(QCoreApplication::translate("ThinQ", "The access token is missing"), true);
|
||||
return;
|
||||
}
|
||||
if (!m_state.valid || !m_state.remoteEnabled) {
|
||||
if (!validIndex(deviceIndex)) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "No machine to command"), true);
|
||||
return;
|
||||
}
|
||||
const DeviceEntry &entry = m_devices.at(deviceIndex);
|
||||
if (!entry.hasState || !entry.state.remoteEnabled) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Remote start is off on the machine: switch it on from its panel"), true);
|
||||
return;
|
||||
}
|
||||
@@ -332,7 +460,6 @@ void ThinQClient::post(const QString &endpoint, const QString &payload)
|
||||
QNetworkRequest request(url);
|
||||
prepare(request, /*command=*/true);
|
||||
|
||||
m_pendingCommand = true;
|
||||
setBusy(true);
|
||||
|
||||
QNetworkReply *reply = m_nam.post(request, payload.toUtf8());
|
||||
@@ -341,7 +468,7 @@ void ThinQClient::post(const QString &endpoint, const QString &payload)
|
||||
connect(guard, &QTimer::timeout, reply, &QNetworkReply::abort);
|
||||
guard->start(kRequestTimeoutMs);
|
||||
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply]() {
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply, deviceIndex]() {
|
||||
reply->deleteLater();
|
||||
const QByteArray body = reply->readAll();
|
||||
const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
@@ -350,7 +477,7 @@ void ThinQClient::post(const QString &endpoint, const QString &payload)
|
||||
if (reply->error() != QNetworkReply::NoError || status < 200 || status >= 300) {
|
||||
const QString netErr = reply->error() == QNetworkReply::NoError
|
||||
? QString() : reply->errorString();
|
||||
handleFailure(status, body, netErr, true);
|
||||
handleFailure(status, body, netErr, true, deviceIndex);
|
||||
return;
|
||||
}
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Command sent"), false);
|
||||
@@ -358,20 +485,63 @@ void ThinQClient::post(const QString &endpoint, const QString &payload)
|
||||
});
|
||||
}
|
||||
|
||||
void ThinQClient::applyState(const WasherState &state)
|
||||
void ThinQClient::applyState(int deviceIndex, bool hadState, int previousLevel,
|
||||
const WasherState &state)
|
||||
{
|
||||
m_state = state;
|
||||
m_stale = false;
|
||||
m_updated = QCoreApplication::translate("ThinQ", "Updated at %1").arg(
|
||||
if (!validIndex(deviceIndex))
|
||||
return;
|
||||
|
||||
DeviceEntry &entry = m_devices[deviceIndex];
|
||||
entry.state = state;
|
||||
entry.hasState = state.valid;
|
||||
entry.offline = false;
|
||||
entry.stale = false;
|
||||
entry.updated = QCoreApplication::translate("ThinQ", "Updated at %1").arg(
|
||||
QLocale().toString(QTime::currentTime(), QLocale::ShortFormat));
|
||||
|
||||
if (m_pollInterval != kPollFastMs)
|
||||
m_pollInterval = kPollFastMs;
|
||||
|
||||
emit stateChanged();
|
||||
scheduleNextPoll();
|
||||
noteFinished(deviceIndex, hadState, previousLevel);
|
||||
}
|
||||
|
||||
void ThinQClient::noteFinished(int deviceIndex, bool hadState, int previousLevel)
|
||||
{
|
||||
if (!validIndex(deviceIndex))
|
||||
return;
|
||||
|
||||
const DeviceEntry &entry = m_devices.at(deviceIndex);
|
||||
const int level = ThinQJson::statusLevel(entry.state);
|
||||
const int saved = m_settings->notifiedCycleFor(entry.id);
|
||||
|
||||
if (level == 3) {
|
||||
// Appena finito sotto i nostri occhi, oppure finito mentre l'app era
|
||||
// chiusa (il numero di ciclo e' avanzato rispetto all'ultimo avvisato).
|
||||
const bool justEnded = hadState && (previousLevel == 1 || previousLevel == 2);
|
||||
const bool missedWhileClosed = saved > 0 && entry.state.cycleCount > saved;
|
||||
|
||||
if (justEnded || missedWhileClosed) {
|
||||
m_settings->setNotifiedCycleFor(entry.id, entry.state.cycleCount);
|
||||
emit cycleFinished(entry.label, entry.state.cycleCount);
|
||||
} else if (saved == 0) {
|
||||
// Prima volta che vediamo questa macchina: si annota il ciclo senza
|
||||
// avvisare, altrimenti al primo avvio scatterebbe un avviso per un
|
||||
// lavaggio finito giorni fa.
|
||||
m_settings->setNotifiedCycleFor(entry.id, entry.state.cycleCount);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Ciclo in corso: si annota il numero, cosi' l'avviso scattera' solo se il
|
||||
// ciclo finisce davvero.
|
||||
if (saved == 0 && entry.state.cycleCount > 0)
|
||||
m_settings->setNotifiedCycleFor(entry.id, entry.state.cycleCount);
|
||||
}
|
||||
|
||||
void ThinQClient::handleFailure(int httpStatus, const QByteArray &body,
|
||||
const QString &networkError, bool commandRequest)
|
||||
const QString &networkError, bool commandRequest,
|
||||
int deviceIndex)
|
||||
{
|
||||
QString code;
|
||||
QString message;
|
||||
@@ -385,13 +555,28 @@ void ThinQClient::handleFailure(int httpStatus, const QByteArray &body,
|
||||
qDebug() << "[thinq] errore LG" << httpStatus << code << message
|
||||
<< (networkError.isEmpty() ? QString() : networkError);
|
||||
|
||||
// Macchina spenta o senza rete: si annota SULLA macchina, non sulla barra
|
||||
// dei messaggi, altrimenti ogni giro di aggiornamento ripeterebbe lo
|
||||
// stesso avviso.
|
||||
if (!commandRequest && validIndex(deviceIndex)
|
||||
&& (code == QLatin1String("1222") || code == QLatin1String("1223")
|
||||
|| code == QLatin1String("1231") || code == QLatin1String("1209"))) {
|
||||
DeviceEntry &entry = m_devices[deviceIndex];
|
||||
entry.offline = true;
|
||||
entry.hasState = false;
|
||||
entry.updated.clear();
|
||||
entry.stale = false;
|
||||
emit stateChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
if (code == QLatin1String("1103") || code == QLatin1String("1218")
|
||||
|| code == QLatin1String("1302")) {
|
||||
|| code == QLatin1String("1302") || httpStatus == 401) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "The access token is no longer valid: enter a new one in Settings"), true);
|
||||
} else if (code == QLatin1String("1306")) {
|
||||
m_pollInterval = kPollSlowMs;
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Too many requests to LG: slowing down"), true);
|
||||
} else if (code == QLatin1String("1222")) {
|
||||
} else if (code == QLatin1String("1222") || code == QLatin1String("1223")) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "The washing machine is not connected (switched off or offline)"), true);
|
||||
} else if (code == QLatin1String("2301")) {
|
||||
setNotice(QCoreApplication::translate("ThinQ", "Remote start is off on the machine: switch it on from its panel"), true);
|
||||
@@ -405,13 +590,10 @@ void ThinQClient::handleFailure(int httpStatus, const QByteArray &body,
|
||||
setNotice(QCoreApplication::translate("ThinQ", "The LG cloud refused the request (HTTP %1)").arg(httpStatus), true);
|
||||
}
|
||||
|
||||
if (commandRequest)
|
||||
m_pendingCommand = false;
|
||||
|
||||
// I dati a schermo non sono piu' freschi: dirlo, invece di mostrare i
|
||||
// numeri vecchi come se fossero attuali.
|
||||
if (m_state.valid) {
|
||||
m_stale = true;
|
||||
if (validIndex(deviceIndex) && m_devices.at(deviceIndex).hasState) {
|
||||
m_devices[deviceIndex].stale = true;
|
||||
emit stateChanged();
|
||||
}
|
||||
scheduleNextPoll();
|
||||
|
||||
+58
-49
@@ -1,6 +1,7 @@
|
||||
#ifndef THINQCLIENT_H
|
||||
#define THINQCLIENT_H
|
||||
|
||||
#include <QList>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
@@ -11,66 +12,62 @@
|
||||
class Settings;
|
||||
class QNetworkReply;
|
||||
|
||||
// Parla direttamente con il cloud LG ThinQ Connect: nessun ponte, nessun
|
||||
// server di mezzo. Il token di accesso sta nelle impostazioni dell'app.
|
||||
// Tutte le macchine dell'account, ognuna col suo stato. Una sola classe parla
|
||||
// col cloud LG: nessun ponte, nessun server di mezzo, nessun servizio.
|
||||
//
|
||||
// Il QML legge per indice (labelAt/phaseTextAt/...): l'elenco cambia raramente e
|
||||
// cosi' le stesse funzioni servono la schermata principale e la copertina.
|
||||
class ThinQClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool configured READ configured NOTIFY infoChanged)
|
||||
Q_PROPERTY(QString alias READ alias NOTIFY infoChanged)
|
||||
Q_PROPERTY(bool hasState READ hasState NOTIFY stateChanged)
|
||||
Q_PROPERTY(QString phaseText READ phaseText NOTIFY stateChanged)
|
||||
Q_PROPERTY(int statusLevel READ statusLevel NOTIFY stateChanged)
|
||||
Q_PROPERTY(QString remainText READ remainText NOTIFY stateChanged)
|
||||
Q_PROPERTY(QString totalText READ totalText NOTIFY stateChanged)
|
||||
Q_PROPERTY(int cycleCount READ cycleCount NOTIFY stateChanged)
|
||||
Q_PROPERTY(bool remoteEnabled READ remoteEnabled NOTIFY stateChanged)
|
||||
Q_PROPERTY(QString primaryLabel READ primaryLabel NOTIFY stateChanged)
|
||||
Q_PROPERTY(bool canCommand READ canCommand NOTIFY stateChanged)
|
||||
Q_PROPERTY(QString updatedText READ updatedText NOTIFY stateChanged)
|
||||
Q_PROPERTY(bool stale READ stale NOTIFY stateChanged)
|
||||
Q_PROPERTY(int deviceCount READ deviceCount NOTIFY devicesChanged)
|
||||
Q_PROPERTY(int activeIndex READ activeIndex NOTIFY stateChanged)
|
||||
Q_PROPERTY(bool busy READ busy NOTIFY busyChanged)
|
||||
Q_PROPERTY(bool polling READ polling NOTIFY pollingChanged)
|
||||
Q_PROPERTY(QString notice READ notice NOTIFY noticeChanged)
|
||||
Q_PROPERTY(bool noticeIsError READ noticeIsError NOTIFY noticeChanged)
|
||||
Q_PROPERTY(QStringList deviceLabels READ deviceLabels NOTIFY devicesChanged)
|
||||
Q_PROPERTY(int deviceCount READ deviceCount NOTIFY devicesChanged)
|
||||
Q_PROPERTY(int selectedDevice READ selectedDevice NOTIFY devicesChanged)
|
||||
Q_PROPERTY(int delayHours READ delayHours WRITE setDelayHours NOTIFY delayHoursChanged)
|
||||
|
||||
public:
|
||||
explicit ThinQClient(Settings *settings, QObject *parent = nullptr);
|
||||
|
||||
// La chiave di accesso c'e': la schermata principale mostra i dispositivi
|
||||
// invece di chiedere le credenziali.
|
||||
bool configured() const;
|
||||
QString alias() const;
|
||||
bool hasState() const { return m_state.valid; }
|
||||
QString phaseText() const;
|
||||
int statusLevel() const;
|
||||
QString remainText() const;
|
||||
QString totalText() const;
|
||||
int cycleCount() const { return m_state.cycleCount; }
|
||||
bool remoteEnabled() const { return m_state.remoteEnabled; }
|
||||
QString primaryLabel() const;
|
||||
bool canCommand() const;
|
||||
QString updatedText() const;
|
||||
bool stale() const { return m_stale; }
|
||||
int deviceCount() const { return m_devices.size(); }
|
||||
// La macchina che sta lavorando (per la copertina), altrimenti la prima.
|
||||
int activeIndex() const;
|
||||
bool busy() const { return m_busy; }
|
||||
bool polling() const { return m_pollTimer.isActive(); }
|
||||
QString notice() const { return m_notice; }
|
||||
bool noticeIsError() const { return m_noticeIsError; }
|
||||
QStringList deviceLabels() const { return m_deviceLabels; }
|
||||
int deviceCount() const { return m_deviceLabels.size(); }
|
||||
int selectedDevice() const { return m_selected; }
|
||||
int delayHours() const { return m_delayHours; }
|
||||
void setDelayHours(int hours);
|
||||
|
||||
Q_INVOKABLE QString labelAt(int index) const;
|
||||
Q_INVOKABLE bool hasStateAt(int index) const;
|
||||
Q_INVOKABLE bool offlineAt(int index) const;
|
||||
Q_INVOKABLE bool staleAt(int index) const;
|
||||
Q_INVOKABLE QString phaseTextAt(int index) const;
|
||||
Q_INVOKABLE int statusLevelAt(int index) const;
|
||||
Q_INVOKABLE QString remainTextAt(int index) const;
|
||||
Q_INVOKABLE QString totalTextAt(int index) const;
|
||||
Q_INVOKABLE QString totalLineAt(int index) const;
|
||||
Q_INVOKABLE int cycleCountAt(int index) const;
|
||||
Q_INVOKABLE bool remoteEnabledAt(int index) const;
|
||||
Q_INVOKABLE QString primaryLabelAt(int index) const;
|
||||
Q_INVOKABLE bool canCommandAt(int index) const;
|
||||
Q_INVOKABLE QString updatedTextAt(int index) const;
|
||||
Q_INVOKABLE QString deviceIdAt(int index) const;
|
||||
Q_INVOKABLE bool validIndex(int index) const;
|
||||
|
||||
Q_INVOKABLE void refresh();
|
||||
Q_INVOKABLE void discover();
|
||||
Q_INVOKABLE void chooseDevice(int index);
|
||||
Q_INVOKABLE void runPrimary();
|
||||
Q_INVOKABLE void powerOff();
|
||||
Q_INVOKABLE void wakeUp();
|
||||
Q_INVOKABLE void sendDelay();
|
||||
Q_INVOKABLE void runPrimaryAt(int index);
|
||||
Q_INVOKABLE void powerOffAt(int index);
|
||||
Q_INVOKABLE void wakeUpAt(int index);
|
||||
Q_INVOKABLE void sendDelayAt(int index);
|
||||
Q_INVOKABLE void startPolling();
|
||||
Q_INVOKABLE void stopPolling();
|
||||
Q_INVOKABLE void clearNotice();
|
||||
@@ -85,35 +82,47 @@ signals:
|
||||
void noticeChanged();
|
||||
void devicesChanged();
|
||||
void delayHoursChanged();
|
||||
// Fine di un lavaggio: la macchina e' arrivata a END. Il QML lo trasforma in
|
||||
// una notifica di sistema.
|
||||
void cycleFinished(const QString &label, int cycleCount);
|
||||
|
||||
private:
|
||||
enum RequestKind { KindDevices, KindState, KindCommand };
|
||||
|
||||
struct DeviceEntry {
|
||||
QString id;
|
||||
QString label;
|
||||
WasherState state;
|
||||
bool hasState = false;
|
||||
bool offline = false;
|
||||
bool stale = false;
|
||||
QString updated;
|
||||
};
|
||||
|
||||
void prepare(QNetworkRequest &request, bool command) const;
|
||||
void get(const QString &endpoint, RequestKind kind);
|
||||
void post(const QString &endpoint, const QString &payload);
|
||||
void applyState(const WasherState &state);
|
||||
void get(const QString &endpoint, RequestKind kind, int deviceIndex = -1);
|
||||
void post(const QString &endpoint, const QString &payload, int deviceIndex);
|
||||
void applyState(int deviceIndex, bool hadState, int previousLevel, const WasherState &state);
|
||||
void handleFailure(int httpStatus, const QByteArray &body, const QString &networkError,
|
||||
bool commandRequest);
|
||||
bool commandRequest, int deviceIndex);
|
||||
void setNotice(const QString &text, bool isError);
|
||||
void setBusy(bool busy);
|
||||
void scheduleNextPoll();
|
||||
void queueAllStates();
|
||||
void pumpQueue();
|
||||
void noteFinished(int deviceIndex, bool hadState, int previousLevel);
|
||||
|
||||
Settings *m_settings;
|
||||
QNetworkAccessManager m_nam;
|
||||
QTimer m_pollTimer;
|
||||
WasherState m_state;
|
||||
QStringList m_deviceLabels;
|
||||
QStringList m_deviceIds;
|
||||
int m_selected = -1;
|
||||
int m_pollInterval = 45000;
|
||||
QList<DeviceEntry> m_devices;
|
||||
QList<int> m_queue; // macchine da leggere, una richiesta per volta
|
||||
bool m_stateInFlight = false;
|
||||
int m_pollInterval = 45000; // a schermata aperta
|
||||
int m_delayHours = 4;
|
||||
bool m_busy = false;
|
||||
bool m_stale = false;
|
||||
bool m_pendingCommand = false;
|
||||
QString m_notice;
|
||||
bool m_noticeIsError = false;
|
||||
QString m_updated;
|
||||
};
|
||||
|
||||
#endif // THINQCLIENT_H
|
||||
@@ -162,6 +162,26 @@ static void testItalian(const QString &catalog)
|
||||
checkEq(ThinQJson::primaryActionLabel(s), "Avvia", "tasto tradotto");
|
||||
s.phase = QStringLiteral("PAUSE");
|
||||
checkEq(ThinQJson::primaryActionLabel(s), "Riprendi", "riprendi tradotto");
|
||||
|
||||
// Le scritte delle schermate nuove (primo avvio, elenco, avviso): se una
|
||||
// sfugge al catalogo, la si vede qui invece che sul telefono.
|
||||
// ATTENZIONE al contesto: nelle pagine QML il contesto e' il NOME DEL FILE
|
||||
// (MainPage, SettingsPage), non "ThinQ" come nel codice C++.
|
||||
checkEq(QCoreApplication::translate("MainPage", "My machines"), "Le mie macchine",
|
||||
"titolo tradotto");
|
||||
checkEq(QCoreApplication::translate("MainPage", "First setup"), "Primo avvio",
|
||||
"primo avvio tradotto");
|
||||
checkEq(QCoreApplication::translate("MainPage", "Connect"), "Collega", "tasto collega tradotto");
|
||||
checkEq(QCoreApplication::translate("MainPage", "Not connected"), "Non collegata",
|
||||
"macchina non collegata tradotta");
|
||||
checkEq(QCoreApplication::translate("SettingsPage", "Machines"), "Macchine",
|
||||
"sezione macchine tradotta");
|
||||
checkEq(QCoreApplication::translate("MainPage", "%1 found").arg(2), "2 trovate",
|
||||
"conteggio tradotto");
|
||||
checkEq(QCoreApplication::translate("harbour-thinq", "Washing finished"), "Lavaggio finito",
|
||||
"avviso di fine lavaggio tradotto");
|
||||
checkEq(QCoreApplication::translate("ThinQ", "No machine to command"),
|
||||
"Nessuna macchina da comandare", "comando senza macchina tradotto");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
+361
-230
@@ -1,298 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="it_IT">
|
||||
<context>
|
||||
<name>ThinQ</name>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="56"/>
|
||||
<source>Washing machine</source>
|
||||
<translation>Lavatrice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="62"/>
|
||||
<source>No data</source>
|
||||
<translation>Nessun dato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="84"/>
|
||||
<location filename="../src/thinqjson.cpp" line="151"/>
|
||||
<source>Start</source>
|
||||
<translation>Avvia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="175"/>
|
||||
<source>Enter the access token first</source>
|
||||
<translation>Inserisci prima la chiave di accesso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="190"/>
|
||||
<source>Machine selected</source>
|
||||
<translation>Macchina scelta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="197"/>
|
||||
<source>No data from the machine yet</source>
|
||||
<translation>Ancora nessun dato dalla macchina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="289"/>
|
||||
<source>No washing machine found on this account</source>
|
||||
<translation>Nessuna lavatrice trovata su questo account</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="291"/>
|
||||
<source>Machines found: %1</source>
|
||||
<translation>Macchine trovate: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="303"/>
|
||||
<location filename="../src/thinqclient.cpp" line="351"/>
|
||||
<source>Command sent</source>
|
||||
<translation>Comando inviato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="311"/>
|
||||
<source>Set the access token and the machine first</source>
|
||||
<translation>Imposta prima la chiave di accesso e la macchina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="315"/>
|
||||
<location filename="../src/thinqclient.cpp" line="392"/>
|
||||
<source>Remote start is off on the machine: switch it on from its panel</source>
|
||||
<translation>L'avvio a distanza e' spento sulla macchina: accendilo dal pannello</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="360"/>
|
||||
<source>Updated at %1</source>
|
||||
<translation>Aggiornato alle %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="385"/>
|
||||
<source>The access token is no longer valid: enter a new one in Settings</source>
|
||||
<translation>La chiave di accesso non e' piu' valida: inseriscine una nuova nelle Impostazioni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="388"/>
|
||||
<source>Too many requests to LG: slowing down</source>
|
||||
<translation>Troppe richieste a LG: rallento gli aggiornamenti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="390"/>
|
||||
<source>The washing machine is not connected (switched off or offline)</source>
|
||||
<translation>La lavatrice non e' collegata (spenta o senza rete)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="394"/>
|
||||
<source>The machine does not accept this command</source>
|
||||
<translation>La macchina non accetta questo comando</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="396"/>
|
||||
<source>LG error %1: %2</source>
|
||||
<translation>Errore LG %1: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="398"/>
|
||||
<source>No answer from the LG cloud: %1</source>
|
||||
<translation>Nessuna risposta dal cloud LG: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="400"/>
|
||||
<source>The LG cloud refused the request (HTTP %1)</source>
|
||||
<translation>Il cloud LG ha rifiutato la richiesta (HTTP %1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="112"/>
|
||||
<source>Washing</source>
|
||||
<translation>In lavaggio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="113"/>
|
||||
<source>Rinsing</source>
|
||||
<translation>In risciacquo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="114"/>
|
||||
<source>Spinning</source>
|
||||
<translation>In centrifuga</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="115"/>
|
||||
<source>Drying</source>
|
||||
<translation>In asciugatura</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="116"/>
|
||||
<source>Cooling down</source>
|
||||
<translation>Raffreddamento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="117"/>
|
||||
<source>Refreshing</source>
|
||||
<translation>Rinfrescando</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="118"/>
|
||||
<source>Steam softening</source>
|
||||
<translation>Ammorbidente a vapore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="119"/>
|
||||
<source>Detecting the load</source>
|
||||
<translation>Rilevamento del carico</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="120"/>
|
||||
<source>Delayed start</source>
|
||||
<translation>Partenza ritardata</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="121"/>
|
||||
<source>Rinse hold</source>
|
||||
<translation>Ammollo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="122"/>
|
||||
<source>Paused</source>
|
||||
<translation>In pausa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="123"/>
|
||||
<source>Finished</source>
|
||||
<translation>Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="124"/>
|
||||
<source>Ready</source>
|
||||
<translation>Pronta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="125"/>
|
||||
<source>Off</source>
|
||||
<translation>Spenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="126"/>
|
||||
<source>Standby</source>
|
||||
<translation>In attesa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="127"/>
|
||||
<source>Error</source>
|
||||
<translation>Errore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="146"/>
|
||||
<source>Stop</source>
|
||||
<translation>Ferma</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="148"/>
|
||||
<source>Switch off</source>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="150"/>
|
||||
<source>Resume</source>
|
||||
<translation>Riprendi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverPage</name>
|
||||
<message>
|
||||
<location filename="../qml/cover/CoverPage.qml" line="25"/>
|
||||
<location filename="../qml/cover/CoverPage.qml" line="31"/>
|
||||
<source>No data</source>
|
||||
<translation>Nessun dato</translation>
|
||||
<translation>Nessun dato</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DelayDialog</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="22"/>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="26"/>
|
||||
<source>Delayed stop</source>
|
||||
<translation>Stop ritardato</translation>
|
||||
<translation>Stop ritardato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="23"/>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="27"/>
|
||||
<source>Set</source>
|
||||
<translation>Imposta</translation>
|
||||
<translation>Imposta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="32"/>
|
||||
<location filename="../qml/pages/DelayDialog.qml" line="36"/>
|
||||
<source>The machine will stop on its own after the chosen time, then resume its programme.</source>
|
||||
<translation>La macchina si ferma da sola allo scadere del tempo scelto, poi riprende il programma.</translation>
|
||||
<translation>La macchina si ferma da sola allo scadere del tempo scelto, poi riprende il programma.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainPage</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="25"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="29"/>
|
||||
<source>Refresh</source>
|
||||
<translation>Aggiorna</translation>
|
||||
<translation>Aggiorna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="29"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="45"/>
|
||||
<source>My machines</source>
|
||||
<translation>Le mie macchine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="47"/>
|
||||
<source>Updating…</source>
|
||||
<translation>Aggiornamento…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="47"/>
|
||||
<source>%1 found</source>
|
||||
<translation>%1 trovate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="48"/>
|
||||
<source>First setup</source>
|
||||
<translation>Primo avvio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="65"/>
|
||||
<source>The access token comes from connect-pat.lgthinq.com and stays on this phone only. If LG starts refusing it, paste a new one here.</source>
|
||||
<translation>La chiave di accesso si crea su connect-pat.lgthinq.com e resta solo su questo telefono. Se LG non la accetta piu', incollane una nuova qui.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="72"/>
|
||||
<source>Access token</source>
|
||||
<translation>Chiave di accesso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="73"/>
|
||||
<source>paste the token</source>
|
||||
<translation>incolla la chiave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="81"/>
|
||||
<source>Country code</source>
|
||||
<translation>Paese</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="92"/>
|
||||
<source>Connect</source>
|
||||
<translation>Collega</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="155"/>
|
||||
<source>Not connected</source>
|
||||
<translation>Non collegata</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="204"/>
|
||||
<source>The washing machine is not connected (switched off or offline)</source>
|
||||
<translation>La lavatrice non e' collegata (spenta o senza rete)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="222"/>
|
||||
<source>Delayed stop…</source>
|
||||
<translation>Stop ritardato…</translation>
|
||||
<translation>Stop ritardato…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="33"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="228"/>
|
||||
<source>Switch off</source>
|
||||
<translation>Spegni</translation>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="38"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="233"/>
|
||||
<source>Wake the display up</source>
|
||||
<translation>Risveglia il display</translation>
|
||||
<translation>Risveglia il display</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="43"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="75"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="255"/>
|
||||
<source>No machine found yet. Pull down to search again.</source>
|
||||
<translation>Nessuna macchina trovata. Trascina in basso per cercare di nuovo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="34"/>
|
||||
<source>Settings</source>
|
||||
<translation>Impostazioni</translation>
|
||||
<translation>Impostazioni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="56"/>
|
||||
<source>Not up to date</source>
|
||||
<translation>Non aggiornato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="57"/>
|
||||
<source>Not configured</source>
|
||||
<translation>Da configurare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="69"/>
|
||||
<source>Enter the LG access token in Settings and pick your machine.</source>
|
||||
<translation>Inserisci la chiave di accesso LG nelle Impostazioni e scegli la macchina.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="134"/>
|
||||
<source>of %1</source>
|
||||
<translation>su %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="147"/>
|
||||
<source>Cycle</source>
|
||||
<translation>Ciclo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="152"/>
|
||||
<source>Remote start</source>
|
||||
<translation>Avvio a distanza</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="153"/>
|
||||
<source>on</source>
|
||||
<translation>attivo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="153"/>
|
||||
<source>off</source>
|
||||
<translation>spento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/MainPage.qml" line="166"/>
|
||||
<location filename="../qml/pages/MainPage.qml" line="194"/>
|
||||
<source>To send commands, switch remote start on from the machine panel.</source>
|
||||
<translation>Per inviare comandi, accendi l'avvio a distanza dal pannello della macchina.</translation>
|
||||
</message>
|
||||
@@ -300,71 +164,338 @@
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="19"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="21"/>
|
||||
<source>Settings</source>
|
||||
<translation>Impostazioni</translation>
|
||||
<translation>Impostazioni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="23"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="25"/>
|
||||
<source>LG account</source>
|
||||
<translation>Account LG</translation>
|
||||
<translation>Account LG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="32"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="34"/>
|
||||
<source>The access token comes from connect-pat.lgthinq.com and stays on this phone only. If LG starts refusing it, paste a new one here.</source>
|
||||
<translation>La chiave di accesso si crea su connect-pat.lgthinq.com e resta solo su questo telefono. Se LG non la accetta piu', incollane una nuova qui.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="39"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="41"/>
|
||||
<source>Access token</source>
|
||||
<translation>Chiave di accesso</translation>
|
||||
<translation>Chiave di accesso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="40"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="42"/>
|
||||
<source>paste the token</source>
|
||||
<translation>incolla la chiave</translation>
|
||||
<translation>incolla la chiave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="50"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="52"/>
|
||||
<source>Country code</source>
|
||||
<translation>Paese</translation>
|
||||
<translation>Paese</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="58"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="63"/>
|
||||
<source>Save the token</source>
|
||||
<translation>Salva la chiave</translation>
|
||||
<translation>Salva la chiave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="72"/>
|
||||
<source>Machines</source>
|
||||
<translation>Macchine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="81"/>
|
||||
<source>%1 found</source>
|
||||
<translation>%1 trovate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="67"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="79"/>
|
||||
<source>Machine</source>
|
||||
<translation>Macchina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="72"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="86"/>
|
||||
<source>Find my machines</source>
|
||||
<translation>Trova le macchine</translation>
|
||||
<translation>Trova le macchine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="102"/>
|
||||
<source>Selected: %1</source>
|
||||
<translation>Scelta: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="106"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="112"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="91"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="97"/>
|
||||
<source>Language</source>
|
||||
<translation>Lingua</translation>
|
||||
<translation>Lingua</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="115"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="100"/>
|
||||
<source>System</source>
|
||||
<translation>Sistema</translation>
|
||||
<translation>Sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="131"/>
|
||||
<location filename="../qml/pages/SettingsPage.qml" line="116"/>
|
||||
<source>Version %1</source>
|
||||
<translation>Versione %1</translation>
|
||||
<translation>Versione %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ThinQ</name>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="72"/>
|
||||
<source>Washing machine</source>
|
||||
<translation>Lavatrice</translation>
|
||||
<translation>Lavatrice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="94"/>
|
||||
<source>No data</source>
|
||||
<translation>Nessun dato</translation>
|
||||
<translation>Nessun dato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="124"/>
|
||||
<source>of %1</source>
|
||||
<translation>su %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="144"/>
|
||||
<location filename="../src/thinqjson.cpp" line="162"/>
|
||||
<source>Start</source>
|
||||
<translation>Avvia</translation>
|
||||
<translation>Avvia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="287"/>
|
||||
<source>Enter the access token first</source>
|
||||
<translation>Inserisci prima la chiave di accesso</translation>
|
||||
<translation>Inserisci prima la chiave di accesso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Machine selected</source>
|
||||
<translation>Macchina scelta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="296"/>
|
||||
<source>No data from the machine yet</source>
|
||||
<translation>Ancora nessun dato dalla macchina</translation>
|
||||
<translation>Ancora nessun dato dalla macchina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="411"/>
|
||||
<source>No washing machine found on this account</source>
|
||||
<translation>Nessuna lavatrice trovata su questo account</translation>
|
||||
<translation>Nessuna lavatrice trovata su questo account</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="414"/>
|
||||
<source>Machines found: %1</source>
|
||||
<translation>Macchine trovate: %1</translation>
|
||||
<translation>Macchine trovate: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="438"/>
|
||||
<location filename="../src/thinqclient.cpp" line="483"/>
|
||||
<source>Command sent</source>
|
||||
<translation>Comando inviato</translation>
|
||||
<translation>Comando inviato</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set the access token and the machine first</source>
|
||||
<translation>Imposta prima la chiave di accesso e la macchina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="446"/>
|
||||
<source>The access token is missing</source>
|
||||
<translation>Manca la chiave di accesso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="450"/>
|
||||
<source>No machine to command</source>
|
||||
<translation>Nessuna macchina da comandare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="455"/>
|
||||
<location filename="../src/thinqclient.cpp" line="582"/>
|
||||
<source>Remote start is off on the machine: switch it on from its panel</source>
|
||||
<translation>L'avvio a distanza e' spento sulla macchina: accendilo dal pannello</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="499"/>
|
||||
<source>Updated at %1</source>
|
||||
<translation>Aggiornato alle %1</translation>
|
||||
<translation>Aggiornato alle %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="575"/>
|
||||
<source>The access token is no longer valid: enter a new one in Settings</source>
|
||||
<translation>La chiave di accesso non e' piu' valida: inseriscine una nuova nelle Impostazioni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="578"/>
|
||||
<source>Too many requests to LG: slowing down</source>
|
||||
<translation>Troppe richieste a LG: rallento gli aggiornamenti</translation>
|
||||
<translation>Troppe richieste a LG: rallento gli aggiornamenti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="580"/>
|
||||
<source>The washing machine is not connected (switched off or offline)</source>
|
||||
<translation>La lavatrice non e' collegata (spenta o senza rete)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="584"/>
|
||||
<source>The machine does not accept this command</source>
|
||||
<translation>La macchina non accetta questo comando</translation>
|
||||
<translation>La macchina non accetta questo comando</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="586"/>
|
||||
<source>LG error %1: %2</source>
|
||||
<translation>Errore LG %1: %2</translation>
|
||||
<translation>Errore LG %1: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="588"/>
|
||||
<source>No answer from the LG cloud: %1</source>
|
||||
<translation>Nessuna risposta dal cloud LG: %1</translation>
|
||||
<translation>Nessuna risposta dal cloud LG: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqclient.cpp" line="590"/>
|
||||
<source>The LG cloud refused the request (HTTP %1)</source>
|
||||
<translation>Il cloud LG ha rifiutato la richiesta (HTTP %1)</translation>
|
||||
<translation>Il cloud LG ha rifiutato la richiesta (HTTP %1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="123"/>
|
||||
<source>Washing</source>
|
||||
<translation>In lavaggio</translation>
|
||||
<translation>In lavaggio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="124"/>
|
||||
<source>Rinsing</source>
|
||||
<translation>In risciacquo</translation>
|
||||
<translation>In risciacquo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="125"/>
|
||||
<source>Spinning</source>
|
||||
<translation>In centrifuga</translation>
|
||||
<translation>In centrifuga</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="126"/>
|
||||
<source>Drying</source>
|
||||
<translation>In asciugatura</translation>
|
||||
<translation>In asciugatura</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="127"/>
|
||||
<source>Cooling down</source>
|
||||
<translation>Raffreddamento</translation>
|
||||
<translation>Raffreddamento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="128"/>
|
||||
<source>Refreshing</source>
|
||||
<translation>Rinfrescando</translation>
|
||||
<translation>Rinfrescando</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="129"/>
|
||||
<source>Steam softening</source>
|
||||
<translation>Ammorbidente a vapore</translation>
|
||||
<translation>Ammorbidente a vapore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="130"/>
|
||||
<source>Detecting the load</source>
|
||||
<translation>Rilevamento del carico</translation>
|
||||
<translation>Rilevamento del carico</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="131"/>
|
||||
<source>Delayed start</source>
|
||||
<translation>Partenza ritardata</translation>
|
||||
<translation>Partenza ritardata</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="132"/>
|
||||
<source>Rinse hold</source>
|
||||
<translation>Ammollo</translation>
|
||||
<translation>Ammollo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="133"/>
|
||||
<source>Paused</source>
|
||||
<translation>In pausa</translation>
|
||||
<translation>In pausa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="134"/>
|
||||
<source>Finished</source>
|
||||
<translation>Fine</translation>
|
||||
<translation>Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="135"/>
|
||||
<source>Ready</source>
|
||||
<translation>Pronta</translation>
|
||||
<translation>Pronta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="136"/>
|
||||
<source>Off</source>
|
||||
<translation>Spenta</translation>
|
||||
<translation>Spenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="137"/>
|
||||
<source>Standby</source>
|
||||
<translation>In attesa</translation>
|
||||
<translation>In attesa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="138"/>
|
||||
<source>Error</source>
|
||||
<translation>Errore</translation>
|
||||
<translation>Errore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="157"/>
|
||||
<source>Stop</source>
|
||||
<translation>Ferma</translation>
|
||||
<translation>Ferma</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="159"/>
|
||||
<source>Switch off</source>
|
||||
<translation>Spegni</translation>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/thinqjson.cpp" line="161"/>
|
||||
<source>Resume</source>
|
||||
<translation>Riprendi</translation>
|
||||
<translation>Riprendi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>harbour-thinq</name>
|
||||
<message>
|
||||
<location filename="../qml/harbour-thinq.qml" line="28"/>
|
||||
<source>Washing finished</source>
|
||||
<translation>Lavaggio finito</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Reference in new issue
Block a user