100 while (query.next()) { |
100 while (query.next()) { |
101 ui->bottle_sugarEdit->addItem(query.value(0).toString()); |
101 ui->bottle_sugarEdit->addItem(query.value(0).toString()); |
102 ui->keg_sugarEdit->addItem(query.value(0).toString()); |
102 ui->keg_sugarEdit->addItem(query.value(0).toString()); |
103 } |
103 } |
104 |
104 |
|
105 for (int i = 0; i < 7; i++) |
|
106 ui->image_typeEdit->addItem(QCoreApplication::translate("PicType", g_prod_pic_types[i])); |
|
107 |
105 ui->spargeGroup->setId(ui->w1_spButton, 0); |
108 ui->spargeGroup->setId(ui->w1_spButton, 0); |
106 ui->spargeGroup->setId(ui->w2_spButton, 1); |
109 ui->spargeGroup->setId(ui->w2_spButton, 1); |
107 ui->spargeGroup->setId(ui->wg_spButton, 2); |
110 ui->spargeGroup->setId(ui->wg_spButton, 2); |
|
111 |
|
112 |
108 |
113 |
109 if (id >= 0) { |
114 if (id >= 0) { |
110 if (! DB_product::load(product, this, id)) |
115 if (! DB_product::load(product, this, id)) |
111 return; |
116 return; |
112 qInfo() << "EditProduct" << product->code << "," << product->name; |
117 qInfo() << "EditProduct" << product->code << "," << product->name; |
762 connect(ui->delImage, SIGNAL(clicked()), this, SLOT(delImage_clicked())); |
767 connect(ui->delImage, SIGNAL(clicked()), this, SLOT(delImage_clicked())); |
763 connect(ui->nextImage, SIGNAL(clicked()), this, SLOT(nextImage_clicked())); |
768 connect(ui->nextImage, SIGNAL(clicked()), this, SLOT(nextImage_clicked())); |
764 connect(ui->prevImage, SIGNAL(clicked()), this, SLOT(prevImage_clicked())); |
769 connect(ui->prevImage, SIGNAL(clicked()), this, SLOT(prevImage_clicked())); |
765 connect(ui->downloadImage, SIGNAL(clicked()), this, SLOT(downloadImage_clicked())); |
770 connect(ui->downloadImage, SIGNAL(clicked()), this, SLOT(downloadImage_clicked())); |
766 connect(ui->printImage, SIGNAL(clicked()), this, SLOT(printImage_clicked())); |
771 connect(ui->printImage, SIGNAL(clicked()), this, SLOT(printImage_clicked())); |
|
772 connect(ui->filmStrip, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(selectImage_clicked(QListWidgetItem *))); |
767 |
773 |
768 setStage(); |
774 setStage(); |
769 |
775 |
770 ui->saveButton->setEnabled(false); |
776 ui->saveButton->setEnabled(false); |
771 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false); |
777 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false); |