src/EditProduct.cpp

changeset 185
405bb68c1ea4
parent 184
da148d6b4c95
child 186
96e239584db5
equal deleted inserted replaced
184:da148d6b4c95 185:405bb68c1ea4
86 query.prepare("SELECT style_guide,style_letter,name FROM profile_styles ORDER BY style_guide,style_letter,name"); 86 query.prepare("SELECT style_guide,style_letter,name FROM profile_styles ORDER BY style_guide,style_letter,name");
87 query.exec(); 87 query.exec();
88 while (query.next()) { 88 while (query.next()) {
89 ui->beerstyleEdit->addItem(query.value(0).toString()+" "+query.value(1).toString()+" "+query.value(2).toString()); 89 ui->beerstyleEdit->addItem(query.value(0).toString()+" "+query.value(1).toString()+" "+query.value(2).toString());
90 } 90 }
91
92 ui->brew_coolwithEdit->addItem("-");
93 ui->brew_coolwithEdit->addItem(tr("Emersion chiller"));
94 ui->brew_coolwithEdit->addItem(tr("Counterflow chiller"));
95 ui->brew_coolwithEdit->addItem(tr("Au bain marie"));
96 ui->brew_coolwithEdit->addItem(tr("Natural"));
97
98 ui->brew_aerwithEdit->addItem(tr("None"));
99 ui->brew_aerwithEdit->addItem(tr("Air"));
100 ui->brew_aerwithEdit->addItem(tr("Oxygen"));
91 101
92 if (id >= 0) { 102 if (id >= 0) {
93 query.prepare("SELECT * FROM products WHERE record = :recno"); 103 query.prepare("SELECT * FROM products WHERE record = :recno");
94 query.bindValue(":recno", id); 104 query.bindValue(":recno", id);
95 query.exec(); 105 query.exec();
910 ui->brew_masheffShow->setValue(product->brew_mash_efficiency); 920 ui->brew_masheffShow->setValue(product->brew_mash_efficiency);
911 ui->brew_spargetempShow->setValue(product->sparge_temp); 921 ui->brew_spargetempShow->setValue(product->sparge_temp);
912 ui->brew_spargevolShow->setValue(product->sparge_volume); 922 ui->brew_spargevolShow->setValue(product->sparge_volume);
913 ui->brew_spargeestShow->setValue(product->brew_sparge_est); 923 ui->brew_spargeestShow->setValue(product->brew_sparge_est);
914 ui->brew_spargephEdit->setValue(product->brew_sparge_ph); 924 ui->brew_spargephEdit->setValue(product->brew_sparge_ph);
925 ui->brew_spargephShow->setValue(product->sparge_ph);
915 926
916 ui->brew_boilBox->setTitle(tr("Boiling %1 minutes").arg(product->boil_time)); 927 ui->brew_boilBox->setTitle(tr("Boiling %1 minutes").arg(product->boil_time));
917 ui->brew_preboilphEdit->setValue(product->brew_preboil_ph); 928 ui->brew_preboilphEdit->setValue(product->brew_preboil_ph);
918 ui->brew_preboilsgEdit->setValue(product->brew_preboil_sg); 929 ui->brew_preboilsgEdit->setValue(product->brew_preboil_sg);
919 ui->brew_preboilvolEdit->setValue(product->brew_preboil_volume); 930 ui->brew_preboilvolEdit->setValue(product->brew_preboil_volume);
922 ui->brew_aboilphEdit->setValue(product->brew_aboil_ph); 933 ui->brew_aboilphEdit->setValue(product->brew_aboil_ph);
923 ui->brew_aboilsgEdit->setValue(product->brew_aboil_sg); 934 ui->brew_aboilsgEdit->setValue(product->brew_aboil_sg);
924 ui->brew_aboilvolEdit->setValue(product->brew_aboil_volume); 935 ui->brew_aboilvolEdit->setValue(product->brew_aboil_volume);
925 ui->brew_aboilvolShow->setValue(product->batch_size * 1.04); 936 ui->brew_aboilvolShow->setValue(product->batch_size * 1.04);
926 ui->brew_aboileffShow->setValue(product->brew_aboil_efficiency); 937 ui->brew_aboileffShow->setValue(product->brew_aboil_efficiency);
938 ui->brew_whirlpool9Edit->setValue(product->brew_whirlpool9);
939 ui->brew_whirlpool7Edit->setValue(product->brew_whirlpool7);
940 ui->brew_whirlpool6Edit->setValue(product->brew_whirlpool6);
941 ui->brew_whirlpool2Edit->setValue(product->brew_whirlpool2);
942 ui->brew_cooltoEdit->setValue(product->brew_cooling_to);
943 ui->brew_coolwithEdit->setCurrentIndex(product->brew_cooling_method);
944 ui->brew_cooltimeEdit->setValue(product->brew_cooling_time);
945
946 ui->brew_trublossEdit->setValue(product->brew_fermenter_tcloss);
947 ui->brew_topupwaterEdit->setValue(product->brew_fermenter_extrawater);
948 ui->brew_tofermentEdit->setValue(product->brew_fermenter_volume);
949 ui->brew_fermentsgShow->setValue(product->brew_fermenter_sg);
950 ui->brew_fermentcolorShow->setValue(product->brew_fermenter_color);
951 ui->brew_fermentcolorShow->setStyleSheet(Utils::ebc_to_style(product->brew_fermenter_color));
952 ui->brew_fermentibuShow->setValue(product->brew_fermenter_ibu);
953
954 ui->brew_aerwithEdit->setCurrentIndex(product->brew_aeration_type);
955 ui->brew_aertimeEdit->setValue(product->brew_aeration_time);
956 ui->brew_aerspeedEdit->setValue(product->brew_aeration_speed);
927 957
928 // Tab fermentation. 958 // Tab fermentation.
929 959
930 // Tab packaging. 960 // Tab packaging.
931 961

mercurial