Implemented profile control. Added stage edit. Added manual control. Added temperature setting.

Fri, 01 Jul 2022 19:52:11 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 01 Jul 2022 19:52:11 +0200
changeset 324
c1bb6b197763
parent 323
d053ffbbf3e9
child 325
fa946d12d937

Implemented profile control. Added stage edit. Added manual control. Added temperature setting.

src/DetailFermenter.cpp file | annotate | diff | comparison | revisions
src/DetailFermenter.h file | annotate | diff | comparison | revisions
ui/DetailFermenter.ui file | annotate | diff | comparison | revisions
--- a/src/DetailFermenter.cpp	Thu Jun 30 21:05:30 2022 +0200
+++ b/src/DetailFermenter.cpp	Fri Jul 01 19:52:11 2022 +0200
@@ -20,6 +20,12 @@
 #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.
+ */
+
 DetailFermenter::DetailFermenter(int id, QWidget *parent) : QDialog(parent), ui(new Ui::DetailFermenter)
 {
     QSqlQuery query;
@@ -57,12 +63,23 @@
 	ui->codePick->addItem(query.value("code").toString()+" - "+query.value("name").toString());
     }
 
+    ui->profilePick->addItem(tr("Erase profile"));
+    query.exec("SELECT name FROM profile_fermentation ORDER BY name");
+    while (query.next()) {
+	ui->profilePick->addItem(query.value("name").toString());
+    }
+
     connect(ui->loEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &DetailFermenter::lo_changed);
     connect(ui->hiEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &DetailFermenter::hi_changed);
     connect(ui->heatSwitch, SIGNAL(clicked()), this, SLOT(heat_switched()));
     connect(ui->coolSwitch, SIGNAL(clicked()), this, SLOT(cool_switched()));
     connect(ui->fanSwitch, SIGNAL(clicked()), this, SLOT(fan_switched()));
+    connect(ui->modeButton1, SIGNAL(clicked()), this, SLOT(button1_pressed()));
+    connect(ui->modeButton2, SIGNAL(clicked()), this, SLOT(button2_pressed()));
     connect(ui->modeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailFermenter::mode_changed);
+    connect(ui->stageEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailFermenter::stage_changed);
+    connect(ui->codePick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailFermenter::code_changed);
+    connect(ui->profilePick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DetailFermenter::profile_changed);
     connect(parent, SIGNAL(updateFermenter(QString)), this, SLOT(refreshFermenter(QString)));
     emit refreshTable();
 }
@@ -72,7 +89,14 @@
 {
     QSqlQuery query;
 
-    qDebug() << "refreshTable fermenter" << this->recno;
+    qDebug() << "refreshTable fermenter rec:" << this->recno;
+
+    QIcon icon_done, icon_start, icon_abort, icon_pause, icon_cont;
+    icon_done.addFile(QString::fromUtf8(":icons/silk/accept.png"), QSize(), QIcon::Normal, QIcon::Off);
+    icon_start.addFile(QString::fromUtf8(":icons/silk/resultset_next.png"), QSize(), QIcon::Normal, QIcon::Off);
+    icon_abort.addFile(QString::fromUtf8(":icons/silk/bomb.png"), QSize(), QIcon::Normal, QIcon::Off);
+    icon_pause.addFile(QString::fromUtf8(":icons/silk/cup.png"), QSize(), QIcon::Normal, QIcon::Off);
+    icon_cont.addFile(QString::fromUtf8(":icons/silk/cup_go.png"), QSize(), QIcon::Normal, QIcon::Off);
 
     query.prepare("SELECT * FROM mon_fermenters WHERE record = :recno");
     query.bindValue(":recno", this->recno);
@@ -81,6 +105,9 @@
 
 	const QSignalBlocker blocker1(ui->codePick);
 	const QSignalBlocker blocker2(ui->modeEdit);
+	const QSignalBlocker blocker3(ui->loEdit);
+	const QSignalBlocker blocker4(ui->hiEdit);
+	const QSignalBlocker blocker5(ui->stageEdit);
 
 	_node = query.value("node").toString();
 	_alias = query.value("alias").toString();
@@ -156,8 +183,10 @@
 		ui->hiEdit->setReadOnly(true);
                 ui->hiEdit->setButtonSymbols(QAbstractSpinBox::NoButtons);
 	    }
