summaryrefslogtreecommitdiff
path: root/mainwindow.cpp
diff options
context:
space:
mode:
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();
}