Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23fdbd27b6 | |||
| bdebc0833e | |||
| 0ec59fc409 | |||
| ad1fdee6c4 | |||
| c9720c9dea | |||
| 16db502a04 | |||
| 003a484fc4 | |||
| f0d203c6d6 | |||
| 9e7bf90831 |
Binary file not shown.
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 129 KiB |
BIN
packaging/mobile_window.png
Normal file
BIN
packaging/mobile_window.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
@@ -2,7 +2,7 @@
|
||||
<component type="desktop-application">
|
||||
<id>org.eyecreate.qiflora</id>
|
||||
<name>QiFlora</name>
|
||||
<summary>Mobile friendly application to monitor Mi Flora devices.</summary>
|
||||
<summary>Mobile friendly application to monitor plants using Mi Flora devices.</summary>
|
||||
<metadata_license>FSFAP</metadata_license>
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
<content_rating type="oars-1.1" />
|
||||
@@ -15,10 +15,23 @@
|
||||
</description>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image type="source">https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1/packaging/main_window.png</image>
|
||||
<image type="source">https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1.2/packaging/main_window.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image type="source">https://git.eyecreate.org/eyecreate/qiflora/raw/v1.1.2/packaging/mobile_window.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="1.1.2" date="2019-11-15" type="stable">
|
||||
<description>
|
||||
<p>Fixed code causing text to sometimes not appear.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.1.1" date="2019-11-14" type="stable">
|
||||
<description>
|
||||
<p>Cleaned up graph markings and temperature rounding.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.1" date="2019-11-13" type="stable">
|
||||
<description>
|
||||
<p>This release adds history graph for the last 48 hours.</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=QiFlora
|
||||
Comment=Monitor plants with Mi Flora sensors.
|
||||
Version=1.1
|
||||
Version=1.1.2
|
||||
Exec=qiflora
|
||||
MimeType=application/x-qiflora;
|
||||
Icon=org.eyecreate.qiflora
|
||||
|
||||
@@ -83,12 +83,15 @@
|
||||
"name": "qiflora",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
]
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://git.eyecreate.org/eyecreate/qiflora.git",
|
||||
"tag": "v1.1",
|
||||
"commit": "9bad2c73ff21515f63f5a09d7a8434bdfd98e6ee"
|
||||
"tag": "v1.1.2",
|
||||
"commit": "16db502a0460139dcff6a63df90c218e3e4c1d66"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.kde.kirigami 2.6 as Kirigami
|
||||
import QtQuick.Controls 2.0 as Controls
|
||||
import QtQuick.Layouts 1.12 as Layouts
|
||||
import QtCharts 2.3 as Charts
|
||||
import org.eyecreate.qiflora 1.0
|
||||
import org.eyecreate.qiflora 1.1
|
||||
|
||||
Kirigami.ApplicationWindow {
|
||||
id: root
|
||||
@@ -25,7 +25,7 @@ Kirigami.ApplicationWindow {
|
||||
id: mainPage
|
||||
mainAction: Kirigami.Action {
|
||||
iconName: "view-refresh"
|
||||
text: i18n("Query Device")
|
||||
text: qsTr("Query Device")
|
||||
onTriggered: {
|
||||
deviceSelect.open();
|
||||
}
|
||||
@@ -33,7 +33,7 @@ Kirigami.ApplicationWindow {
|
||||
contextualActions: [
|
||||
Kirigami.Action {
|
||||
iconName: "help-about"
|
||||
text: i18n("About")
|
||||
text: qsTr("About")
|
||||
onTriggered: {
|
||||
pageStack.replace(aboutPageComponent);
|
||||
}
|
||||
@@ -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
|
||||
@@ -109,7 +113,7 @@ Kirigami.ApplicationWindow {
|
||||
delegate: Kirigami.Card {
|
||||
id: card
|
||||
banner {
|
||||
title: i18n(model.title)
|
||||
title: qsTr(model.title)
|
||||
titleIcon: model.icon
|
||||
titleLevel: 2
|
||||
}
|
||||
@@ -121,13 +125,13 @@ Kirigami.ApplicationWindow {
|
||||
Kirigami.Heading {
|
||||
Layouts.Layout.alignment: Qt.AlignCenter
|
||||
level: 4
|
||||
text: i18n("Last Measured")
|
||||
text: qsTr("Last Measured")
|
||||
}
|
||||
Kirigami.Heading {
|
||||
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
|
||||
@@ -202,7 +207,7 @@ Kirigami.ApplicationWindow {
|
||||
color: "transparent"
|
||||
}
|
||||
Kirigami.Heading {
|
||||
text: i18n("Select Device to Query")
|
||||
text: qsTr("Select Device to Query")
|
||||
}
|
||||
Rectangle {
|
||||
height: 10
|
||||
@@ -245,7 +250,7 @@ Kirigami.ApplicationWindow {
|
||||
id: aboutPage
|
||||
actions.main: Kirigami.Action {
|
||||
iconName: "window-close"
|
||||
text: "Close"
|
||||
text: qsTr("Close")
|
||||
onTriggered: {
|
||||
pageStack.clear();
|
||||
pageStack.push(mainPageComponent);
|
||||
|
||||
@@ -12,7 +12,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication app(argc, argv);
|
||||
|
||||
KAboutData aboutData("org.eyecreate.qiflora", "QiFlora", "1.1", "Mobile friendly application to monitor Mi Flora devices.",KAboutLicense::GPL_V3);//TODO:i18n
|
||||
KAboutData aboutData("org.eyecreate.qiflora", "QiFlora", "1.1.2", "Mobile friendly application to monitor Mi Flora devices.",KAboutLicense::GPL_V3);//TODO:i18n
|
||||
aboutData.setProductName("qiflora");
|
||||
aboutData.addAuthor("Kevin Whitaker",QString(),"eyecreate@eyecreate.org","https://www.eyecreate.org");
|
||||
aboutData.setDesktopFileName("org.eyecreate.qiflora");
|
||||
@@ -26,7 +26,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
qmlRegisterType<BluetoothDevices>();
|
||||
qmlRegisterType<MiFlora>("org.eyecreate.qiflora",1,0,"QiFlora");
|
||||
qmlRegisterType<MiFlora>("org.eyecreate.qiflora",1,1,"QiFlora");
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("appAboutData"), QVariant::fromValue(aboutData));
|
||||
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "florahistory.h"
|
||||
#include <QDebug>
|
||||
#include <cmath>
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user