Commit 5089e4f4 authored by Richard Lee's avatar Richard Lee
Browse files

Fix minor bugs

Add support for arm64
parent 06765377
......@@ -9,7 +9,7 @@
"desktop": "domoticz.desktop"
}
},
"version": "2.0",
"version": "2.1",
"maintainer": "Richard Lee <apps-lee@outlook.fr>",
"framework" : "ubuntu-sdk-16.04"
}
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: domoticz.applee\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-10 18:54+0000\n"
"POT-Creation-Date: 2020-02-25 17:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -85,51 +85,51 @@ msgstr ""
msgid "Edit variable"
msgstr ""
#: ../qml/TempLog.qml:28 ../qml/LightLog.qml:30
#: ../qml/TempLog.qml:29 ../qml/LightLog.qml:31
msgid "History - "
msgstr ""
#: ../qml/TempLog.qml:71
#: ../qml/TempLog.qml:72
msgid "Min "
msgstr ""
#: ../qml/TempLog.qml:81
#: ../qml/TempLog.qml:82
msgid "Avg "
msgstr ""
#: ../qml/TempLog.qml:91
#: ../qml/TempLog.qml:92
msgid "Max "
msgstr ""
#: ../qml/DeviceList.qml:37
#: ../qml/DeviceList.qml:38
msgid "User variables"
msgstr ""
#: ../qml/DeviceList.qml:42 ../qml/PageSettings.qml:18
#: ../qml/DeviceList.qml:43 ../qml/PageSettings.qml:18
msgid "Parameters"
msgstr ""
#: ../qml/DeviceList.qml:47 ../qml/DeviceList.qml:209
#: ../qml/DeviceList.qml:48 ../qml/DeviceList.qml:210
msgid "Dashboard"
msgstr ""
#: ../qml/DeviceList.qml:213
#: ../qml/DeviceList.qml:214
msgid "Switches"
msgstr ""
#: ../qml/DeviceList.qml:217
#: ../qml/DeviceList.qml:218
msgid "Scenes"
msgstr ""
#: ../qml/DeviceList.qml:221
#: ../qml/DeviceList.qml:222
msgid "Temperature"
msgstr ""
#: ../qml/DeviceList.qml:225
#: ../qml/DeviceList.qml:226
msgid "Weather"
msgstr ""
#: ../qml/DeviceList.qml:229
#: ../qml/DeviceList.qml:230
msgid "Utility"
msgstr ""
......@@ -153,7 +153,7 @@ msgstr ""
msgid "Save settings"
msgstr ""
#: ../qml/PageUserVar.qml:25
#: ../qml/PageUserVar.qml:26
msgid "User Variables"
msgstr ""
......
......@@ -12,7 +12,7 @@ Page {
property alias details: txtDetails
property alias slider: level
property var mySelectorList
property var mySubType
property var myType
property var myLightColor
property var myIdx
......@@ -44,7 +44,7 @@ Page {
} // Rectangle: Devices's state
Row { // Slider for luminosity
visible: ((mySubType=="RGBWWZ") || (mySubType=="dimmer"))
visible: ((myType=="RGBWWZ") || (myType=="dimmer"))
width: parent.width
height: units.gu(6)
spacing: units.gu(2)
......@@ -85,7 +85,7 @@ Page {
ColorPicker {
id: picker
visible: (mySubType=="RGBWWZ")
visible: (myType=="RGBWWZ")
height: units.gu(22)
width: parent.width
previousColor: myLightColor
......@@ -100,14 +100,14 @@ Page {
id: row
anchors.centerIn: parent
spacing: units.gu(1)
visible: ((mySubType=="RGBWWZ") || (mySubType=="dimmer"))
visible: ((myType=="RGBWWZ") || (myType=="dimmer"))
Button {
text: i18n.tr("OK")
color: UbuntuColors.green
onClicked: {
// stack.pop() // Should I close the advanced settings on this event?
if (mySubType=="RGBWWZ") {
if (myType=="RGBWWZ") {
apiFct.callRequest(baseDomoticzUrl+"/json.htm?type=command&param=setcolbrightnessvalue&idx="+myIdx+"&hex="+picker.hexColor+"&brightness="+level.value)
} else {
apiFct.callRequest(baseDomoticzUrl+"/json.htm?type=command&param=switchlight&idx="+myIdx+"&switchcmd=Set%20Level&level="+level.value)
......@@ -125,7 +125,7 @@ Page {
OptionSelector { // Selector's values
id: mySelector
visible: (mySubType=="Selector")
visible: (myType=="Selector")
width : parent.width
height: units.gu(5)
......
......@@ -18,6 +18,7 @@ Page {
}
}
property var fontSize: mainFontSize
property var dashboardUrl: baseDomoticzUrl+"/json.htm?type=devices&used=true&filter=all&favorite=1&order=Name"
property var switchesUrl: baseDomoticzUrl+"/json.htm?type=devices&filter=light&used=true&order=Name"
property var scenesUrl: baseDomoticzUrl+"/json.htm?type=scenes"
......@@ -79,7 +80,7 @@ Page {
advanced.details.text = model.devData
advanced.info.text = model.name
advanced.mySelectorList = model.switchOptions
advanced.mySubType = model.subType
advanced.myType = model.type
advanced.myLightColor = model.lightColor
advanced.slider.value = model.level
stack.push(advanced)
......@@ -143,7 +144,7 @@ Page {
Rectangle {
width: units.gu(27)
height: units.gu(5)
Text { anchors.centerIn: parent; text: name; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: name; font.pixelSize: fontSize ; width: parent.width }
}
Rectangle {
......@@ -171,13 +172,13 @@ Page {
MouseArea {anchors.fill: parent; onClicked: apiFct.callRequest(currentDev.sceneOn)}
}
Text { visible: ((type == 'temperature') || ((currentPage == 3) && (temperature != 999))); // (((currentPage == 2)||(currentPage == 0)) && (type == 'temperature'));
anchors.centerIn: parent; text: temperature+" °C"; font.pointSize: units.gu(1.4); font.bold: true
anchors.centerIn: parent; text: temperature+" °C"; font.pixelSize: fontSize; font.bold: true
}
Text { visible: ((type != 'temperature') && ((temperature == 999)||(currentPage == 4)||(currentPage == 0)) && (meteoData != ""));
anchors.centerIn: parent; text: meteoData ; font.pointSize: units.gu(1.4); font.bold: (type != "forecast")
anchors.centerIn: parent; text: meteoData ; font.pixelSize: fontSize; font.bold: (type != "forecast")
}
Text { visible: ((meteoData == '') && (type != 'temperature') && (type != 'Scene') && (isSwitch == ''));
anchors.centerIn: parent; text: devData ; font.pointSize: units.gu(1.4); font.bold: (type != "forecast")
anchors.centerIn: parent; text: devData ; font.pixelSize: fontSize; font.bold: (type != "forecast")
}
} // Rectangle : type specific field
......
......@@ -18,6 +18,7 @@ Page {
}
}
property var fontSize: fontSze
property var currentUrl: baseDomoticzUrl+"/json.htm?type=lightlog&idx="+myIdx
// property var textLogUrl: baseDomoticzUrl+"/json.htm?type=textlog&idx="+myIdx
// property var counterLogUrl: baseDomoticzUrl+"/json.htm?type=graph&sensor=counter&idx="+myIdx+"&range=month"
......@@ -61,7 +62,7 @@ Page {
Rectangle { // Date
width: parent.width
height: units.gu(3)
Text { anchors.centerIn: parent; text: logdate; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: logdate; font.pixelSize: fontSize ; width: parent.width }
} // Rectangle: Date
Row {
......@@ -70,13 +71,13 @@ Page {
Rectangle { // Status
width: units.gu(30)
height: units.gu(3)
Text { anchors.centerIn: parent; text: status; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: status; font.pixelSize: fontSize ; width: parent.width }
} // Rectangle: Status
Rectangle { // Level
width: units.gu(10)
height: units.gu(3)
Text { anchors.centerIn: parent; text: level; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: level; font.pixelSize: fontSize ; width: parent.width }
} // Rectangle: Level
}
} // Column
......
......@@ -13,7 +13,8 @@ MainView {
width: units.gu(47)
height: units.gu(75)
property var debug: false
property var debug: true
property var mainFontSize: units.gu(2)
property alias deviceList: devList
property alias stack: myPageStack
property alias params: parameters
......
......@@ -18,6 +18,7 @@ Page {
}
}
property var fontSize: fontSze
property var currentUrl: baseDomoticzUrl+"/json.htm?type=command&param=getuservariables"
header: PageHeader {
......@@ -75,14 +76,14 @@ Page {
Rectangle {
width: units.gu(28)
height: units.gu(5)
Text { anchors.centerIn: parent; text: name; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: name; font.pixelSize: fontSize ; width: parent.width }
}
Rectangle {
width: units.gu(11)
height: units.gu(5)
Text { visible: true; anchors.centerIn: parent; text: uvar ; font.pointSize: units.gu(1.4)}
Text { visible: true; anchors.centerIn: parent; text: uvar ; font.pixelSize: fontSize}
} // Rectangle : type specific field
} // Row
......
......@@ -111,6 +111,9 @@ Item { // Utility functions
// Data enhancement
var deviceType = myFct.defineSubType(deviceSubType, varType, deviceTypeImg, deviceImage)
if (!switchType) {
switchType = ""
}
if (switchType == "Selector") {
// Decode LevelNames from Base64
selectList = Qt.atob(result[i].LevelNames)
......@@ -150,7 +153,7 @@ Item { // Utility functions
}
// Debug message
if (debug) { console.log(deviceName+" Id:"+deviceIdx+" Type:"+deviceType+" "+deviceData) }
if (debug) { console.log(deviceName+" Id:"+deviceIdx+" Type:"+deviceType+"/"+deviceSubType+" "+deviceData) }
// Dataset for model
var data = {
......
......@@ -18,6 +18,7 @@ Page {
}
}
property var fontSize: fontSze
property var currentUrl: baseDomoticzUrl+"/json.htm?type=graph&sensor=temp&idx="+myIdx+"&range=year"
property var name
......@@ -59,7 +60,7 @@ Page {
Rectangle { // Date
width: parent.width
height: units.gu(3)
Text { anchors.centerIn: parent; text: logdate; font.pointSize: units.gu(1.4) ; width: parent.width }
Text { anchors.centerIn: parent; text: logdate; font.pixelSize: fontSize ; width: parent.width }
} // Rectangle: Date
Row {
......@@ -68,9 +69,9 @@ Page {
width: units.gu(15)
height: units.gu(3)
Row {
Text { text: i18n.tr("Min "); font.pointSize: units.gu(1.4) }
Text { text: minTemp; color: UbuntuColors.blue; font.pointSize: units.gu(1.4) }
Text { text: "/"+minTempOld; font.pointSize: units.gu(1.4) }
Text { text: i18n.tr("Min "); font.pixelSize: fontSize }
Text { text: minTemp; color: UbuntuColors.blue; font.pixelSize: fontSize }
Text { text: "/"+minTempOld; font.pixelSize: fontSize }
}
} // Rectangle: T Min
......@@ -78,9 +79,9 @@ Page {
width: units.gu(15)
height: units.gu(3)
Row {
Text { text: i18n.tr("Avg "); font.pointSize: units.gu(1.4) }
Text { text: avgTemp; color: UbuntuColors.ash; font.pointSize: units.gu(1.4) }
Text { text: "/"+avgTempOld; font.pointSize: units.gu(1.4) }
Text { text: i18n.tr("Avg "); font.pixelSize: fontSize }
Text { text: avgTemp; color: UbuntuColors.ash; font.pixelSize: fontSize }
Text { text: "/"+avgTempOld; font.pixelSize: fontSize }
}
} // Rectangle: T Avg
......@@ -88,9 +89,9 @@ Page {
width: units.gu(15)
height: units.gu(3)
Row {
Text { text: i18n.tr("Max "); font.pointSize: units.gu(1.4) }
Text { text: maxTemp; color: UbuntuColors.red; font.pointSize: units.gu(1.4) }
Text { text: "/"+maxTempOld; font.pointSize: units.gu(1.4) }
Text { text: i18n.tr("Max "); font.pixelSize: fontSize }
Text { text: maxTemp; color: UbuntuColors.red; font.pixelSize: fontSize }
Text { text: "/"+maxTempOld; font.pixelSize: fontSize }
}
} // Rectangle: T Max
} // Row
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment