Added iSpindel detail screen

Sat, 02 Jul 2022 15:24:31 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 02 Jul 2022 15:24:31 +0200
changeset 329
b57299738980
parent 328
ee2c8b29f389
child 330
138e320ce9bd

Added iSpindel detail screen

CMakeLists.txt file | annotate | diff | comparison | revisions
src/DetailiSpindel.cpp file | annotate | diff | comparison | revisions
src/DetailiSpindel.h file | annotate | diff | comparison | revisions
src/MoniSpindels.cpp file | annotate | diff | comparison | revisions
src/MoniSpindels.h file | annotate | diff | comparison | revisions
ui/DetailiSpindel.ui file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Sat Jul 02 11:23:13 2022 +0200
+++ b/CMakeLists.txt	Sat Jul 02 15:24:31 2022 +0200
@@ -223,6 +223,7 @@
     ${SRCDIR}/MoniSpindels.cpp
     ${SRCDIR}/DetailFermenter.cpp
     ${SRCDIR}/DetailCO2meter.cpp
+    ${SRCDIR}/DetailiSpindel.cpp
     ${SRCDIR}/EditProduct.cpp
     ${SRCDIR}/ImportXML.cpp
     ${SRCDIR}/Setup.cpp
@@ -281,6 +282,7 @@
     ${SRCDIR}/MoniSpindels.h
     ${SRCDIR}/DetailFermenter.h
     ${SRCDIR}/DetailCO2meter.h
+    ${SRCDIR}/DetailiSpindel.h
     ${SRCDIR}/EditProduct.h
     ${SRCDIR}/ImportXML.h
     ${SRCDIR}/Setup.h
@@ -319,6 +321,7 @@
     ${UIDIR}/EditProduct.ui
     ${UIDIR}/DetailFermenter.ui
     ${UIDIR}/DetailCO2meter.ui
+    ${UIDIR}/DetailiSpindel.ui
     ${UIDIR}/ImportXML.ui
     ${UIDIR}/MainWindow.ui
   )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DetailiSpindel.cpp	Sat Jul 02 15:24:31 2022 +0200
