182 |
182 |
183 grainLabel = new QLabel(topWidget); |
183 grainLabel = new QLabel(topWidget); |
184 grainLabel->setObjectName(QString::fromUtf8("grainLabel")); |
184 grainLabel->setObjectName(QString::fromUtf8("grainLabel")); |
185 grainLabel->setGeometry(QRect(400, 120, 161, 20)); |
185 grainLabel->setGeometry(QRect(400, 120, 161, 20)); |
186 grainLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
186 grainLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
187 grainLabel->setText(tr("Grain Absorbtion:")); |
187 grainLabel->setText(tr("Grain Absorption:")); |
188 |
188 |
189 brixLabel = new QLabel(topWidget); |
189 brixLabel = new QLabel(topWidget); |
190 brixLabel->setObjectName(QString::fromUtf8("brixLabel")); |
190 brixLabel->setObjectName(QString::fromUtf8("brixLabel")); |
191 brixLabel->setGeometry(QRect(400, 150, 161, 20)); |
191 brixLabel->setGeometry(QRect(400, 150, 161, 20)); |
192 brixLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
192 brixLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
242 grainEdit->setMinimum(0.500000000000000); |
242 grainEdit->setMinimum(0.500000000000000); |
243 grainEdit->setMaximum(1.100000000000000); |
243 grainEdit->setMaximum(1.100000000000000); |
244 grainEdit->setSingleStep(0.010000000000000); |
244 grainEdit->setSingleStep(0.010000000000000); |
245 grainEdit->setStepType(QAbstractSpinBox::DefaultStepType); |
245 grainEdit->setStepType(QAbstractSpinBox::DefaultStepType); |
246 grainEdit->setValue(1.000000000000000); |
246 grainEdit->setValue(1.000000000000000); |
247 grainEdit->setToolTip(tr("Absorbtion with water by the grain (L/Kg)")); |
247 grainEdit->setToolTip(tr("Absorption with water by the grain (L/Kg)")); |
248 grainEdit->setSuffix(tr(" L/Kg")); |
248 grainEdit->setSuffix(tr(" L/Kg")); |
249 |
249 |
250 brixEdit = new QDoubleSpinBox(topWidget); |
250 brixEdit = new QDoubleSpinBox(topWidget); |
251 brixEdit->setObjectName(QString::fromUtf8("brixEdit")); |
251 brixEdit->setObjectName(QString::fromUtf8("brixEdit")); |
252 brixEdit->setGeometry(QRect(580, 150, 101, 24)); |
252 brixEdit->setGeometry(QRect(580, 150, 101, 24)); |
365 connect(leafEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
365 connect(leafEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
366 connect(wethopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
366 connect(wethopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
367 connect(cryohopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
367 connect(cryohopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
368 connect(extractEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
368 connect(extractEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
369 |
369 |
370 grainEdit->setValue(query.value("grain_absorbtion").toDouble()); |
370 grainEdit->setValue(query.value("grain_absorption").toDouble()); |
371 brixEdit->setValue(query.value("brix_correction").toDouble()); |
371 brixEdit->setValue(query.value("brix_correction").toDouble()); |
372 heightEdit->setValue(query.value("brewery_height").toInt()); |
372 heightEdit->setValue(query.value("brewery_height").toInt()); |
373 connect(grainEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
373 connect(grainEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
374 connect(brixEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
374 connect(brixEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed); |
375 connect(heightEdit, &QSpinBox::textChanged, this, &Setup::is_changed); |
375 connect(heightEdit, &QSpinBox::textChanged, this, &Setup::is_changed); |
509 * Update all other data |
509 * Update all other data |
510 */ |
510 */ |
511 query.prepare("UPDATE profile_setup SET brewery_name=:brewery, brewery_logo=:logo, factor_mashhop=:mashhop, factor_fwh=:fwh, " |
511 query.prepare("UPDATE profile_setup SET brewery_name=:brewery, brewery_logo=:logo, factor_mashhop=:mashhop, factor_fwh=:fwh, " |
512 "ut_pellet=:pellet, ut_plug=:plug, ut_leaf=:leaf, ut_wethop=:wet, ut_t45=:cryo, ut_co2extract=:extract, " |
512 "ut_pellet=:pellet, ut_plug=:plug, ut_leaf=:leaf, ut_wethop=:wet, ut_t45=:cryo, ut_co2extract=:extract, " |
513 "color_method=:color, ibu_method=:ibu, " |
513 "color_method=:color, ibu_method=:ibu, " |
514 "brix_correction=:brix, grain_absorbtion=:grain, default_water=:water, my_yeastlab=:yeast, " |
514 "brix_correction=:brix, grain_absorption=:grain, default_water=:water, my_yeastlab=:yeast, " |
515 "brewery_height=:height WHERE record='1'"); |
515 "brewery_height=:height WHERE record='1'"); |
516 query.bindValue(":brewery", this->breweryEdit->text()); |
516 query.bindValue(":brewery", this->breweryEdit->text()); |
517 query.bindValue(":logo", logoByteArray); |
517 query.bindValue(":logo", logoByteArray); |
518 query.bindValue(":mashhop", this->mashhopEdit->value()); |
518 query.bindValue(":mashhop", this->mashhopEdit->value()); |
519 query.bindValue(":fwh", this->fwhEdit->value()); |
519 query.bindValue(":fwh", this->fwhEdit->value()); |