93 pLayout->addWidget(label); |
93 pLayout->addWidget(label); |
94 pLayout->setAlignment(Qt::AlignCenter); |
94 pLayout->setAlignment(Qt::AlignCenter); |
95 pLayout->setContentsMargins(0, 0, 0, 0); |
95 pLayout->setContentsMargins(0, 0, 0, 0); |
96 pWidget->setLayout(pLayout); |
96 pWidget->setLayout(pLayout); |
97 ui->tableYeasts->setCellWidget(ridx, 7, pWidget); |
97 ui->tableYeasts->setCellWidget(ridx, 7, pWidget); |
|
98 } else { |
|
99 ui->tableYeasts->removeCellWidget(ridx, 7); |
98 } |
100 } |
99 if (query.value(19).toInt()) { |
101 if (query.value(19).toInt()) { |
100 pWidget = new QWidget(); |
102 pWidget = new QWidget(); |
101 label = new QLabel; |
103 label = new QLabel; |
102 label->setPixmap(QPixmap(":icons/silk/tick.png")); |
104 label->setPixmap(QPixmap(":icons/silk/tick.png")); |
104 pLayout->addWidget(label); |
106 pLayout->addWidget(label); |
105 pLayout->setAlignment(Qt::AlignCenter); |
107 pLayout->setAlignment(Qt::AlignCenter); |
106 pLayout->setContentsMargins(0, 0, 0, 0); |
108 pLayout->setContentsMargins(0, 0, 0, 0); |
107 pWidget->setLayout(pLayout); |
109 pWidget->setLayout(pLayout); |
108 ui->tableYeasts->setCellWidget(ridx, 8, pWidget); |
110 ui->tableYeasts->setCellWidget(ridx, 8, pWidget); |
109 } |
111 } else { |
|
112 ui->tableYeasts->removeCellWidget(ridx, 8); |
|
113 } |
110 |
114 |
111 w = QString(""); |
115 w = QString(""); |
112 if (query.value(14).toDouble() > 0) { |
116 if (query.value(14).toDouble() > 0) { |
113 if (query.value(3).toInt() == 0 && query.value(14).toDouble() > 1) { /* Liquid yeast, multiple packs */ |
117 if (query.value(3).toInt() == 0 && query.value(14).toDouble() > 1) { /* Liquid yeast, multiple packs */ |
114 w = QString("%1 packs").arg(query.value(14).toDouble(), 1, 'f', 0, '0'); |
118 w = QString("%1 packs").arg(query.value(14).toDouble(), 1, 'f', 0, '0'); |