-	    ui->loEdit->setValue(query.value("setpoint_low").toDouble());
-	    ui->hiEdit->setValue(query.value("setpoint_high").toDouble());
+	    lo_set = query.value("setpoint_low").toDouble();
+	    hi_set = query.value("setpoint_high").toDouble();
+	    ui->loEdit->setValue(lo_set);
+	    ui->hiEdit->setValue(hi_set);
 
 	    ui->switchBox->show();
 	    ui->heatLED->setChecked((query.value("heater_state").toInt() != 0) ? true:false);
@@ -168,13 +197,73 @@
 		ui->heatSwitch->show();
 		ui->coolSwitch->show();
 		ui->fanSwitch->show();
+		heat_state = (query.value("heater_state").toInt()) ? true:false;
+		cool_state = (query.value("cooler_state").toInt()) ? true:false;
+		fan_state = (query.value("fan_state").toInt()) ? true:false;
+		ui->heatSwitch->setChecked(heat_state);
+		ui->coolSwitch->setChecked(cool_state);
+		ui->fanSwitch->setChecked(fan_state);
+		// Copy state values to variables and set the switches.
 	    } else {
 		ui->heatSwitch->hide();
                 ui->coolSwitch->hide();
                 ui->fanSwitch->hide();
+		heat_state = cool_state = fan_state = false;
 	    }
 
-	    //webSocket->sendTextMessage(QString("dd"));
+	    if (query.value("profile_name").toString() == "") {
+		qobject_cast<QStandardItemModel*>(ui->modeEdit->model())->item(4)->setEnabled(false);
+	    } else {
+		qobject_cast<QStandardItemModel*>(ui->modeEdit->model())->item(4)->setEnabled(true);
+	    }
+	    ui->profileEdit->setText(query.value("profile_name").toString());
+
+	    if (query.value("mode").toString() == "PROFILE") {
+		_profile = query.value("profile_state").toString();	// So we know the profile state anywhere.
+		qDebug() << "profile state" << query.value("profile_state").toString();
+		if (query.value("profile_state").toString() == "OFF") {
+		    ui->profilePick->show();
+		    ui->profileShow->hide();	// Both on the same location.
+		    ui->modeButton1->show();
+		    ui->modeButton1->setText(tr("Start"));
+		    ui->modeButton1->setIcon(icon_start);
+		    ui->modeButton2->hide();
+		} else if (query.value("profile_state").toString() == "RUN") {
+		    ui->profilePick->hide();
+		    ui->profileShow->show();
+		    ui->profileShow->setText(QString(tr("Profile active %1% done")).arg(query.value("profile_percent").toDouble()));
+		    ui->modeButton1->show();
+		    ui->modeButton1->setText(tr("Abort"));
+		    ui->modeButton1->setIcon(icon_abort);
+		    ui->modeButton2->show();
+		    ui->modeButton2->setText(tr("Pause"));
+		    ui->modeButton2->setIcon(icon_pause);
+		} else if (query.value("profile_state").toString() == "PAUSE") {
+		    ui->profilePick->hide();
+                    ui->profileShow->show();
+                    ui->profileShow->setText(QString(tr("Profile paused %1% done")).arg(query.value("profile_percent").toDouble()));
+                    ui->modeButton1->show();
+                    ui->modeButton1->setText(tr("Abort"));
+		    ui->modeButton1->setIcon(icon_abort);
+                    ui->modeButton2->show();
+                    ui->modeButton2->setText(tr("Continue"));
+		    ui->modeButton2->setIcon(icon_cont);
+		} else if (query.value("profile_state").toString() == "DONE") {
+		    ui->profilePick->hide();
+                    ui->profileShow->show();
+                    ui->profileShow->setText(QString(tr("Profile ready")));
+                    ui->modeButton1->show();
+                    ui->modeButton1->setText(tr("Profile Ok"));
+		    ui->modeButton1->setIcon(icon_done);
+		    ui->modeButton2->hide();
+		}
+	    } else {
+		ui->profilePick->show();
+		ui->profileShow->hide();	// Both on the same location.
+		ui->modeButton1->hide();
+		ui->modeButton2->hide();
+		_profile = QString("");
+	    }
 
 	    ui->thermoBox->show();
 	    if (query.value("air_state").toString() == "OK") {
@@ -231,40 +320,175 @@
 
 void DetailFermenter::lo_changed(double val)
 {
-    qDebug() << "lo_changed" << val;
+    double hi = ui->hiEdit->value();
+
+    if (val >= hi)
+	hi = val + 0.1;
+    QString msg = QString("{\"device\":\"fermenters\",\"node\":\""+_node+"\",\"unit\":\""+_alias+"\",\"setpoint_low\":%1,\"setpoint_high\":%2}")
+	    .arg(val, 2, 'f', 1, '0').arg(hi, 2, 'f', 1, '0');
+    qDebug() << "lo_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
 }
 
 
 void DetailFermenter::hi_changed(double val)
 {
-    qDebug() << "hi_changed" << val;
+    double lo = ui->loEdit->value();
+
+    if (val <= lo)
+	lo = val - 0.1;
+    QString msg = QString("{\"device\":\"fermenters\",\"node\":\""+_node+"\",\"unit\":\""+_alias+"\",\"setpoint_low\":%1,\"setpoint_high\":%2}")
+            .arg(lo, 2, 'f', 1, '0').arg(val, 2, 'f', 1, '0');
+    qDebug() << "hi_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
+}
+
+
+void DetailFermenter::send_switches()
+{
+    QString msg=QString("{\"device\":\"fermenters\",\"node\":\""+_node+"\",\"unit\":\""+_alias+"\",\"heater_state\":%1,\"cooler_state\":%2,\"fan_state\":%3}")
+	    .arg((heat_state)?100:0).arg((cool_state)?100:0).arg((fan_state)?100:0);
+    qDebug() << msg;
+    webSocket->sendTextMessage(msg);
 }
 
 
 void DetailFermenter::heat_switched()
 {
-    qDebug() << "heat_switched" << heat_state;
+    heat_state = !heat_state;
+    cool_state = false;
+    send_switches();
 }
 
 
 void DetailFermenter::cool_switched()
 {
-    qDebug() << "cool_switched" << cool_state;
+    cool_state = !cool_state;
+    heat_state = false;
+    send_switches();
 }
 
 
 void DetailFermenter::fan_switched()
 {
-    qDebug() << "fan_switched" << fan_state;
+    fan_state = !fan_state;
+    send_switches();
+}
+
+
+void DetailFermenter::button1_pressed()
+{
+    qDebug() << "button1" << _profile;
+    if (_profile == "OFF") {
+	QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"profile\":{\"command\":\"start\"}}");
+	qDebug() << msg;
+	webSocket->sendTextMessage(msg);
+	return;
+    }
+
+    if ((_profile == "RUN") || (_profile == "PAUSE")) {
+	// use popup
+	int rc = QMessageBox::warning(this, tr("Profile running"), tr("Profile is active, really abort?"),
+                                QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
+	if (rc == QMessageBox::Yes) {
+	    QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"profile\":{\"command\":\"abort\"}}");
+	    qDebug() << msg;
+	    webSocket->sendTextMessage(msg);
+	}
+        return;
+    }
+
+    if (_profile == "DONE") {
+	QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"profile\":{\"command\":\"done\"}}");
+	qDebug() << msg;
+        webSocket->sendTextMessage(msg);
+    }
+}
+
+
+void DetailFermenter::button2_pressed()
+{
+    qDebug() << "button2" << _profile;
+
+    if ((_profile == "RUN") || (_profile == "PAUSE")) {
+	QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"profile\":{\"command\":\"pause\"}}");
+        qDebug() << msg;
+        webSocket->sendTextMessage(msg);
+    }
 }
 
 
 void DetailFermenter::mode_changed(int val)
 {
-    qDebug() << "mode_changed" << val;
-    QStringList mode ({ "OFF", "NONE", "FRIDGE", "BEER", "PROFiLE" });
+    QStringList mode ({ "OFF", "NONE", "FRIDGE", "BEER", "PROFILE" });
     QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"mode\":\"" + mode[val] + "\"}");
-    qDebug() << msg;
+    qDebug() << "mode_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
+}
+
+
+void DetailFermenter::stage_changed(int val)
+{
+    QStringList stage ({ "PRIMARY", "SECONDARY", "TERTIARY", "CARBONATION" });
+    QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",\"stage\":\"" + stage[val] + "\"}");
+    qDebug() << "stage_changed" << val << msg;
     webSocket->sendTextMessage(msg);
 }
 
+
+void DetailFermenter::code_changed(int val)
+{
+    QString msg = QString("");
+    qDebug() << "code_changed" << val << msg;
+}
+
+
+void DetailFermenter::profile_changed(int val)
+{
+    QString payload;
+    QSqlQuery query;
+    QJsonParseError parseError;
+
+    if (val == 0) {
+    	payload = QString("\"profile\":null");
+    } else {
+	query.exec("SELECT * FROM profile_fermentation ORDER BY name");
+	for (int i = 0; i < val; i++) {
+	    query.next();
+	}
+	payload = QString("\"profile\":{\"uuid\":\""+query.value("uuid").toString()+"\",\"name\":\""+query.value("name").toString());
+	payload.append(QString("\",\"inittemp\":{\"low\":") + QString("%1").arg(query.value("inittemp_lo").toDouble(), 2, 'f', 1, '0' ));
+	payload.append(QString(",\"high\":") + QString("%1").arg(query.value("inittemp_hi").toDouble(), 2, 'f', 1, '0' ) + QString("},"));
+	payload.append(QString("\"fridgemode\":") + QString("%1").arg(query.value("fridgemode").toInt()) );
+	payload.append(QString(",\"steps\":["));
+
+	const auto& s_json = query.value("steps").toString();
+	if (! s_json.trimmed().isEmpty()) {
+	    const auto& formattedJson = QString("%1").arg(s_json);
+	    QJsonDocument steps = QJsonDocument::fromJson(formattedJson.toUtf8(),  &parseError);
+	    if (parseError.error != QJsonParseError::NoError) {
+		qWarning() << "Parse error: " << parseError.errorString() << "at" << parseError.offset ;
+            } else if (steps.isArray()) {
+		for (int i = 0; i < steps.array().size(); i++) {
+		    QJsonObject obj = steps.array().at(i).toObject();
+		    if (i > 0)
+			payload.append(QString(","));
+		    payload.append(QString("{\"steptime\":%1").arg(obj["steptime"].toString().toDouble()));
+		    payload.append(QString(",\"resttime\":%1").arg(obj["resttime"].toString().toDouble()));
+		    payload.append(QString(",\"target_lo\":%1").arg(obj["target_lo"].toString().toDouble()));
+		    payload.append(QString(",\"target_hi\":%1").arg(obj["target_hi"].toString().toDouble()));
+		    payload.append(QString(",\"fridgemode\":%1").arg(obj["fridgemode"].toString().toInt()));
+		    payload.append(QString(",\"name\":\"") + obj["name"].toString() + QString("\"}"));
+		}
+	    }
+	}
+
+	payload.append(QString("]}"));
+//	qDebug() << query.value("steps").toString();
+    }
+    QString msg = QString("{\"device\":\"fermenters\",\"node\":\"" + _node + "\",\"unit\":\"" + _alias + "\",%1}").arg(payload);
+    qDebug() << "profile_changed" << val << msg;
+    webSocket->sendTextMessage(msg);
+}
+
+
--- a/src/DetailFermenter.h	Thu Jun 30 21:05:30 2022 +0200
+++ b/src/DetailFermenter.h	Fri Jul 01 19:52:11 2022 +0200
@@ -33,18 +33,26 @@
     void heat_switched();
     void cool_switched();
     void fan_switched();
+    void button1_pressed();
+    void button2_pressed();
     void mode_changed(int val);
+    void stage_changed(int val);
+    void code_changed(int val);
+    void profile_changed(int val);
 
 public slots:
     void refreshFermenter(QString);
 
 private:
     Ui::DetailFermenter *ui;
-    QString _node, _alias;
+    QString _node, _alias, _profile;
     int recno;
+    double lo_set = 0, hi_set = 0;
     bool heat_state = false;
     bool cool_state = false;
     bool fan_state = false;
+
+    void send_switches();
 };
 
 #endif
--- a/ui/DetailFermenter.ui	Thu Jun 30 21:05:30 2022 +0200
+++ b/ui/DetailFermenter.ui	Fri Jul 01 19:52:11 2022 +0200
@@ -19,10 +19,10 @@
      <widget class="QGroupBox" name="powerBox">
       <property name="geometry">
        <rect>
-        <x>720</x>
-        <y>10</y>
+        <x>740</x>
+        <y>0</y>
         <width>261</width>
-        <height>111</height>
+        <height>121</height>
        </rect>
       </property>
       <widget class="QLabel" name="powerLabel">
@@ -190,9 +190,9 @@
      <widget class="QGroupBox" name="controlBox">
       <property name="geometry">
        <rect>
-        <x>20</x>
-        <y>10</y>
-        <width>681</width>
+        <x>0</x>
+        <y>0</y>
+        <width>721</width>
         <height>231</height>
        </rect>
       </property>
@@ -201,7 +201,7 @@
         <rect>
          <x>10</x>
          <y>40</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
@@ -217,12 +217,12 @@
         <rect>
          <x>10</x>
          <y>70</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
-        <string>System:</string>
+        <string>System and unit:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -233,7 +233,7 @@
         <rect>
          <x>10</x>
          <y>100</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
@@ -249,12 +249,12 @@
         <rect>
          <x>10</x>
          <y>130</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
-        <string>Mode:</string>
+        <string>Working mode:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -265,12 +265,12 @@
         <rect>
          <x>10</x>
          <y>160</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
-        <string>Stage:</string>
+        <string>Fermentation stage:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -281,7 +281,7 @@
         <rect>
          <x>10</x>
          <y>190</y>
-         <width>121</width>
+         <width>141</width>
          <height>20</height>
         </rect>
        </property>
@@ -297,7 +297,7 @@
         <rect>
          <x>15</x>
          <y>10</y>
-         <width>651</width>
+         <width>691</width>
          <height>25</height>
         </rect>
        </property>
@@ -318,7 +318,7 @@
       <widget class="QLineEdit" name="uuidEdit">
        <property name="geometry">
         <rect>
-         <x>140</x>
+         <x>160</x>
          <y>40</y>
          <width>271</width>
          <height>23</height>
@@ -334,7 +334,7 @@
       <widget class="QLineEdit" name="systemEdit">
        <property name="geometry">
         <rect>
-         <x>140</x>
+         <x>160</x>
          <y>70</y>
          <width>181</width>
          <height>23</height>
@@ -350,7 +350,7 @@
       <widget class="QLineEdit" name="statusEdit">
        <property name="geometry">
         <rect>
-         <x>550</x>
+         <x>560</x>
          <y>70</y>
          <width>101</width>
          <height>23</height>
@@ -363,7 +363,7 @@
       <widget class="QLineEdit" name="codeEdit">
        <property name="geometry">
         <rect>
-         <x>140</x>
+         <x>160</x>
          <y>100</y>
          <width>381</width>
          <height>23</height>
@@ -376,17 +376,20 @@
       <widget class="QComboBox" name="codePick">
        <property name="geometry">
         <rect>
-         <x>550</x>
+         <x>560</x>
          <y>100</y>
-         <width>101</width>
+         <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>140</x>
+         <x>160</x>
          <y>130</y>
          <width>121</width>
          <height>23</height>
@@ -396,7 +399,7 @@
       <widget class="QComboBox" name="stageEdit">
        <property name="geometry">
         <rect>
-         <x>140</x>
+         <x>160</x>
          <y>160</y>
          <width>121</width>
          <height>23</height>
@@ -406,7 +409,7 @@
       <widget class="QLineEdit" name="profileEdit">
        <property name="geometry">
         <rect>
-         <x>140</x>
+         <x>160</x>
          <y>190</y>
          <width>271</width>
          <height>23</height>
@@ -419,9 +422,9 @@
       <widget class="QLineEdit" name="profileShow">
        <property name="geometry">
         <rect>
-         <x>550</x>
+         <x>530</x>
          <y>190</y>
-         <width>101</width>
+         <width>171</width>
          <height>23</height>
         </rect>
        </property>
@@ -432,9 +435,9 @@
       <widget class="QPushButton" name="modeButton1">
        <property name="geometry">
         <rect>
-         <x>440</x>
+         <x>439</x>
          <y>130</y>
-         <width>80</width>
+         <width>101</width>
          <height>23</height>
         </rect>
        </property>
@@ -445,9 +448,9 @@
       <widget class="QPushButton" name="modeButton2">
        <property name="geometry">
         <rect>
-         <x>550</x>
+         <x>560</x>
          <y>130</y>
-         <width>80</width>
+         <width>101</width>
          <height>23</height>
         </rect>
        </property>
@@ -455,6 +458,19 @@
         <string>PushButton</string>
        </property>
       </widget>
+      <widget class="QComboBox" name="profilePick">
+       <property name="geometry">
+        <rect>
+         <x>560</x>
+         <y>190</y>
+         <width>141</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="placeholderText">
+        <string>Choose profile:</string>
+       </property>
+      </widget>
      </widget>
      <widget class="QGroupBox" name="thermoBox">
       <property name="enabled">
@@ -462,17 +478,17 @@
       </property>
       <property name="geometry">
        <rect>
-        <x>20</x>
-        <y>250</y>
-        <width>681</width>
-        <height>271</height>
+        <x>0</x>
+        <y>240</y>
+        <width>721</width>
+        <height>291</height>
        </rect>
       </property>
       <widget class="QLabel" name="chillerLabel">
        <property name="geometry">
         <rect>
-         <x>290</x>
-         <y>160</y>
+         <x>310</x>
+         <y>180</y>
          <width>101</width>
          <height>20</height>
         </rect>
@@ -487,9 +503,9 @@
       <widget class="QLabel" name="airLabel">
        <property name="geometry">
         <rect>
-         <x>70</x>
-         <y>240</y>
-         <width>111</width>
+         <x>100</x>
+         <y>260</y>
+         <width>71</width>
          <height>20</height>
         </rect>
        </property>
@@ -503,9 +519,9 @@
       <widget class="QLabel" name="beerLabel">
        <property name="geometry">
         <rect>
-         <x>500</x>
-         <y>240</y>
-         <width>111</width>
+         <x>550</x>
+         <y>260</y>
+         <width>71</width>
          <height>20</height>
         </rect>
        </property>
@@ -522,33 +538,27 @@
        </property>
        <property name="geometry">
         <rect>
-         <x>269</x>
+         <x>280</x>
          <y>10</y>
-         <width>141</width>
-         <height>141</height>
+         <width>161</width>
+         <height>161</height>
         </rect>
        </property>
        <property name="toolTip">
-        <string>Shows the pressure</string>
-       </property>
-       <property name="whatsThis">
-        <string>The bar meter widget displays the pressure attached to it</string>
+        <string>Shows the chiller temperature</string>
        </property>
       </widget>
       <widget class="ManoMeter" name="beerThermo">
        <property name="geometry">
         <rect>
-         <x>440</x>
+         <x>460</x>
          <y>10</y>
-         <width>231</width>
-         <height>231</height>
+         <width>251</width>
+         <height>251</height>
         </rect>
        </property>
        <property name="toolTip">
-        <string>Shows the pressure</string>
-       </property>
-       <property name="whatsThis">
-        <string>The bar meter widget displays the pressure attached to it</string>
+        <string>Shows the beer temperature</string>
        </property>
        <property name="valueFont">
         <font>
@@ -569,15 +579,12 @@
         <rect>
          <x>10</x>
          <y>10</y>
-         <width>231</width>
-         <height>231</height>
+         <width>251</width>
+         <height>251</height>
         </rect>
        </property>
        <property name="toolTip">
-        <string>Shows the pressure</string>
-       </property>
-       <property name="whatsThis">
-        <string>The bar meter widget displays the pressure attached to it</string>
+        <string>Shows the air temperature</string>
        </property>
        <property name="autoFillBackground">
         <bool>false</bool>
@@ -600,8 +607,8 @@
      <widget class="QGroupBox" name="tempsetBox">
       <property name="geometry">
        <rect>
-        <x>720</x>
-        <y>140</y>
+        <x>740</x>
+        <y>130</y>
         <width>261</width>
         <height>101</height>
        </rect>
@@ -680,8 +687,8 @@
      <widget class="QGroupBox" name="switchBox">
       <property name="geometry">
        <rect>
-        <x>720</x>
-        <y>250</y>
+        <x>740</x>
+        <y>240</y>
         <width>261</width>
         <height>121</height>
        </rect>
@@ -824,6 +831,11 @@
        <property name="text">
         <string>...</string>
        </property>
+       <property name="icon">
+        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
+         <normaloff>:/icons/silk/control_stop_blue.png</normaloff>
+         <normalon>:/icons/silk/control_play_blue.png</normalon>:/icons/silk/control_stop_blue.png</iconset>
+       </property>
        <property name="checkable">
         <bool>true</bool>
        </property>
@@ -843,9 +855,17 @@
        <property name="text">
         <string>...</string>
        </property>
+       <property name="icon">
+        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
+         <normaloff>:/icons/silk/control_stop_blue.png</normaloff>
+         <normalon>:/icons/silk/control_play_blue.png</normalon>:/icons/silk/control_stop_blue.png</iconset>
+       </property>
        <property name="checkable">
         <bool>true</bool>
        </property>
+       <property name="toolButtonStyle">
+        <enum>Qt::ToolButtonIconOnly</enum>
+       </property>
       </widget>
       <widget class="QToolButton" name="fanSwitch">
        <property name="geometry">
@@ -859,6 +879,11 @@
        <property name="text">
         <string>...</string>
        </property>
+       <property name="icon">
+        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
+         <normaloff>:/icons/silk/control_stop_blue.png</normaloff>
+         <normalon>:/icons/silk/control_play_blue.png</normalon>:/icons/silk/control_stop_blue.png</iconset>
+       </property>
        <property name="checkable">
         <bool>true</bool>
        </property>
@@ -867,17 +892,17 @@
      <widget class="QGroupBox" name="buttonBox">
       <property name="geometry">
        <rect>
-        <x>720</x>
-        <y>380</y>
+        <x>740</x>
+        <y>370</y>
         <width>261</width>
-        <height>141</height>
+        <height>161</height>
        </rect>
       </property>
       <widget class="QPushButton" name="quitButton">
        <property name="geometry">
         <rect>
          <x>90</x>
-         <y>100</y>
+         <y>120</y>
          <width>80</width>
          <height>23</height>
         </rect>
@@ -913,7 +938,7 @@
        <property name="geometry">
         <rect>
          <x>90</x>
-         <y>60</y>
+         <y>70</y>
          <width>80</width>
          <height>23</height>
         </rect>

mercurial