summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EVPC.pro.user6
-rw-r--r--mainwindow.cpp26
-rw-r--r--mainwindow.ui3
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 5.0.2, 2022-11-21T02:03:09. -->
+<!-- Written by QtCreator 5.0.2, 2022-11-21T22:16:42. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@@ -102,7 +102,7 @@
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value>
- <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\Josh\Documents\build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
@@ -140,7 +140,7 @@
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
- <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\Josh\Documents\build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/Josh/Documents/build-EVPC-Desktop_Qt_5_12_12_MinGW_64_bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
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();
}
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);</string>
</item>
<item row="11" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxChosenResistance">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255,80);
color: rgba(0, 0, 0,80);</string>