def __init__(self, obj, asDialog): self.form = FreeCADGui.PySideUic.loadUi(":/panels/DlgToolControllerEdit.ui") if not asDialog: self.form.buttonBox.hide() self.obj = obj comboToPropertyMap = [("spindleDirection", "SpindleDir")] enumTups = PathScripts.PathToolController.ToolController.propertyEnumerations( dataType="raw" ) PathGui.populateCombobox(self.form, enumTups, comboToPropertyMap) self.vertFeed = PathGui.QuantitySpinBox(self.form.vertFeed, obj, "VertFeed") self.horizFeed = PathGui.QuantitySpinBox(self.form.horizFeed, obj, "HorizFeed") self.vertRapid = PathGui.QuantitySpinBox(self.form.vertRapid, obj, "VertRapid") self.horizRapid = PathGui.QuantitySpinBox( self.form.horizRapid, obj, "HorizRapid" ) if obj.Proxy.usesLegacyTool(obj): self.editor = PathToolEdit.ToolEditor(obj.Tool, self.form.toolEditor) else: self.editor = None self.form.toolBox.widget(1).hide() self.form.toolBox.removeItem(1)
def __init__(self, obj, asDialog): self.form = FreeCADGui.PySideUic.loadUi(":/panels/DlgToolControllerEdit.ui") if not asDialog: self.form.buttonBox.hide() self.obj = obj self.vertFeed = PathGui.QuantitySpinBox(self.form.vertFeed, obj, 'VertFeed') self.horizFeed = PathGui.QuantitySpinBox(self.form.horizFeed, obj, 'HorizFeed') self.vertRapid = PathGui.QuantitySpinBox(self.form.vertRapid, obj, 'VertRapid') self.horizRapid = PathGui.QuantitySpinBox(self.form.horizRapid, obj, 'HorizRapid') self.editor = PathToolEdit.ToolEditor(obj.Tool, self.form.toolEditor)
def __init__(self, obj, asDialog): self.form = FreeCADGui.PySideUic.loadUi(":/panels/DlgToolControllerEdit.ui") if not asDialog: self.form.buttonBox.hide() self.obj = obj self.vertFeed = PathGui.QuantitySpinBox(self.form.vertFeed, obj, 'VertFeed') self.horizFeed = PathGui.QuantitySpinBox(self.form.horizFeed, obj, 'HorizFeed') self.vertRapid = PathGui.QuantitySpinBox(self.form.vertRapid, obj, 'VertRapid') self.horizRapid = PathGui.QuantitySpinBox(self.form.horizRapid, obj, 'HorizRapid') if obj.Proxy.usesLegacyTool(obj): self.editor = PathToolEdit.ToolEditor(obj.Tool, self.form.toolEditor) else: self.editor = None self.form.toolBox.widget(1).hide() self.form.toolBox.removeItem(1)
def toolEditor(self, tool): dialog = FreeCADGui.PySideUic.loadUi(":/panels/DlgToolEdit.ui") editor = PathToolEdit.ToolEditor(tool, dialog.toolEditor, dialog) editor.setupUI() return editor