qt: Add option to configure LPT4 device

This commit is contained in:
Cacodemon345
2022-02-07 16:07:07 +06:00
parent 208a9d5205
commit 3bb0b4d56b
3 changed files with 25 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ SettingsPorts::SettingsPorts(QWidget *parent) :
{
ui->setupUi(this);
for (int i = 0; i < 3; i++) {
for (int i = 0; i < 4; i++) {
auto* cbox = findChild<QComboBox*>(QString("comboBoxLpt%1").arg(i+1));
auto* model = cbox->model();
int c = 0;
@@ -95,3 +95,8 @@ void SettingsPorts::on_checkBoxParallel3_stateChanged(int state) {
ui->comboBoxLpt3->setEnabled(state == Qt::Checked);
}
void SettingsPorts::on_checkBoxParallel4_stateChanged(int state) {
ui->comboBoxLpt4->setEnabled(state == Qt::Checked);
}

View File

@@ -21,6 +21,8 @@ private slots:
void on_checkBoxParallel2_stateChanged(int arg1);
void on_checkBoxParallel1_stateChanged(int arg1);
void on_checkBoxParallel4_stateChanged(int arg1);
private:
Ui::SettingsPorts *ui;
};

View File

@@ -58,6 +58,16 @@
<item row="2" column="1">
<widget class="QComboBox" name="comboBoxLpt3"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>LPT4 Device:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBoxLpt4"/>
</item>
</layout>
</item>
<item>
@@ -111,6 +121,13 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxParallel4">
<property name="text">
<string>Parallel port 4</string>
</property>
</widget>
</item>
</layout>
</item>
<item>