src/MainWindow.cpp

changeset 337
8133cdb19aa1
parent 332
146874d7bb47
child 357
08f73b616345
equal deleted inserted replaced
336:e97f9e87d94b 337:8133cdb19aa1
124 /* 124 /*
125 * Load dedaults from the setup. 125 * Load dedaults from the setup.
126 */ 126 */
127 QSqlQuery query("SELECT * FROM profile_setup WHERE record='1'"); 127 QSqlQuery query("SELECT * FROM profile_setup WHERE record='1'");
128 query.first(); 128 query.first();
129 my_brewery_name = query.value(1).toString(); 129 my_brewery_name = query.value("brewery_name").toString();
130 my_logoByteArray = query.value(2).toByteArray(); 130 my_logoByteArray = query.value("brewery_logo").toByteArray();
131 my_factor_mashhop = query.value(3).toInt(); 131 my_factor_mashhop = query.value("factor_mashhop").toInt();
132 my_factor_fwh = query.value(4).toInt(); 132 my_factor_fwh = query.value("factor_fwh").toInt();
133 my_factor_pellet = query.value(5).toInt(); 133 my_factor_pellet = query.value("factor_pellet").toInt();
134 my_factor_plug = query.value(6).toInt(); 134 my_factor_plug = query.value("factor_plug").toInt();
135 my_factor_wethop = query.value(7).toInt(); 135 my_factor_wethop = query.value("factor_wethop").toInt();
136 my_factor_cryohop = query.value(8).toInt(); 136 my_factor_cryohop = query.value("factor_cryohop").toInt();
137 my_ibu_method = query.value(9).toInt(); 137 my_ibu_method = query.value("ibu_method").toInt();
138 my_color_method = query.value(10).toInt(); 138 my_color_method = query.value("color_method").toInt();
139 my_brix_correction = query.value(11).toDouble(); 139 my_brix_correction = query.value("brix_correction").toDouble();
140 my_grain_absorbtion = query.value(12).toDouble(); 140 my_grain_absorbtion = query.value("grain_absorbtion").toDouble();
141 my_default_water = query.value(13).toInt(); 141 my_default_water = query.value("default_water").toInt();
142 my_yeastlab = query.value(14).toString(); 142 my_yeastlab = query.value("my_yeastlab").toString();
143 my_height = query.value("brewery_height").toInt();
143 144
144 qInfo() << "loadSetup" << my_brewery_name; 145 qInfo() << "loadSetup" << my_brewery_name;
145 } 146 }
146 147
147 148

mercurial