From 3bb0b4d56b77aef88103e6adfa265e1c17ba3963 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 7 Feb 2022 16:07:07 +0600 Subject: [PATCH] qt: Add option to configure LPT4 device --- src/qt/qt_settingsports.cpp | 7 ++++++- src/qt/qt_settingsports.hpp | 2 ++ src/qt/qt_settingsports.ui | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_settingsports.cpp b/src/qt/qt_settingsports.cpp index b6ead8746..6163c277e 100644 --- a/src/qt/qt_settingsports.cpp +++ b/src/qt/qt_settingsports.cpp @@ -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(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); +} + diff --git a/src/qt/qt_settingsports.hpp b/src/qt/qt_settingsports.hpp index e4a8a050a..c5deef80a 100644 --- a/src/qt/qt_settingsports.hpp +++ b/src/qt/qt_settingsports.hpp @@ -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; }; diff --git a/src/qt/qt_settingsports.ui b/src/qt/qt_settingsports.ui index 0e52b4f3f..a1fbb47e7 100644 --- a/src/qt/qt_settingsports.ui +++ b/src/qt/qt_settingsports.ui @@ -58,6 +58,16 @@ + + + + LPT4 Device: + + + + + + @@ -111,6 +121,13 @@ + + + + Parallel port 4 + + +