summaryrefslogtreecommitdiff
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorJoshua Drake <joshua.ellis.drake@gmail.com>2022-11-22 21:54:31 -0600
committerJoshua Drake <joshua.ellis.drake@gmail.com>2022-11-22 21:54:31 -0600
commit90fd54c7c549ed6b955e0cd6c242df3327af2418 (patch)
tree4f88fa5bc35170462c520edf441e1da979aa92b2 /mainwindow.cpp
parent179ed918aed1c9f190ae6846ea4bcccccbeab18f (diff)
Cleaned up UI.HEADmaster
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp26
1 files changed, 25 insertions, 1 deletions
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<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxChosenResistance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
});
connect(ui->doubleSpinBoxSystemCapacitance,static_cast<void (QDoubleSpinBox::*)(double)>(&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<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxChosenResistance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
});
connect(ui->doubleSpinBoxPreChargeTime,static_cast<void (QDoubleSpinBox::*)(double)>(&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<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxChosenResistance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
});
connect(ui->doubleSpinBoxChosenResistance,static_cast<void (QDoubleSpinBox::*)(double)>(&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<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxPreChargePercentageDesired,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxChosenResistance,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),0,0);
+// disconnect(ui->doubleSpinBoxSystemCapacitance,static_cast<void (QDoubleSpinBox::*)(double)>(&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();
}