From 2641601ea21a52ce31d10c4ec40e5a1f46268d6c Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Fri, 9 May 2025 21:09:53 -0400 Subject: [PATCH] Clean QT Ports UI --- src/qt/qt_settingsports.cpp | 6 +- src/qt/qt_settingsports.hpp | 21 ++-- src/qt/qt_settingsports.ui | 192 ++++++++++++++++++------------------ 3 files changed, 111 insertions(+), 108 deletions(-) diff --git a/src/qt/qt_settingsports.cpp b/src/qt/qt_settingsports.cpp index 7e8f2aeda..ddebd28e8 100644 --- a/src/qt/qt_settingsports.cpp +++ b/src/qt/qt_settingsports.cpp @@ -51,7 +51,7 @@ SettingsPorts::save() { for (int i = 0; i < PARALLEL_MAX; i++) { auto *cbox = findChild(QString("comboBoxLpt%1").arg(i + 1)); - auto *checkBox = findChild(QString("checkBoxParallel%1").arg(i + 1)); + auto *checkBox = findChild(QString("checkBoxParallel%1").arg(i + 1)); if (cbox != NULL) lpt_ports[i].device = cbox->currentData().toInt(); if (checkBox != NULL) @@ -73,7 +73,7 @@ SettingsPorts::onCurrentMachineChanged(int machineId) { this->machineId = machineId; - int c = 0; + int c = 0; // LPT Device QComboBox * cbox[PARALLEL_MAX] = { 0 }; @@ -93,7 +93,7 @@ SettingsPorts::onCurrentMachineChanged(int machineId) if (lptName == nullptr) break; - const QString name = tr(lptName); + const QString name = tr(lptName); for (uint8_t i = 0; i < PARALLEL_MAX; ++i) { int row = Models::AddEntry(models[i], name, c); diff --git a/src/qt/qt_settingsports.hpp b/src/qt/qt_settingsports.hpp index 83560914f..8be1f0491 100644 --- a/src/qt/qt_settingsports.hpp +++ b/src/qt/qt_settingsports.hpp @@ -35,22 +35,25 @@ private slots: void on_checkBoxSerial7_stateChanged(int state); #endif void on_checkBoxSerialPassThru1_stateChanged(int state); + void on_pushButtonSerialPassThru1_clicked(); + void on_checkBoxSerialPassThru2_stateChanged(int state); + void on_pushButtonSerialPassThru2_clicked(); + void on_checkBoxSerialPassThru3_stateChanged(int state); + void on_pushButtonSerialPassThru3_clicked(); + void on_checkBoxSerialPassThru4_stateChanged(int state); + void on_pushButtonSerialPassThru4_clicked(); + #if 0 void on_checkBoxSerialPassThru5_stateChanged(int state); - void on_checkBoxSerialPassThru6_stateChanged(int state); - void on_checkBoxSerialPassThru7_stateChanged(int state); -#endif - - void on_pushButtonSerialPassThru1_clicked(); - void on_pushButtonSerialPassThru2_clicked(); - void on_pushButtonSerialPassThru3_clicked(); - void on_pushButtonSerialPassThru4_clicked(); -#if 0 void on_pushButtonSerialPassThru5_clicked(); + + void on_checkBoxSerialPassThru6_stateChanged(int state); void on_pushButtonSerialPassThru6_clicked(); + + void on_checkBoxSerialPassThru7_stateChanged(int state); void on_pushButtonSerialPassThru7_clicked(); #endif diff --git a/src/qt/qt_settingsports.ui b/src/qt/qt_settingsports.ui index bca870e5d..92420f2df 100644 --- a/src/qt/qt_settingsports.ui +++ b/src/qt/qt_settingsports.ui @@ -29,7 +29,7 @@ - + LPT1 Device: @@ -43,7 +43,7 @@ - + LPT2 Device: @@ -57,7 +57,7 @@ - + LPT3 Device: @@ -71,7 +71,7 @@ - + LPT4 Device: @@ -88,27 +88,6 @@ - - - - Parallel port 2 - - - - - - - Parallel port 3 - - - - - - - Serial port 3 - - - @@ -116,20 +95,6 @@ - - - - Parallel port 4 - - - - - - - Serial port 2 - - - @@ -137,6 +102,34 @@ + + + + Serial port 2 + + + + + + + Parallel port 2 + + + + + + + Serial port 3 + + + + + + + Parallel port 3 + + + @@ -144,13 +137,76 @@ + + + + Parallel port 4 + + + - + QLayout::SetDefaultConstraint + + + + Serial port passthrough 1 + + + + + + + Configure + + + + + + + Serial port passthrough 2 + + + + + + + Configure + + + + + + + Serial port passthrough 3 + + + + + + + Configure + + + + + + + Serial port passthrough 4 + + + + + + + Configure + + + @@ -164,13 +220,6 @@ - - - - Serial port passthrough 3 - - - @@ -184,55 +233,6 @@ - - - - Configure - - - - - - - Serial port passthrough 1 - - - - - - - Serial port passthrough 2 - - - - - - - Serial port passthrough 4 - - - - - - - Configure - - - - - - - Configure - - - - - - - Configure - - -