@@ -0,0 +1,212 @@
+/**
+ * DetailiSpindel.cpp is part of bmsapp.
+ *
+ * bmsapp is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * bmsapp is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "DetailiSpindel.h"
+#include "../ui/ui_DetailiSpindel.h"
+#include "global.h"
+#include "Utils.h"
+#include "MainWindow.h"
+
+
+/*
+ * Results are available via MySQL and websockets. Because we initialize using
+ * MySQL we only use that for the results and up to date status.
+ * Commands are send via websockets only.
+ */
+
+DetailiSpindel::DetailiSpindel(int id, QWidget *parent) : QDialog(parent), ui(new Ui::DetailiSpindel)
+{
+    QSqlQuery query;
+
+    qDebug() << "DetailiSpindel record:" << id;
+    ui->setupUi(this);
+    this->recno = id;
+    setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
+    setWindowTitle(tr("BMSapp - Details iSpindel"));
+
+    ui->thermoMeter->setMaximum(40.0);
+    ui->thermoMeter->setNominal(20.0);
+    ui->thermoMeter->setCritical(25.0);
+    ui->thermoMeter->setSuffix(QString("°C"));
+
+    ui->modeEdit->addItem("OFF");
+    ui->modeEdit->addItem("ON");
+
+    ui->codePick->addItem("Free - Dummy");	// Will be replaced later
+    query.exec("SELECT code,name FROM products WHERE stage='1' OR stage='2' OR stage='3' OR stage='4' OR stage='5' OR stage='6' OR stage='7' ORDER BY code");
+    while (query.next()) {
+	ui->codePick->addItem(query.value("code").toString()+" - "+query.value("name").toString());
+    }
+
+    connect(ui->codePick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailiSpindel::code_changed);
+    connect(ui->modeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailiSpindel::mode_changed);
+    connect(parent, SIGNAL(updateiSpindel(QString)), this, SLOT(refreshiSpindel(QString)));
+    emit refreshTable();
+}
+
+
+void DetailiSpindel::refreshTable()
+{
+    QSqlQuery query;
+
+    qDebug() << "refreshTable ispindel rec:" << this->recno;
+
+    query.prepare("SELECT * FROM mon_ispindels WHERE record = :recno");
+    query.bindValue(":recno", this->recno);
+    query.exec();
+    if (query.next()) {
+
+	const QSignalBlocker blocker1(ui->codePick);
+	const QSignalBlocker blocker2(ui->modeEdit);
+
+	_node = query.value("node").toString();
+	_alias = query.value("alias").toString();
+	_uuid = query.value("uuid").toString();
+	_beercode = query.value("beercode").toString();
+	_beername = query.value("beername").toString();
+
+	ui->uuidEdit->setText(_uuid);
+	ui->systemEdit->setText(_node+"/"+_alias);
+	ui->codePick->setItemText(0, _alias.toUpper()+" - "+_alias);
+
+	if (query.value("online").toInt()) {
+	    ui->statusEdit->setText(tr("Online"));
+            ui->codeEdit->setText(_beercode+" - "+_beername);
+	    ui->modeEdit->show();
+	    if (query.value("mode").toString() == "OFF") {
+	    	ui->powerLED->setChecked(false);
+		ui->modeEdit->setCurrentIndex(0);
+		ui->codePick->show();
+	    } else {
+	    	ui->powerLED->setChecked(true);
+		ui->modeEdit->setCurrentIndex(1);
+		ui->codePick->hide();
+	    }
+	    ui->alarmLED->setChecked((query.value("alarm").toInt() != 0) ? true:false);
+
+	    ui->voltEdit->setText(QString("%1").arg(query.value("battery").toDouble(), 4, 'f', 3, '0'));
+	    ui->tiltEdit->setText(QString("%1").arg(query.value("angle").toDouble(), 6, 'f', 5, '0'));
+	    ui->platoEdit->setText(QString("%1").arg(query.value("gravity").toDouble(), 4, 'f', 3, '0'));
+            double sg = Utils::plato_to_sg(query.value("gravity").toDouble());
+	    ui->sgEdit->setText(QString("%1").arg(sg, 5, 'f', 4, '0'));
+
+	    if (query.value("gravity").toDouble()) {
+		double og = Utils::plato_to_sg(query.value("og_gravity").toDouble());
+		double svg = Utils::calc_svg(og, sg);
+
+		ui->ogVal->setText(QString("%1").arg(og, 5, 'f', 4, '0'));
+		ui->ogVal2->setText(QString("%1°P").arg(query.value("og_gravity").toDouble(), 4, 'f', 3, '0'));
+		ui->sgVal->setText(QString("%1").arg(sg, 5, 'f', 4, '0'));
+		ui->sgVal2->setText(QString("%1°P").arg(query.value("gravity").toDouble(), 4, 'f', 3, '0'));
+		ui->svgVal->setText(QString("%1%").arg(svg, 2, 'f', 1, '0'));
+		ui->svgBar->setValue(svg);
+		ui->abvVal->setText(QString("%1%").arg(Utils::abvol(og, sg), 3, 'f', 2, '0'));
+	    } else {
+		ui->ogVal->setText("");
+		ui->ogVal2->setText("");
+		ui->sgVal->setText("");
+		ui->sgVal2->setText("");
+		ui->svgVal->setText("");
+		ui->abvVal->setText("");
+		ui->batVal->setText("");
+	    }
+
+	    double batt = query.value("battery").toDouble() - 3.064;	// 0% voltage
+	    if (batt < 0)
+		batt = 0;
+	    batt = round(batt / 1.17875 * 100.0);	// 100% range
+	    if (batt > 100)
+		batt = 100;
+	    ui->batVal->setText(QString("%1%").arg(batt, 2, 'f', 1, '0'));
+
+	    ui->thermoBox->show();
+	    ui->thermoMeter->setValue(query.value("temperature").toDouble());
+
+	} else {
+	    /* Offline */
+	    ui->statusEdit->setText(tr("Offline"));
+	    ui->powerLED->setChecked(false);
+	    ui->alarmLED->setChecked(true);
+	    ui->codePick->hide();
+	    ui->modeEdit->hide();
+	    ui->thermoBox->hide();
+	    ui->logButton->hide();
+	}
+    }
+
+}
+
+
+DetailiSpindel::~DetailiSpindel()
+{
+    qDebug() << "DetailiSpindel done";
+    delete ui;
+    emit entry_changed();
+}
+
+
+/*
+ * Receive signals destined for all co2meters.
+ * Check if the signal is for us.
+ */
+void DetailiSpindel::refreshiSpindel(QString data)
+{
+    if (_node+"/"+_alias == data) {
+	emit refreshTable();
+    }
+}
+
+
+void DetailiSpindel::on_quitButton_clicked()
+{
+    this->close();
+    this->setResult(1);
+}
+
+
+void DetailiSpindel::mode_changed(int val)
+{
+    QStringList mode ({ "OFF", "ON" });
+    QString msg = QString("{\"device\":\"ispindels\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"mode\":\"" + mode[val] + "\"}");
+    qDebug() << "mode_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
+}
+
+
+void DetailiSpindel::code_changed(int val)
+{
+    QJsonParseError parseError;
+    QSqlQuery query;
+
+    QString msg = QString("{\"device\":\"ispindels\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",");
+    if (val == 0) {
+	msg.append(QString("\"beeruuid\":\"") + _uuid + "\",");
+	msg.append(QString("\"beercode\":\"") + _alias.toUpper() + "\",");
+	msg.append(QString("\"beername\":\"") + _alias + "\"}");
+    } else {
+	query.exec("SELECT code,name,uuid,stage,json_yeasts FROM products WHERE stage='1' OR stage='2' OR stage='3' OR stage='4' OR stage='5' OR stage='6' OR stage='7' ORDER BY code");
+	for (int i = 0; i < val; i++) {
+            query.next();
+        }
+	msg.append(QString("\"beeruuid\":\"") + query.value("uuid").toString() + "\",");
+	msg.append(QString("\"beercode\":\"") + query.value("code").toString() + "\",");
+	msg.append(QString("\"beername\":\"") + query.value("name").toString() + "\"}");
+    }
+
+    qDebug() << "code_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DetailiSpindel.h	Sat Jul 02 15:24:31 2022 +0200
@@ -0,0 +1,43 @@
+#ifndef _DETAILISPINDEL_H
+#define _DETAILISPINDEL_H
+
+#include <QDialog>
+#include <QDoubleSpinBox>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QRadioButton>
+#include <QLineEdit>
+#include <QDialogButtonBox>
+
+
+namespace Ui {
+class DetailiSpindel;
+}
+
+class DetailiSpindel : public QDialog
+{
+    Q_OBJECT
+
+signals:
+    void entry_changed();
+
+public:
+    explicit DetailiSpindel(int id, QWidget *parent = 0);
+    ~DetailiSpindel();
+
+private slots:
+    void on_quitButton_clicked();
+    void refreshTable(void);
+    void mode_changed(int val);
+    void code_changed(int val);
+
+public slots:
+    void refreshiSpindel(QString);
+
+private:
+    Ui::DetailiSpindel *ui;
+    QString _node, _alias, _uuid, _beercode, _beername;
+    int recno;
+};
+
+#endif
--- a/src/MoniSpindels.cpp	Sat Jul 02 11:23:13 2022 +0200
+++ b/src/MoniSpindels.cpp	Sat Jul 02 15:24:31 2022 +0200
@@ -15,7 +15,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #include "MoniSpindels.h"
-#include "EditSupplier.h"
+#include "DetailiSpindel.h"
 #include "MainWindow.h"
 #include "Utils.h"
 #include "config.h"
@@ -148,16 +148,15 @@
 {
     qDebug() << "refreshiSpindels" << data;
     emit refreshTable();
+    emit updateiSpindel(data);
 }
 
 
 void MoniSpindels::edit(int recno)
 {
-//    EditSupplier dialog(recno, this);
-    /* Signal from editor if a refresh is needed */
-//    connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
-//    dialog.setModal(true);
-//    dialog.exec();
+    DetailiSpindel dialog(recno, this);
+    dialog.setModal(true);
+    dialog.exec();
 }
 
 
--- a/src/MoniSpindels.h	Sat Jul 02 11:23:13 2022 +0200
+++ b/src/MoniSpindels.h	Sat Jul 02 15:24:31 2022 +0200
@@ -23,6 +23,7 @@
 
 signals:
     void setStatus(QString);
+    void updateiSpindel(QString);
 
 private slots:
     void on_editButton_clicked();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/DetailiSpindel.ui	Sat Jul 02 15:24:31 2022 +0200
@@ -0,0 +1,728 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DetailiSpindel</class>
+ <widget class="QDialog" name="DetailiSpindel">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1024</width>
+    <height>560</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QWidget" name="topWidget" native="true">
+     <widget class="QGroupBox" name="powerBox">
+      <property name="geometry">
+       <rect>
+        <x>740</x>
+        <y>0</y>
+        <width>261</width>
+        <height>121</height>
+       </rect>
+      </property>
+      <widget class="QLabel" name="powerLabel">
+       <property name="geometry">
+        <rect>
+         <x>190</x>
+         <y>70</y>
+         <width>61</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Power</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="alarmLabel">
+       <property name="geometry">
+        <rect>
+         <x>130</x>
+         <y>70</y>
+         <width>61</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Alarm</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+      <widget class="Led" name="powerLED">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>40</y>
+         <width>20</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <string>Color Led component</string>
+       </property>
+       <property name="whatsThis">
+        <string>Led indicator</string>
+       </property>
+       <property name="checked">
+        <bool>false</bool>
+       </property>
+       <property name="color">
+        <color>
+         <red>28</red>
+         <green>113</green>
+         <blue>216</blue>
+        </color>
+       </property>
+      </widget>
+      <widget class="Led" name="alarmLED">
+       <property name="geometry">
+        <rect>
+         <x>150</x>
+         <y>40</y>
+         <width>20</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <string>Color Led component</string>
+       </property>
+       <property name="whatsThis">
+        <string>Led indicator</string>
+       </property>
+       <property name="checked">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="controlBox">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>721</width>
+        <height>231</height>
+       </rect>
+      </property>
+      <widget class="QLabel" name="uuidLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>40</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Uuid:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="systemLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>70</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>System and unit:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="codeLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>100</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Code and beer:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="modeLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>130</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Working mode:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="voltLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>160</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Battery voltage:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="tiltLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>190</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Tilt angle°:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="boxLabel">
+       <property name="geometry">
+        <rect>
+         <x>15</x>
+         <y>10</y>
+         <width>691</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>12</pointsize>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string>iSpindel overview</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="uuidEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>40</y>
+         <width>271</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="frame">
+        <bool>true</bool>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="systemEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>70</y>
+         <width>181</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="frame">
+        <bool>true</bool>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="statusEdit">
+       <property name="geometry">
+        <rect>
+         <x>560</x>
+         <y>70</y>
+         <width>141</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="codeEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>100</y>
+         <width>381</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QComboBox" name="codePick">
+       <property name="geometry">
+        <rect>
+         <x>560</x>
+         <y>100</y>
+         <width>141</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QComboBox::AdjustToContentsOnFirstShow</enum>
+       </property>
+      </widget>
+      <widget class="QComboBox" name="modeEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>130</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="tiltEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>190</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="sgEdit">
+       <property name="geometry">
+        <rect>
+         <x>560</x>
+         <y>190</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="voltEdit">
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>160</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="platoLabel">
+       <property name="geometry">
+        <rect>
+         <x>410</x>
+         <y>160</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Density °Plato:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="sgLabel">
+       <property name="geometry">
+        <rect>
+         <x>410</x>
+         <y>190</y>
+         <width>141</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Density SG:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="platoEdit">
+       <property name="geometry">
+        <rect>
+         <x>560</x>
+         <y>160</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="thermoBox">
+      <property name="enabled">
+       <bool>true</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>240</y>
+        <width>721</width>
+        <height>291</height>
+       </rect>
+      </property>
+      <widget class="QLabel" name="thermoLabel">
+       <property name="geometry">
+        <rect>
+         <x>150</x>
+         <y>260</y>
+         <width>91</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Temperature</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+      <widget class="ManoMeter" name="thermoMeter">
+       <property name="geometry">
+        <rect>
+         <x>70</x>
+         <y>10</y>
+         <width>251</width>
+         <height>251</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <string>Shows the air temperature</string>
+       </property>
+       <property name="autoFillBackground">
+        <bool>false</bool>
+       </property>
+       <property name="valueFont">
+        <font>
+         <pointsize>18</pointsize>
+        </font>
+       </property>
+       <property name="digitFont">
+        <font>
+         <pointsize>14</pointsize>
+        </font>
+       </property>
+       <property name="digitOffset">
+        <double>110.000000000000000</double>
+       </property>
+      </widget>
+      <widget class="QProgressBar" name="svgBar">
+       <property name="geometry">
+        <rect>
+         <x>360</x>
+         <y>80</y>
+         <width>321</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="value">
+        <number>24</number>
+       </property>
+      </widget>
+      <widget class="QLabel" name="svgLabel">
+       <property name="geometry">
+        <rect>
+         <x>360</x>
+         <y>110</y>
+         <width>321</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Apperant Attenuation</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="statusBox">
+      <property name="geometry">
+       <rect>
+        <x>740</x>
+        <y>130</y>
+        <width>261</width>
+        <height>291</height>
+       </rect>
+      </property>
+      <widget class="QLabel" name="progressLabel">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>241</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>12</pointsize>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string>Fermentation progress</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="ogLab">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>50</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>OG</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="sgLab">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>80</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>SG</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="svgLab">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>110</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>SVG</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="abvLab">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>140</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>ABV</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="batLab">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>170</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Battery</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="ogVal">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>50</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="sgVal">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>80</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="svgVal">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>110</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="abvVal">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>140</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="batVal">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>170</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="ogVal2">
+       <property name="geometry">
+        <rect>
+         <x>180</x>
+         <y>50</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLabel" name="sgVal2">
+       <property name="geometry">
+        <rect>
+         <x>180</x>
+         <y>80</y>
+         <width>71</width>
+         <height>20</height>
+        </rect>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="buttonBox">
+      <property name="geometry">
+       <rect>
+        <x>740</x>
+        <y>430</y>
+        <width>261</width>
+        <height>101</height>
+       </rect>
+      </property>
+      <widget class="QPushButton" name="quitButton">
+       <property name="geometry">
+        <rect>
+         <x>90</x>
+         <y>60</y>
+         <width>80</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Quit</string>
+       </property>
+       <property name="icon">
+        <iconset>
+         <normaloff>:icons/silk/door_out.png</normaloff>:icons/silk/door_out.png</iconset>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="logButton">
+       <property name="geometry">
+        <rect>
+         <x>90</x>
+         <y>20</y>
+         <width>80</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Log</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
+         <normaloff>:/icons/silk/chart_line.png</normaloff>:/icons/silk/chart_line.png</iconset>
+       </property>
+      </widget>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>Led</class>
+   <extends>QWidget</extends>
+   <header>analog/led.h</header>
+  </customwidget>
+  <customwidget>
+   <class>ManoMeter</class>
+   <extends>QWidget</extends>
+   <header>analog/manometer.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>quitButton</tabstop>
+ </tabstops>
+ <resources>
+  <include location="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc"/>
+ </resources>
+ <connections/>
+</ui>

mercurial