118 /* Add the Delete row button */ |
118 /* Add the Delete row button */ |
119 pWidget = new QWidget(); |
119 pWidget = new QWidget(); |
120 QPushButton* btn_dele = new QPushButton(); |
120 QPushButton* btn_dele = new QPushButton(); |
121 btn_dele->setObjectName(QString("%1").arg(i)); /* Send row with the button */ |
121 btn_dele->setObjectName(QString("%1").arg(i)); /* Send row with the button */ |
122 btn_dele->setText(tr("Delete")); |
122 btn_dele->setText(tr("Delete")); |
123 connect(btn_dele, SIGNAL(clicked()), this, SLOT(on_deleteHopRow_clicked())); |
123 connect(btn_dele, SIGNAL(clicked()), this, SLOT(deleteHopRow_clicked())); |
124 pLayout = new QHBoxLayout(pWidget); |
124 pLayout = new QHBoxLayout(pWidget); |
125 pLayout->addWidget(btn_dele); |
125 pLayout->addWidget(btn_dele); |
126 pLayout->setContentsMargins(5, 0, 5, 0); |
126 pLayout->setContentsMargins(5, 0, 5, 0); |
127 pWidget->setLayout(pLayout); |
127 pWidget->setLayout(pLayout); |
128 ui->hopsTable->setCellWidget(i, 9, pWidget); |
128 ui->hopsTable->setCellWidget(i, 9, pWidget); |
129 |
129 |
130 pWidget = new QWidget(); |
130 pWidget = new QWidget(); |
131 QPushButton* btn_edit = new QPushButton(); |
131 QPushButton* btn_edit = new QPushButton(); |
132 btn_edit->setObjectName(QString("%1").arg(i)); /* Send row with the button */ |
132 btn_edit->setObjectName(QString("%1").arg(i)); /* Send row with the button */ |
133 btn_edit->setText(tr("Edit")); |
133 btn_edit->setText(tr("Edit")); |
134 connect(btn_edit, SIGNAL(clicked()), this, SLOT(on_editHopRow_clicked())); |
134 connect(btn_edit, SIGNAL(clicked()), this, SLOT(editHopRow_clicked())); |
135 pLayout = new QHBoxLayout(pWidget); |
135 pLayout = new QHBoxLayout(pWidget); |
136 pLayout->addWidget(btn_edit); |
136 pLayout->addWidget(btn_edit); |
137 pLayout->setContentsMargins(5, 0, 5, 0); |
137 pLayout->setContentsMargins(5, 0, 5, 0); |
138 pWidget->setLayout(pLayout); |
138 pWidget->setLayout(pLayout); |
139 ui->hopsTable->setCellWidget(i, 10, pWidget); |
139 ui->hopsTable->setCellWidget(i, 10, pWidget); |
140 } |
140 } |
141 this->ignoreChanges = false; |
141 this->ignoreChanges = false; |
142 } |
142 } |
143 |
143 |
144 |
144 |
145 void EditRecipe::on_Flavour_valueChanged(int value) |
145 void EditRecipe::hop_Flavour_valueChanged(int value) |
146 { |
146 { |
147 if (value < 20) { |
147 if (value < 20) { |
148 ui->hop_tasteShow->setStyleSheet(bar_20); |
148 ui->hop_tasteShow->setStyleSheet(bar_20); |
149 ui->hop_tasteShow->setFormat(tr("Very low")); |
149 ui->hop_tasteShow->setFormat(tr("Very low")); |
150 } else if (value < 40) { |
150 } else if (value < 40) { |