14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 */ |
16 */ |
17 #include "Setup.h" |
17 #include "Setup.h" |
18 #include "config.h" |
18 #include "config.h" |
|
19 #include "global.h" |
19 #include "MainWindow.h" |
20 #include "MainWindow.h" |
20 |
21 |
21 |
22 |
22 |
23 |
23 Setup::Setup(QWidget *parent) : QDialog(parent) |
24 Setup::Setup(QWidget *parent) : QDialog(parent) |
319 colorEdit->addItem("Morey"); |
320 colorEdit->addItem("Morey"); |
320 colorEdit->addItem("Mosher"); |
321 colorEdit->addItem("Mosher"); |
321 colorEdit->addItem("Daniels"); |
322 colorEdit->addItem("Daniels"); |
322 colorEdit->addItem("Halberstadt"); |
323 colorEdit->addItem("Halberstadt"); |
323 colorEdit->addItem("Naudts"); |
324 colorEdit->addItem("Naudts"); |
324 colorEdit->setEditable(true); |
|
325 colorEdit->setCurrentIndex(query.value("color_method").toInt()); |
325 colorEdit->setCurrentIndex(query.value("color_method").toInt()); |
326 connect(colorEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed); |
326 connect(colorEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed); |
327 |
327 |
328 ibuEdit->addItem("Tinseth"); |
328 for (int i = 0; i < 3; i++) |
329 ibuEdit->addItem("Rager"); |
329 ibuEdit->addItem(g_ibu_method[i]); |
330 ibuEdit->addItem("Daniels"); |
|
331 ibuEdit->setEditable(true); |
|
332 ibuEdit->setCurrentIndex(query.value("ibu_method").toInt()); |
330 ibuEdit->setCurrentIndex(query.value("ibu_method").toInt()); |
333 connect(ibuEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed); |
331 connect(ibuEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed); |
334 |
332 |
335 QSqlQuery query2("SELECT record,name FROM inventory_waters"); |
333 QSqlQuery query2("SELECT record,name FROM inventory_waters"); |
336 query2.first(); |
334 query2.first(); |