PD: Add new props to InvoluteGear's task panel

This commit is contained in:
Jonas Bähr
2023-01-12 23:31:01 +01:00
committed by Uwe
parent 464c512e83
commit 4094e34ff2
2 changed files with 83 additions and 2 deletions

View File

@@ -176,6 +176,9 @@ class _InvoluteGearTaskPanel:
#QtCore.QObject.connect(self.form.comboBox_ExternalGear, QtCore.SIGNAL("activated(QString)"), self.externalGearChanged)
#QtCore.QObject.connect(self.form.comboBox_ExternalGear, QtCore.SIGNAL("currentIndexChanged(int)"), self.externalGearChanged)
QtCore.QObject.connect(self.form.comboBox_ExternalGear, QtCore.SIGNAL("currentIndexChanged(int)"), self.externalGearChanged)
QtCore.QObject.connect(self.form.doubleSpinBox_Addendum, QtCore.SIGNAL("valueChanged(double)"), self.addendumChanged)
QtCore.QObject.connect(self.form.doubleSpinBox_Dedendum, QtCore.SIGNAL("valueChanged(double)"), self.dedendumChanged)
QtCore.QObject.connect(self.form.doubleSpinBox_RootFillet, QtCore.SIGNAL("valueChanged(double)"), self.rootFilletChanged)
self.update()
@@ -198,6 +201,9 @@ class _InvoluteGearTaskPanel:
else:
self.obj.ExternalGear = False
#self.obj.ExternalGear = self.form.comboBox_ExternalGear.currentIndex()
self.obj.AddendumCoefficient = self.form.doubleSpinBox_Addendum.value()
self.obj.DedendumCoefficient = self.form.doubleSpinBox_Dedendum.value()
self.obj.RootFilletCoefficient = self.form.doubleSpinBox_RootFillet.value()
def transferFrom(self):
@@ -215,6 +221,9 @@ class _InvoluteGearTaskPanel:
else:
self.form.comboBox_ExternalGear.setCurrentIndex(1)
#self.form.comboBox_ExternalGear.setCurrentIndex(self.obj.ExternalGear)
self.form.doubleSpinBox_Addendum.setValue(self.obj.AddendumCoefficient)
self.form.doubleSpinBox_Dedendum.setValue(self.obj.DedendumCoefficient)
self.form.doubleSpinBox_RootFillet.setValue(self.obj.RootFilletCoefficient)
def modulesChanged(self, value):
#print value
@@ -251,6 +260,18 @@ class _InvoluteGearTaskPanel:
self.obj.ExternalGear = v
self.obj.Proxy.execute(self.obj)
def addendumChanged(self, value):
self.obj.AddendumCoefficient = value
self.obj.Proxy.execute(self.obj)
def dedendumChanged(self, value):
self.obj.DedendumCoefficient = value
self.obj.Proxy.execute(self.obj)
def rootFilletChanged(self, value):
self.obj.RootFilletCoefficient = value
self.obj.Proxy.execute(self.obj)
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Cancel)| int(QtGui.QDialogButtonBox.Apply)

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>195</width>
<height>142</height>
<width>248</width>
<height>270</height>
</rect>
</property>
<property name="windowTitle">
@@ -173,6 +173,66 @@
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Addendum Coefficient</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_Addendum">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Dedendum Coefficient</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_Dedendum">
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
<property name="value">
<double>1.250000000000000</double>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Root Fillet Coefficient</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_RootFillet">
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.020000000000000</double>
</property>
<property name="value">
<double>0.380000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>