From 90fd54c7c549ed6b955e0cd6c242df3327af2418 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Tue, 22 Nov 2022 21:54:31 -0600 Subject: Cleaned up UI. --- EVPC.pro.user | 6 +++--- mainwindow.cpp | 26 +++++++++++++++++++++++++- mainwindow.ui | 3 +++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/EVPC.pro.user b/EVPC.pro.user index 9d7d6d3..676ceaf 100644 --- a/EVPC.pro.user +++ b/EVPC.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,7 +102,7 @@ 0 0 - C:\Users\Josh\Documents\build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug + C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug @@ -140,7 +140,7 @@ 2 - C:\Users\Josh\Documents\build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release + C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release diff --git a/mainwindow.cpp b/mainwindow.cpp index 8559778..0c845bb 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -61,6 +61,12 @@ MainWindow::MainWindow(QWidget *parent) ui->labelDesiredPreChargeTime->setStyleSheet("color: rgb(0, 0, 0);"); ui->labelSystemCapacitance->setStyleSheet("color: rgb(0, 0, 0);"); + ui->doubleSpinBoxChosenResistance->setEnabled(true); + +// disconnect(ui->doubleSpinBoxPreChargeTime,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxChosenResistance,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast(&QDoubleSpinBox::valueChanged),0,0); }); connect(ui->doubleSpinBoxSystemCapacitance,static_cast(&QDoubleSpinBox::valueChanged), [=]() { @@ -97,6 +103,12 @@ MainWindow::MainWindow(QWidget *parent) ui->labelDesiredPreChargeTime->setStyleSheet("color: rgb(0, 0, 0);"); ui->labelSystemCapacitance->setStyleSheet("color: rgb(0, 0, 0);"); + ui->doubleSpinBoxChosenResistance->setEnabled(true); + +// disconnect(ui->doubleSpinBoxPreChargeTime,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxChosenResistance,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast(&QDoubleSpinBox::valueChanged),0,0); }); connect(ui->doubleSpinBoxPreChargeTime,static_cast(&QDoubleSpinBox::valueChanged), [=]() { @@ -128,6 +140,12 @@ MainWindow::MainWindow(QWidget *parent) ui->labelDesiredPreChargeTime->setStyleSheet("color: rgb(0, 0, 0);"); ui->labelSystemCapacitance->setStyleSheet("color: rgb(0, 0, 0);"); + ui->doubleSpinBoxChosenResistance->setEnabled(true); + +// disconnect(ui->doubleSpinBoxPreChargeTime,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxChosenResistance,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast(&QDoubleSpinBox::valueChanged),0,0); }); connect(ui->doubleSpinBoxChosenResistance,static_cast(&QDoubleSpinBox::valueChanged), [=]() { @@ -159,6 +177,12 @@ MainWindow::MainWindow(QWidget *parent) ui->labelDesiredPreChargeTime->setStyleSheet("color: rgb(0, 0, 0);"); ui->labelSystemCapacitance->setStyleSheet("color: rgb(0, 0, 0);"); + ui->doubleSpinBoxChosenResistance->setEnabled(true); + +// disconnect(ui->doubleSpinBoxPreChargeTime,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxChosenResistance,static_cast(&QDoubleSpinBox::valueChanged),0,0); +// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast(&QDoubleSpinBox::valueChanged),0,0); }); } @@ -227,7 +251,7 @@ void MainWindow::on_lineEditVoltageRange_textChanged(const QString &arg1) m_wire.calculate(); m_precharge.setMaximumVoltage(max); - m_precharge.calculate(); + if(ui->doubleSpinBoxChosenResistance->isEnabled())m_precharge.calculate(); } diff --git a/mainwindow.ui b/mainwindow.ui index 4c47a92..94f4b9a 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -908,6 +908,9 @@ color: rgba(0, 0, 0,80); + + false + background-color: rgba(255, 255, 255,80); color: rgba(0, 0, 0,80); -- cgit v1.2.3