diff --git a/packaging/mobile_window.png b/packaging/mobile_window.png new file mode 100644 index 0000000000000000000000000000000000000000..904606874b1a35dfc420794aaa59c814d111337a Binary files /dev/null and b/packaging/mobile_window.png differ diff --git a/packaging/org.eyecreate.qiflora.appdata.xml b/packaging/org.eyecreate.qiflora.appdata.xml index a869ee62e027983324a94cf2c1e1c5d8ab016790..a2ad9fb32f432bcdf58aeb3c7c685d64960bed46 100644 --- a/packaging/org.eyecreate.qiflora.appdata.xml +++ b/packaging/org.eyecreate.qiflora.appdata.xml @@ -15,10 +15,18 @@ - https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1/packaging/main_window.png + https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1.1/packaging/main_window.png + + + https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1.1/packaging/mobile_window.png + + +

Cleaned up graph markings and temperature rounding.

+
+

This release adds history graph for the last 48 hours.

diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index 2e6225d271d3621660bbbda66c831ae461d99ae1..32ff4bd255c9b9aaa2298499b327ac1155fb857c 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -73,6 +73,7 @@ Kirigami.ApplicationWindow { title: "Temperature" icon: "filename-bpm-amarok" lineColor: "red" + units: "°C" yMin: -20 yMax: 40 modelCol: 1 @@ -82,6 +83,7 @@ Kirigami.ApplicationWindow { title: "Moisture" icon: "colors-chromablue" lineColor: "cyan" + units: "%" yMin: 0 yMax: 75 modelCol: 3 @@ -91,6 +93,7 @@ Kirigami.ApplicationWindow { title: "Conductivity" icon: "quickopen" lineColor: "gold" + units: "µS/cm" yMin: 0 yMax: 6000 modelCol: 4 @@ -100,6 +103,7 @@ Kirigami.ApplicationWindow { title: "Brightness" icon: "contrast" lineColor: "orange" + units: "lux" yMin: 0 yMax: 30000 modelCol: 2 @@ -127,7 +131,7 @@ Kirigami.ApplicationWindow { Layouts.Layout.alignment: Qt.AlignCenter level: 3 text: { - if(model.chartType == "temperature") qiflora.temperature + "°C\n" + (qiflora.temperature*1.8+32) + "°F" + if(model.chartType == "temperature") Math.round(qiflora.temperature*10)/10 + "°C\n" + (Math.round((qiflora.temperature*1.8+32)*10)/10) + "°F" else if(model.chartType == "moisture") qiflora.moisture + "%" else if(model.chartType == "conductivity") qiflora.conduction + " µS/cm" else if(model.chartType == "brightness") qiflora.brightness + " lux" @@ -163,6 +167,7 @@ Kirigami.ApplicationWindow { } axisY: Charts.ValueAxis { id: valueAx + labelFormat: "%d "+units labelsColor: Kirigami.Theme.textColor min: yMin max: yMax diff --git a/src/miflora/florahistory.cpp b/src/miflora/florahistory.cpp index bb12483c3f8d7e458240ce6eb6c58e1446529911..50b1f8bb23cdc669faecd9606e15ae27f35e95ec 100644 --- a/src/miflora/florahistory.cpp +++ b/src/miflora/florahistory.cpp @@ -17,6 +17,7 @@ #include "florahistory.h" #include +#include QVariant FloraHistory::data(const QModelIndex& index, int role) const { @@ -24,13 +25,15 @@ QVariant FloraHistory::data(const QModelIndex& index, int role) const if(index.column() == 0) { return QVariant(tableData[index.row()].time); } else if(index.column() == 1) { - return QVariant(tableData[index.row()].temperature); + return QVariant(std::round(tableData[index.row()].temperature*10)/10); //temp in C } else if(index.column() == 2) { return QVariant(tableData[index.row()].brightness); } else if(index.column() == 3) { return QVariant(tableData[index.row()].moisture); } else if(index.column() == 4) { return QVariant(tableData[index.row()].conductivity); + } else if(index.column() == 5) { + return QVariant((std::round((tableData[index.row()].temperature*1.8+32)*10)/10)); //temp in F } else { return QVariant(); } @@ -41,7 +44,7 @@ QVariant FloraHistory::data(const QModelIndex& index, int role) const int FloraHistory::columnCount(const QModelIndex& parent) const { - return 5; + return 6; } int FloraHistory::rowCount(const QModelIndex& parent) const