src/EditProduct.cpp

changeset 467
c5f6f3f1b714
parent 465
8fc909360552
child 468
b21da6f583be
equal deleted inserted replaced
466:68ef2cc3e8d2 467:c5f6f3f1b714
149 if (query.first()) { 149 if (query.first()) {
150 qDebug() << "should update log_co2pressure"; 150 qDebug() << "should update log_co2pressure";
151 } 151 }
152 } 152 }
153 } 153 }
154 product->images_count = -1; /* Not yet loaded */
155 product->images_dirty = false;
154 156
155 } else { 157 } else {
156 /* New product, set some defaults */ 158 /* New product, set some defaults */
157 qInfo() << "EditProduct, start new product"; 159 qInfo() << "EditProduct, start new product";
158 WindowTitle(); 160 WindowTitle();
278 product->yeast_prod_date = QDate(); 280 product->yeast_prod_date = QDate();
279 product->yeast_pitchrate = product->prop_volume[0] = product->prop_volume[1] = product->prop_volume[2] = product->prop_volume[3] = 0; 281 product->yeast_pitchrate = product->prop_volume[0] = product->prop_volume[1] = product->prop_volume[2] = product->prop_volume[3] = 0;
280 product->divide_type = product->divide_parts = product->divide_part = 0; 282 product->divide_type = product->divide_parts = product->divide_part = 0;
281 product->divide_size = 0; 283 product->divide_size = 0;
282 product->divide_factor = 1; 284 product->divide_factor = 1;
285 product->images_count = -1;
286 product->images_dirty = false;
283 } 287 }
284 288
285 // Tab generic. 289 // Tab generic.
286 ui->lockedEdit->setChecked(product->locked); 290 ui->lockedEdit->setChecked(product->locked);
287 ui->st_nameEdit->setText(product->st_name); 291 ui->st_nameEdit->setText(product->st_name);
753 connect(ui->taste_aftertasteEdit, &QLineEdit::textChanged, this, &EditProduct::taste_aftertaste_changed); 757 connect(ui->taste_aftertasteEdit, &QLineEdit::textChanged, this, &EditProduct::taste_aftertaste_changed);
754 connect(ui->taste_notesEdit, SIGNAL(textChanged()), this, SLOT(taste_notes_changed())); 758 connect(ui->taste_notesEdit, SIGNAL(textChanged()), this, SLOT(taste_notes_changed()));
755 759
756 /* All signals from tab Images */ 760 /* All signals from tab Images */
757 connect(ui->addImage, SIGNAL(clicked()), this, SLOT(addImage_clicked())); 761 connect(ui->addImage, SIGNAL(clicked()), this, SLOT(addImage_clicked()));
762 connect(ui->delImage, SIGNAL(clicked()), this, SLOT(delImage_clicked()));
763 connect(ui->nextImage, SIGNAL(clicked()), this, SLOT(nextImage_clicked()));
764 connect(ui->prevImage, SIGNAL(clicked()), this, SLOT(prevImage_clicked()));
765 connect(ui->downloadImage, SIGNAL(clicked()), this, SLOT(downloadImage_clicked()));
766 connect(ui->printImage, SIGNAL(clicked()), this, SLOT(printImage_clicked()));
758 767
759 setStage(); 768 setStage();
760 769
761 ui->saveButton->setEnabled(false); 770 ui->saveButton->setEnabled(false);
762 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false); 771 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false);

mercurial