Fixups with Qt6 enums (#13611)

* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
This commit is contained in:
Martin Rodriguez Reboredo
2024-05-06 13:02:18 -03:00
committed by GitHub
parent c24ace7f73
commit 9759da82e4
27 changed files with 64 additions and 52 deletions

View File

@@ -258,7 +258,7 @@ class _InvoluteGearTaskPanel:
self.form.doubleSpinBox_ProfileShift.setValue(self.obj.ProfileShiftCoefficient)
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Cancel)| int(QtGui.QDialogButtonBox.Apply)
return QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Apply
def clicked(self,button):
if button == QtGui.QDialogButtonBox.Apply:

View File

@@ -312,11 +312,7 @@ class SprocketTaskPanel:
self.obj.Proxy.execute(self.obj)
def getStandardButtons(self):
return (
int(QtGui.QDialogButtonBox.Ok)
| int(QtGui.QDialogButtonBox.Cancel)
| int(QtGui.QDialogButtonBox.Apply)
)
return QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Apply
def clicked(self, button):
if button == QtGui.QDialogButtonBox.Apply:

View File

@@ -155,7 +155,7 @@ class TaskWizardShaft:
self.updateButton(row, col, flag)
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Ok)
return QtGui.QDialogButtonBox.Ok
def accept(self):
if self.table: