# HG changeset patch # User Michiel Broek # Date 1657976800 -7200 # Node ID 324a7268796b7f5b38635071d4dc11d0d09605e0 # Parent fcf222cabb98db67a0f7bb2dde1b2c11f20b5974 Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated. diff -r fcf222cabb98 -r 324a7268796b src/EditProfileWater.cpp --- a/src/EditProfileWater.cpp Tue Jul 12 16:01:49 2022 +0200 +++ b/src/EditProfileWater.cpp Sat Jul 16 15:06:40 2022 +0200 @@ -16,6 +16,8 @@ */ #include "EditProfileWater.h" #include "../ui/ui_EditProfileWater.h" +#include "global.h" +#include "Utils.h" #include "MainWindow.h" @@ -35,34 +37,43 @@ query.exec(); query.next(); - ui->nameEdit->setText(query.value(1).toString()); - ui->caEdit->setValue(query.value(2).toDouble()); - ui->hcoEdit->setValue(query.value(3).toDouble()); - ui->so4Edit->setValue(query.value(4).toDouble()); - ui->clEdit->setValue(query.value(5).toDouble()); - ui->naEdit->setValue(query.value(6).toDouble()); - ui->mgEdit->setValue(query.value(7).toDouble()); - ui->phEdit->setValue(query.value(8).toDouble()); - ui->notesEdit->setPlainText(query.value(9).toString()); - ui->alkalinityEdit->setValue(query.value(10).toDouble()); + ui->nameEdit->setText(query.value("name").toString()); + calcium = query.value("calcium").toDouble(); + ui->caEdit->setValue(query.value("calcium").toDouble()); + bicarbonate = query.value("bicarbonate").toDouble(); + ui->hcoEdit->setValue(query.value("bicarbonate").toDouble()); + sulfate = query.value("sulfate").toDouble(); + ui->so4Edit->setValue(query.value("sulfate").toDouble()); + chloride = query.value("chloride").toDouble(); + ui->clEdit->setValue(query.value("chloride").toDouble()); + sodium = query.value("sodium").toDouble(); + ui->naEdit->setValue(query.value("sodium").toDouble()); + magnesium = query.value("magnesium").toDouble(); + ui->mgEdit->setValue(query.value("magnesium").toDouble()); + ph = query.value("ph").toDouble(); + ui->phEdit->setValue(query.value("ph").toDouble()); + ui->notesEdit->setPlainText(query.value("notes").toString()); + total_alkalinity = query.value("total_alkalinity").toDouble(); + ui->alkalinityEdit->setValue(query.value("total_alkalinity").toDouble()); } else { /* Set some defaults */ + calcium = bicarbonate = sulfate = chloride = 0; + sodium = magnesium = total_alkalinity = 0; + ph = 7.0; ui->phEdit->setValue(7.0); } + ui->saveButton->setEnabled(false); + ui->deleteButton->setEnabled((id >= 0) ? true:false); WaterSet(); connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditProfileWater::is_changed); - connect(ui->caEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->hcoEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::hco_changed); - connect(ui->so4Edit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->clEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->naEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->mgEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->phEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::water_changed); - connect(ui->alkalinityEdit, &QDoubleSpinBox::textChanged, this, &EditProfileWater::alkalinity_changed); + connect(ui->caEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::calcium_changed); + connect(ui->so4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::sulfate_changed); + connect(ui->clEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::chloride_changed); + connect(ui->naEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::sodium_changed); + connect(ui->mgEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::magnesium_changed); + connect(ui->phEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::ph_changed); + connect(ui->alkalinityEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditProfileWater::total_alkalinity_changed); connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); - - ui->saveButton->setEnabled(false); - ui->deleteButton->setEnabled((id >= 0) ? true:false); } @@ -81,10 +92,10 @@ { QString txt; - if (this->recno < 0) { + if (recno < 0) { txt = QString(tr("BMSapp - Add new brewing water")); } else { - txt = QString(tr("BMSapp - Edit brewing water %1").arg(this->recno)); + txt = QString(tr("BMSapp - Edit brewing water %1").arg(recno)); } if (this->textIsChanged) { @@ -105,7 +116,7 @@ } if (this->textIsChanged) { - if (this->recno == -1) { + if (recno == -1) { query.prepare("INSERT INTO profile_water SET name=:name, calcium=:ca, " "bicarbonate=:hco, sulfate=:so4, chloride=:cl, sodium=:na, magnesium=:mg, ph=:ph, notes=:notes, " "total_alkalinity=:alkalinity, uuid = :uuid"); @@ -115,16 +126,16 @@ "total_alkalinity=:alkalinity WHERE record = :recno"); } query.bindValue(":name", ui->nameEdit->text()); - query.bindValue(":ca", QString("%1").arg(ui->caEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":hco", QString("%1").arg(ui->hcoEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":so4", QString("%1").arg(ui->so4Edit->value(), 2, 'f', 1, '0')); - query.bindValue(":cl", QString("%1").arg(ui->clEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":na", QString("%1").arg(ui->naEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":mg", QString("%1").arg(ui->mgEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":ph", QString("%1").arg(ui->phEdit->value(), 3, 'f', 2, '0')); + query.bindValue(":ca", round(calcium * 1000) / 1000); + query.bindValue(":hco", round(bicarbonate * 1000) / 1000); + query.bindValue(":so4", round(sulfate * 1000) / 1000); + query.bindValue(":cl", round(chloride * 1000) / 1000); + query.bindValue(":na", round(sodium * 1000) / 1000); + query.bindValue(":mg", round(magnesium * 1000) / 1000); + query.bindValue(":ph", round(ph * 1000) / 1000); query.bindValue(":notes", ui->notesEdit->toPlainText()); - query.bindValue(":alkalinity", QString("%1").arg(ui->alkalinityEdit->value(), 2, 'f', 1, '0')); - if (this->recno == -1) { + query.bindValue(":alkalinity", round(total_alkalinity * 1000) / 1000); + if (recno == -1) { query.bindValue(":uuid", QUuid::createUuid().toString().mid(1, 36)); } else { query.bindValue(":recno", this->recno); @@ -173,12 +184,21 @@ void EditProfileWater::WaterSet() { - double cations, anions, balance; + double CO3 = total_alkalinity * pow(10, ph - 10.33) / (1+2* pow(10, ph - 10.33)) * MMCO3 / (MMCaCO3 / 2); + double t_bicarbonate = Utils::Bicarbonate(total_alkalinity, ph); + qDebug() << t_bicarbonate << bicarbonate; + if ((round(t_bicarbonate * 1000) / 1000) != bicarbonate) + is_changed(); + bicarbonate = t_bicarbonate; + ui->hcoEdit->setValue(bicarbonate); - cations = (ui->caEdit->value() / 20.039) + (ui->mgEdit->value() / 12.1525) + (ui->naEdit->value() / 22.989); - anions = (ui->hcoEdit->value() / 61.016) + (ui->so4Edit->value() / 48.031) + (ui->clEdit->value() / 35.4527); - balance = round((cations - anions) * 100) / 100; + double cations = (2*calcium / MMCa) + (2*magnesium / MMMg) + (sodium / MMNa); + double anions = (bicarbonate / MMHCO3) + (2*CO3 / MMCO3) + (2*sulfate / MMSO4) + (chloride / MMCl); + double balance = round((cations - anions) * 100) / 100; ui->balanceEdit->setValue(balance); + ui->co3Edit->setValue(CO3); + ui->hardnessEdit->setValue(Utils::Hardness(calcium, magnesium)); + ui->raEdit->setValue(Utils::ResidualAlkalinity(total_alkalinity, calcium, magnesium)); if (balance <= 0.1 && balance >= -0.1) { ui->balanceIcon->setPixmap(QPixmap(":icons/silk/tick.png")); @@ -206,16 +226,51 @@ } -void EditProfileWater::hco_changed() +void EditProfileWater::calcium_changed(double val) +{ + calcium = val; + water_changed(); +} + + +void EditProfileWater::total_alkalinity_changed(double val) { - ui->alkalinityEdit->setValue(ui->hcoEdit->value() * 50 / 61); + total_alkalinity = val; + water_changed(); +} + + +void EditProfileWater::sulfate_changed(double val) +{ + sulfate = val; water_changed(); } -void EditProfileWater::alkalinity_changed() +void EditProfileWater::chloride_changed(double val) +{ + chloride = val; + water_changed(); +} + + +void EditProfileWater::sodium_changed(double val) { - ui->hcoEdit->setValue(ui->alkalinityEdit->value() * 1.22); + sodium = val; + water_changed(); +} + + +void EditProfileWater::magnesium_changed(double val) +{ + magnesium = val; + water_changed(); +} + + +void EditProfileWater::ph_changed(double val) +{ + ph = val; water_changed(); } diff -r fcf222cabb98 -r 324a7268796b src/EditProfileWater.h --- a/src/EditProfileWater.h Tue Jul 12 16:01:49 2022 +0200 +++ b/src/EditProfileWater.h Sat Jul 16 15:06:40 2022 +0200 @@ -25,13 +25,19 @@ void on_deleteButton_clicked(); void is_changed(); void water_changed(); - void hco_changed(); - void alkalinity_changed(); + void calcium_changed(double val); + void total_alkalinity_changed(double val); + void sulfate_changed(double val); + void chloride_changed(double val); + void sodium_changed(double val); + void magnesium_changed(double val); + void ph_changed(double val); private: Ui::EditProfileWater *ui; int recno; bool textIsChanged = false; + double calcium, bicarbonate, sulfate, chloride, sodium, magnesium, ph, total_alkalinity; void WindowTitle(); void WaterSet(); diff -r fcf222cabb98 -r 324a7268796b src/EditWater.cpp --- a/src/EditWater.cpp Tue Jul 12 16:01:49 2022 +0200 +++ b/src/EditWater.cpp Sat Jul 16 15:06:40 2022 +0200 @@ -16,6 +16,8 @@ */ #include "EditWater.h" #include "../ui/ui_EditWater.h" +#include "global.h" +#include "Utils.h" #include "MainWindow.h" @@ -35,42 +37,52 @@ query.exec(); query.next(); - ui->nameEdit->setText(query.value(1).toString()); - ui->unlimitedEdit->setChecked(query.value(2).toInt() ? true:false); - ui->caEdit->setValue(query.value(3).toDouble()); - ui->hcoEdit->setValue(query.value(4).toDouble()); - ui->so4Edit->setValue(query.value(5).toDouble()); - ui->clEdit->setValue(query.value(6).toDouble()); - ui->naEdit->setValue(query.value(7).toDouble()); - ui->mgEdit->setValue(query.value(8).toDouble()); - ui->phEdit->setValue(query.value(9).toDouble()); - ui->notesEdit->setPlainText(query.value(10).toString()); - ui->alkalinityEdit->setValue(query.value(11).toDouble()); - ui->inventoryEdit->setValue(query.value(12).toDouble()); - ui->costEdit->setValue(query.value(13).toDouble()); - ui->noEdit->setValue(query.value(15).toDouble()); + ui->nameEdit->setText(query.value("name").toString()); + ui->unlimitedEdit->setChecked(query.value("unlimited_stock").toInt() ? true:false); + calcium = query.value("calcium").toDouble(); + ui->caEdit->setValue(query.value("calcium").toDouble()); + bicarbonate = query.value("bicarbonate").toDouble(); + ui->hcoEdit->setValue(query.value("bicarbonate").toDouble()); + sulfate = query.value("sulfate").toDouble(); + ui->so4Edit->setValue(query.value("sulfate").toDouble()); + chloride = query.value("chloride").toDouble(); + ui->clEdit->setValue(query.value("chloride").toDouble()); + sodium = query.value("sodium").toDouble(); + ui->naEdit->setValue(query.value("sodium").toDouble()); + magnesium = query.value("magnesium").toDouble(); + ui->mgEdit->setValue(query.value("magnesium").toDouble()); + ph = query.value("ph").toDouble(); + ui->phEdit->setValue(query.value("ph").toDouble()); + ui->notesEdit->setPlainText(query.value("notes").toString()); + total_alkalinity = query.value("total_alkalinity").toDouble(); + ui->alkalinityEdit->setValue(query.value("total_alkalinity").toDouble()); + ui->inventoryEdit->setValue(query.value("inventory").toDouble()); + ui->costEdit->setValue(query.value("cost").toDouble()); + nitrate = query.value("nitrate").toDouble(); + ui->noEdit->setValue(query.value("nitrate").toDouble()); } else { /* Set some defaults */ + calcium = bicarbonate = sulfate = chloride = 0; + sodium = magnesium = total_alkalinity = nitrate = 0; + ph = 7.0; ui->phEdit->setValue(7.0); } + ui->saveButton->setEnabled(false); + ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); WaterSet(); connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditWater::is_changed); connect(ui->unlimitedEdit, &QCheckBox::stateChanged, this, &EditWater::is_changed); - connect(ui->caEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->hcoEdit, &QDoubleSpinBox::textChanged, this, &EditWater::hco_changed); - connect(ui->so4Edit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->clEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->naEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->mgEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->phEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - connect(ui->alkalinityEdit, &QDoubleSpinBox::textChanged, this, &EditWater::alkalinity_changed); + connect(ui->caEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::calcium_changed); + connect(ui->so4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::sulfate_changed); + connect(ui->clEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::chloride_changed); + connect(ui->naEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::sodium_changed); + connect(ui->mgEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::magnesium_changed); + connect(ui->phEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::ph_changed); + connect(ui->alkalinityEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::total_alkalinity_changed); connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditWater::is_changed); connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditWater::is_changed); - connect(ui->noEdit, &QDoubleSpinBox::textChanged, this, &EditWater::water_changed); - - ui->saveButton->setEnabled(false); - ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); + connect(ui->noEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditWater::nitrate_changed); } @@ -89,10 +101,10 @@ { QString txt; - if (this->recno < 0) { + if (recno < 0) { txt = QString(tr("BMSapp - Add new brewing water")); } else { - txt = QString(tr("BMSapp - Edit brewing water %1").arg(this->recno)); + txt = QString(tr("BMSapp - Edit brewing water %1").arg(recno)); } if (this->textIsChanged) { @@ -124,22 +136,22 @@ } query.bindValue(":name", ui->nameEdit->text()); query.bindValue(":unlimited", ui->unlimitedEdit->isChecked() ? 1:0); - query.bindValue(":ca", QString("%1").arg(ui->caEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":hco", QString("%1").arg(ui->hcoEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":so4", QString("%1").arg(ui->so4Edit->value(), 2, 'f', 1, '0')); - query.bindValue(":cl", QString("%1").arg(ui->clEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":na", QString("%1").arg(ui->naEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":mg", QString("%1").arg(ui->mgEdit->value(), 2, 'f', 1, '0')); - query.bindValue(":ph", QString("%1").arg(ui->phEdit->value(), 3, 'f', 2, '0')); + query.bindValue(":ca", round(calcium * 1000) / 1000); + query.bindValue(":hco", round(bicarbonate * 1000) / 1000); + query.bindValue(":so4", round(sulfate * 1000) / 1000); + query.bindValue(":cl", round(chloride * 1000) / 1000); + query.bindValue(":na", round(sodium * 1000) / 1000); + query.bindValue(":mg", round(magnesium * 1000) / 1000); + query.bindValue(":ph", round(ph * 1000) / 1000); query.bindValue(":notes", ui->notesEdit->toPlainText()); - query.bindValue(":alkalinity", QString("%1").arg(ui->alkalinityEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":alkalinity", round(total_alkalinity * 1000) / 1000); query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value(), 2, 'f', 1, '0')); query.bindValue(":cost", QString("%1").arg(ui->costEdit->value(), 6, 'f', 5, '0')); - query.bindValue(":no", QString("%1").arg(ui->noEdit->value(), 3, 'f', 2, '0')); - if (this->recno == -1) { + query.bindValue(":no", round(nitrate * 1000) / 1000); + if (recno == -1) { query.bindValue(":uuid", QUuid::createUuid().toString().mid(1, 36)); } else { - query.bindValue(":recno", this->recno); + query.bindValue(":recno", recno); } query.exec(); if (query.lastError().isValid()) { @@ -185,18 +197,21 @@ void EditWater::WaterSet() { - double cations, anions, balance; + double CO3 = total_alkalinity * pow(10, ph - 10.33) / (1+2* pow(10, ph - 10.33)) * MMCO3 / (MMCaCO3 / 2); + double t_bicarbonate = Utils::Bicarbonate(total_alkalinity, ph); + qDebug() << t_bicarbonate << bicarbonate; + if ((round(t_bicarbonate * 1000) / 1000) != bicarbonate) + is_changed(); + bicarbonate = t_bicarbonate; + ui->hcoEdit->setValue(bicarbonate); - double CaCO3 = ui->hcoEdit->value() / 1.22; - double pH = ui->phEdit->value(); - double CO3 = ((CaCO3 / 50) / (1+(2* pow(10, pH - 10.33))) * pow(10, pH - 10.33)) * 60; - cations = (ui->caEdit->value() / 20.039) + (ui->mgEdit->value() / 12.1525) + (ui->naEdit->value() / 22.989); - anions = (ui->hcoEdit->value() / 61.016) + (CO3 / 30) + (ui->so4Edit->value() / 48.031) + - (ui->clEdit->value() / 35.4527) + (ui->noEdit->value() / 62.0049); - balance = round((cations - anions) * 100) / 100; + double cations = (2*calcium / MMCa) + (2*magnesium / MMMg) + (sodium / MMNa); + double anions = (bicarbonate / MMHCO3) + (2*CO3 / MMCO3) + (2*sulfate / MMSO4) + (chloride / MMCl) + (nitrate / MMNO3); + double balance = round((cations - anions) * 100) / 100; ui->balanceEdit->setValue(balance); ui->co3Edit->setValue(CO3); - //qDebug() << A13 << B13 << CO3; + ui->hardnessEdit->setValue(Utils::Hardness(calcium, magnesium)); + ui->raEdit->setValue(Utils::ResidualAlkalinity(total_alkalinity, calcium, magnesium)); if (balance <= 0.1 && balance >= -0.1) { ui->balanceIcon->setPixmap(QPixmap(":icons/silk/tick.png")); @@ -224,16 +239,58 @@ } -void EditWater::hco_changed() +void EditWater::calcium_changed(double val) +{ + calcium = val; + water_changed(); +} + + +void EditWater::total_alkalinity_changed(double val) { - ui->alkalinityEdit->setValue(ui->hcoEdit->value() * 50 / 61); + total_alkalinity = val; + water_changed(); +} + + +void EditWater::sulfate_changed(double val) +{ + sulfate = val; water_changed(); } -void EditWater::alkalinity_changed() +void EditWater::chloride_changed(double val) +{ + chloride = val; + water_changed(); +} + + +void EditWater::sodium_changed(double val) +{ + sodium = val; + water_changed(); +} + + +void EditWater::magnesium_changed(double val) { - ui->hcoEdit->setValue(ui->alkalinityEdit->value() * 1.22); + magnesium = val; + water_changed(); +} + + +void EditWater::ph_changed(double val) +{ + ph = val; + water_changed(); +} + + +void EditWater::nitrate_changed(double val) +{ + nitrate = val; water_changed(); } diff -r fcf222cabb98 -r 324a7268796b src/EditWater.h --- a/src/EditWater.h Tue Jul 12 16:01:49 2022 +0200 +++ b/src/EditWater.h Sat Jul 16 15:06:40 2022 +0200 @@ -25,13 +25,20 @@ void on_deleteButton_clicked(); void is_changed(); void water_changed(); - void hco_changed(); - void alkalinity_changed(); + void calcium_changed(double val); + void total_alkalinity_changed(double val); + void sulfate_changed(double val); + void chloride_changed(double val); + void sodium_changed(double val); + void magnesium_changed(double val); + void ph_changed(double val); + void nitrate_changed(double val); private: Ui::EditWater *ui; int recno; bool textIsChanged = false; + double calcium, bicarbonate, sulfate, chloride, sodium, magnesium, ph, total_alkalinity, nitrate; void WindowTitle(); void WaterSet(); diff -r fcf222cabb98 -r 324a7268796b ui/EditProfileWater.ui --- a/ui/EditProfileWater.ui Tue Jul 12 16:01:49 2022 +0200 +++ b/ui/EditProfileWater.ui Sat Jul 16 15:06:40 2022 +0200 @@ -198,7 +198,7 @@ - Acid pH: + pH: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -316,7 +316,7 @@ - 730 + 510 150 121 24 @@ -344,7 +344,7 @@ - 730 + 510 180 121 24 @@ -372,17 +372,23 @@ - 730 + 850 210 - 121 + 111 24 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + + + QAbstractSpinBox::NoButtons + - true + false 1 @@ -400,8 +406,8 @@ - 730 - 240 + 510 + 210 121 24 @@ -428,7 +434,7 @@ - 730 + 510 290 111 24 @@ -462,9 +468,9 @@ - 540 + 300 150 - 181 + 201 20 @@ -478,9 +484,9 @@ - 570 + 300 180 - 151 + 201 20 @@ -494,7 +500,7 @@ - 530 + 650 210 191 20 @@ -510,14 +516,14 @@ - 530 - 240 - 191 + 300 + 210 + 201 20 - Alkalinity (CaCO3) mg/L: + Total Alkalinity (CaCO3) mg/L: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -526,7 +532,7 @@ - 540 + 320 290 181 20 @@ -542,7 +548,7 @@ - 860 + 630 290 56 20 @@ -552,6 +558,156 @@ :/icons/silk/tick.png + + + + 650 + 180 + 191 + 20 + + + + Residual Alkalinity as CaCO3: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 850 + 180 + 111 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 0 + + + 1000.000000000000000 + + + 0.100000000000000 + + + QAbstractSpinBox::DefaultStepType + + + + + + 850 + 150 + 111 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 1 + + + 1000.000000000000000 + + + 0.100000000000000 + + + QAbstractSpinBox::DefaultStepType + + + + + + 650 + 150 + 191 + 20 + + + + Hardness as CaCO3: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 850 + 240 + 111 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 1 + + + 1000.000000000000000 + + + 0.100000000000000 + + + QAbstractSpinBox::DefaultStepType + + + + + + 650 + 240 + 191 + 20 + + + + Carbonate (CO3) mg/L: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + diff -r fcf222cabb98 -r 324a7268796b ui/EditWater.ui --- a/ui/EditWater.ui Tue Jul 12 16:01:49 2022 +0200 +++ b/ui/EditWater.ui Sat Jul 16 15:06:40 2022 +0200 @@ -292,7 +292,7 @@ - Acid pH: + pH: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -440,7 +440,7 @@ 510 - 210 + 150 121 24 @@ -468,7 +468,7 @@ 510 - 240 + 180 121 24 @@ -495,17 +495,23 @@ - 510 - 150 - 121 + 850 + 210 + 111 24 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + + + QAbstractSpinBox::NoButtons + - true + false 1 @@ -513,9 +519,6 @@ 1000.000000000000000 - - 0.100000000000000 - QAbstractSpinBox::DefaultStepType @@ -523,8 +526,8 @@ - 770 - 150 + 510 + 210 121 24 @@ -585,9 +588,9 @@ - 320 - 210 - 181 + 300 + 150 + 201 20 @@ -601,9 +604,9 @@ - 350 - 240 - 151 + 300 + 180 + 201 20 @@ -617,8 +620,8 @@ - 310 - 150 + 650 + 210 191 20 @@ -633,14 +636,14 @@ - 640 - 150 - 121 + 300 + 210 + 201 20 - or (CaCO3) mg/L: + Total Alkalinity (CaCO3) mg/L: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -656,7 +659,7 @@ - Ion balance meq/L: + Ion balance mEq/L: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -678,9 +681,9 @@ - 350 - 270 - 151 + 300 + 240 + 201 20 @@ -695,7 +698,7 @@ 510 - 270 + 240 121 24 @@ -722,9 +725,9 @@ - 320 - 180 - 181 + 650 + 240 + 191 20 @@ -738,9 +741,9 @@ - 510 - 180 - 106 + 850 + 240 + 111 24 @@ -769,6 +772,106 @@ QAbstractSpinBox::DefaultStepType + + + + 650 + 150 + 191 + 20 + + + + Hardness as CaCO3: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 650 + 180 + 191 + 20 + + + + Residual Alkalinity as CaCO3: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 850 + 150 + 111 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 1 + + + 1000.000000000000000 + + + 0.100000000000000 + + + QAbstractSpinBox::DefaultStepType + + + + + + 850 + 180 + 111 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + QAbstractSpinBox::NoButtons + + + false + + + 0 + + + 1000.000000000000000 + + + 0.100000000000000 + + + QAbstractSpinBox::DefaultStepType + +