Disable serial passthrough checkboxes when the corresponding port is disabled
This commit is contained in:
@@ -72,8 +72,9 @@ SettingsPorts::SettingsPorts(QWidget *parent)
|
|||||||
if (checkBox != NULL)
|
if (checkBox != NULL)
|
||||||
checkBox->setChecked(com_ports[i].enabled > 0);
|
checkBox->setChecked(com_ports[i].enabled > 0);
|
||||||
if (checkBoxPass != NULL) {
|
if (checkBoxPass != NULL) {
|
||||||
|
checkBoxPass->setEnabled(com_ports[i].enabled > 0);
|
||||||
checkBoxPass->setChecked(serial_passthrough_enabled[i]);
|
checkBoxPass->setChecked(serial_passthrough_enabled[i]);
|
||||||
buttonPass->setEnabled(serial_passthrough_enabled[i]);
|
buttonPass->setEnabled((com_ports[i].enabled > 0) && serial_passthrough_enabled[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,6 +174,57 @@ SettingsPorts::on_pushButtonSerialPassThru7_clicked()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial1_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru1->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru1->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru1->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial2_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru2->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru2->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru2->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial3_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru3->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru3->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru3->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial4_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru4->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru4->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru4->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial5_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru5->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru5->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru5->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial6_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru6->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru6->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru6->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SettingsPorts::on_checkBoxSerial7_stateChanged(int state)
|
||||||
|
{
|
||||||
|
ui->checkBoxSerialPassThru7->setEnabled(state == Qt::Checked);
|
||||||
|
ui->pushButtonSerialPassThru7->setEnabled((state == Qt::Checked) && ui->checkBoxSerialPassThru7->isChecked());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
SettingsPorts::on_checkBoxSerialPassThru1_stateChanged(int state)
|
SettingsPorts::on_checkBoxSerialPassThru1_stateChanged(int state)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ public:
|
|||||||
|
|
||||||
void save();
|
void save();
|
||||||
|
|
||||||
#if 0
|
|
||||||
private slots:
|
private slots:
|
||||||
|
#if 0
|
||||||
void on_checkBoxSerialPassThru7_stateChanged(int state);
|
void on_checkBoxSerialPassThru7_stateChanged(int state);
|
||||||
void on_checkBoxSerialPassThru6_stateChanged(int state);
|
void on_checkBoxSerialPassThru6_stateChanged(int state);
|
||||||
void on_checkBoxSerialPassThru5_stateChanged(int state);
|
void on_checkBoxSerialPassThru5_stateChanged(int state);
|
||||||
@@ -27,7 +27,16 @@ private slots:
|
|||||||
void on_checkBoxSerialPassThru2_stateChanged(int state);
|
void on_checkBoxSerialPassThru2_stateChanged(int state);
|
||||||
void on_checkBoxSerialPassThru1_stateChanged(int state);
|
void on_checkBoxSerialPassThru1_stateChanged(int state);
|
||||||
|
|
||||||
private slots:
|
#if 0
|
||||||
|
void on_checkBoxSerial7_stateChanged(int state);
|
||||||
|
void on_checkBoxSerial6_stateChanged(int state);
|
||||||
|
void on_checkBoxSerial5_stateChanged(int state);
|
||||||
|
#endif
|
||||||
|
void on_checkBoxSerial4_stateChanged(int state);
|
||||||
|
void on_checkBoxSerial3_stateChanged(int state);
|
||||||
|
void on_checkBoxSerial2_stateChanged(int state);
|
||||||
|
void on_checkBoxSerial1_stateChanged(int state);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
void on_pushButtonSerialPassThru7_clicked();
|
void on_pushButtonSerialPassThru7_clicked();
|
||||||
void on_pushButtonSerialPassThru6_clicked();
|
void on_pushButtonSerialPassThru6_clicked();
|
||||||
@@ -38,11 +47,10 @@ private slots:
|
|||||||
void on_pushButtonSerialPassThru2_clicked();
|
void on_pushButtonSerialPassThru2_clicked();
|
||||||
void on_pushButtonSerialPassThru1_clicked();
|
void on_pushButtonSerialPassThru1_clicked();
|
||||||
|
|
||||||
private slots:
|
void on_checkBoxParallel4_stateChanged(int state);
|
||||||
void on_checkBoxParallel4_stateChanged(int arg1);
|
void on_checkBoxParallel3_stateChanged(int state);
|
||||||
void on_checkBoxParallel3_stateChanged(int arg1);
|
void on_checkBoxParallel2_stateChanged(int state);
|
||||||
void on_checkBoxParallel2_stateChanged(int arg1);
|
void on_checkBoxParallel1_stateChanged(int state);
|
||||||
void on_checkBoxParallel1_stateChanged(int arg1);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::SettingsPorts *ui;
|
Ui::SettingsPorts *ui;
|
||||||
|
|||||||
Reference in New Issue
Block a user