95 connect(ui->substitutesEdit, &QLineEdit::textChanged, this, &EditHop::is_changed); |
95 connect(ui->substitutesEdit, &QLineEdit::textChanged, this, &EditHop::is_changed); |
96 connect(ui->alwaysEdit, &QCheckBox::stateChanged, this, &EditHop::is_changed); |
96 connect(ui->alwaysEdit, &QCheckBox::stateChanged, this, &EditHop::is_changed); |
97 connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
97 connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
98 connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
98 connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
99 connect(ui->prodEdit, &QDateEdit::dateChanged, this, &EditHop::is_changed); |
99 connect(ui->prodEdit, &QDateEdit::dateChanged, this, &EditHop::is_changed); |
|
100 connect(ui->prodButton1, SIGNAL(clicked()), this, SLOT(prod_date_today())); |
|
101 connect(ui->prodButton2, SIGNAL(clicked()), this, SLOT(prod_date_clear())); |
100 connect(ui->thtEdit, &QDateEdit::dateChanged, this, &EditHop::is_changed); |
102 connect(ui->thtEdit, &QDateEdit::dateChanged, this, &EditHop::is_changed); |
|
103 connect(ui->thtButton1, SIGNAL(clicked()), this, SLOT(tht_date_today())); |
|
104 connect(ui->thtButton2, SIGNAL(clicked()), this, SLOT(tht_date_clear())); |
101 connect(ui->oilEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
105 connect(ui->oilEdit, &QDoubleSpinBox::textChanged, this, &EditHop::is_changed); |
102 |
106 |
103 ui->saveButton->setEnabled(false); |
107 ui->saveButton->setEnabled(false); |
104 ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); |
108 ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); |
105 } |
109 } |