Public Member Functions | |
def | commit (self, name, func) |
def | finish (self) |
def | IsActive (self) |
Public Attributes | |
call | |
commit_list | |
doc | |
planetrack | |
view | |
Detailed Description
Generic class that is the basis of all Gui commands. This class should eventually replace `DraftTools.DraftTool`, once all functionality in that class is merged here. Attributes ---------- commit_list : list of 2-element tuples Each tuple is made of a string, and a list of strings. :: commit_list = [(string1, list1), (string2, list2), ...] The string is a simple header, for example, a command name, that indicates what is being executed. Each string in the list of strings represents a Python instruction which will be executed in a delayed fashion by `todo.ToDo.delayCommit()` :: list1 = ["a = FreeCAD.Vector()", "pl = FreeCAD.Placement()", "Draft.autogroup(obj)"] commit_list = [("Something", list1)] This is used when the 3D view has event callbacks that crash Coin3D. If this is not needed, those commands could be called in the body of the command without problem. :: >>> a = FreeCAD.Vector() >>> pl = FreeCAD.Placement() >>> Draft.autogroup(obj)
Member Function Documentation
◆ commit()
def draftguitools.gui_base.GuiCommandBase.commit | ( | self, | |
name, | |||
func | |||
) |
Store actions to be committed to the document. Parameters ---------- name : str A string that indicates what is being committed. func : list of strings Each element of the list should be a Python command that will be executed.
References draftguitools.gui_base.GuiCommandBase.commit_list.
Referenced by draftguitools.gui_offset.Offset.action(), draftguitools.gui_ellipses.Ellipse.createObject(), draftguitools.gui_rectangles.Rectangle.createObject(), draftguitools.gui_texts.Text.createObject(), draftguitools.gui_shapestrings.ShapeString.createObject(), draftguitools.gui_dimensions.Dimension.createObject(), draftguitools.gui_dimensions.Dimension.createOnMeasures(), draftguitools.gui_stretch.Stretch.doStretch(), draftguitools.gui_fillets.Fillet.draw_arc(), draftguitools.gui_arcs.Arc.drawArc(), draftguitools.gui_polygons.Polygon.drawPolygon(), draftguitools.gui_lines.Line.finish(), draftguitools.gui_splines.BSpline.finish(), draftguitools.gui_beziers.BezCurve.finish(), draftguitools.gui_beziers.CubicBezCurve.finish(), draftguitools.gui_mirror.Mirror.mirror(), draftguitools.gui_move.Move.move_object(), draftguitools.gui_move.Move.move_subelements(), draftguitools.gui_offset.Offset.numericRadius(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_array_simple.Array.proceed(), draftguitools.gui_split.Split.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_patharray.PathArray.proceed(), draftguitools.gui_rotate.Rotate.rotate_object(), draftguitools.gui_rotate.Rotate.rotate_subelements(), draftguitools.gui_scale.Scale.scale_object(), draftguitools.gui_scale.Scale.scale_subelements(), and draftguitools.gui_scale.Scale.scale_with_clone().
◆ finish()
def draftguitools.gui_base.GuiCommandBase.finish | ( | self | ) |
Terminate the active command by committing the list of commands. It also perform some other tasks like terminating the plane tracker and the snapper.
References draftguitools.gui_array_simple.Array.call, draftguitools.gui_arcs.Arc.call, draftguitools.gui_base.GuiCommandBase.call, draftguitools.gui_base.GuiCommandBase.commit_list, draftguitools.gui_base.GuiCommandBase.planetrack, Gui::Dialog::Clipping::Private.view, Gui::PointMarker.view, Gui::GraphvizView.view, Gui::ItemViewSelection.view, and draftguitools.gui_base.GuiCommandBase.view.
Referenced by drafttaskpanels.task_polararray.TaskPanelPolarArray.accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray.accept(), drafttaskpanels.task_circulararray.TaskPanelCircularArray.accept(), draftguitools.gui_split.Split.action(), draftguitools.gui_splines.BSpline.action(), draftguitools.gui_beziers.BezCurve.action(), draftguitools.gui_lines.Line.action(), draftguitools.gui_polygons.Polygon.action(), draftguitools.gui_subelements.SubelementHighlight.action(), draftguitools.gui_rotate.Rotate.action(), draftguitools.gui_fillets.Fillet.action(), draftguitools.gui_move.Move.action(), draftguitools.gui_texts.Text.action(), draftguitools.gui_mirror.Mirror.action(), draftguitools.gui_stretch.Stretch.action(), draftguitools.gui_scale.Scale.action(), draftguitools.gui_offset.Offset.action(), draftguitools.gui_ellipses.Ellipse.action(), draftguitools.gui_rectangles.Rectangle.action(), draftguitools.gui_shapestrings.ShapeString.action(), draftguitools.gui_labels.Label.action(), draftguitools.gui_selectplane.Draft_SelectPlane.action(), draftguitools.gui_trimex.Trimex.action(), draftguitools.gui_beziers.CubicBezCurve.action(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_wire2spline.WireToBSpline.Activated(), draftguitools.gui_subelements.SubelementHighlight.Activated(), draftguitools.gui_dimensions.Dimension.Activated(), draftguitools.gui_edit.Edit.Activated(), draftguitools.gui_selectplane.Draft_SelectPlane.checkSelection(), draftguitools.gui_points.Point.click(), draftguitools.gui_orthoarray.OrthoArray.completed(), draftguitools.gui_polararray.PolarArray.completed(), draftguitools.gui_circulararray.CircularArray.completed(), draftguitools.gui_labels.Label.create(), draftguitools.gui_ellipses.Ellipse.createObject(), draftguitools.gui_rectangles.Rectangle.createObject(), draftguitools.gui_texts.Text.createObject(), draftguitools.gui_shapestrings.ShapeString.createObject(), draftguitools.gui_stretch.Stretch.doStretch(), draftguitools.gui_polygons.Polygon.drawPolygon(), draftguitools.gui_edit.Edit.keyPressed(), draftguitools.gui_dimensions.Dimension.numericInput(), draftguitools.gui_fillets.Fillet.numericRadius(), draftguitools.gui_offset.Offset.numericRadius(), draftguitools.gui_rotate.Rotate.numericRadius(), draftguitools.gui_trimex.Trimex.numericRadius(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickAlign(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickAuto(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickCenter(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickFront(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickMove(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickPrevious(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickSide(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickTop(), draftguitools.gui_subelements.SubelementHighlight.proceed(), draftguitools.gui_facebinders.Facebinder.proceed(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_array_simple.Array.proceed(), draftguitools.gui_clone.Clone.proceed(), draftguitools.gui_split.Split.proceed(), draftguitools.gui_trimex.Trimex.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_patharray.PathArray.proceed(), draftguitools.gui_edit.Edit.proceed(), draftguitools.gui_selectplane.Draft_SelectPlane.reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray.reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray.reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray.reject(), and draftguitools.gui_edit.Edit.setTrackers().
◆ IsActive()
def draftguitools.gui_base.GuiCommandBase.IsActive | ( | self | ) |
Return True when this command should be available.
Member Data Documentation
◆ call
draftguitools.gui_base.GuiCommandBase.call |
Referenced by drafttaskpanels.task_shapestring.ShapeStringTaskPanel.accept(), draftguitools.gui_selectplane.Draft_SelectPlane.finish(), draftguitools.gui_base_original.DraftTool.finish(), draftguitools.gui_base.GuiCommandBase.finish(), draftguitools.gui_subelements.SubelementHighlight.get_selection(), draftguitools.gui_facebinders.Facebinder.proceed(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_mirror.Mirror.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_stretch.Stretch.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_rotate.Rotate.proceed(), draftguitools.gui_offset.Offset.proceed(), draftguitools.gui_clone.Clone.proceed(), draftguitools.gui_move.Move.proceed(), draftguitools.gui_scale.Scale.proceed(), draftguitools.gui_drawing.Drawing.proceed(), draftguitools.gui_split.Split.proceed(), draftguitools.gui_trimex.Trimex.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_patharray.PathArray.proceed(), drafttaskpanels.task_shapestring.ShapeStringTaskPanel.reject(), and draftguitools.gui_subelements.SubelementHighlight.remove_view_callback().
◆ commit_list
draftguitools.gui_base.GuiCommandBase.commit_list |
◆ doc
draftguitools.gui_base.GuiCommandBase.doc |
Referenced by draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_splines.BSpline.Activated(), draftguitools.gui_lines.Line.Activated(), draftguitools.gui_wire2spline.WireToBSpline.Activated(), draftguitools.gui_beziers.BezCurve.Activated(), draftguitools.gui_beziers.CubicBezCurve.Activated(), WorkingPlane.Plane.alignToPointAndAxis(), WorkingPlane.Plane.alignToPointAndAxis_SVG(), Mod.Show.SceneDetails.Pickability.Pickability.apply_data(), Mod.Show.SceneDetails.VProperty.VProperty.apply_data(), Mod.Show.SceneDetails.ClipPlane.ClipPlane.apply_data(), Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.apply_data(), importSVG.svgHandler.characters(), draftguitools.gui_drawing.Drawing.createDefaultPage(), draftguitools.gui_fillets.Fillet.draw_arc(), importSVG.svgHandler.endElement(), draftguitools.gui_polygons.Polygon.finish(), draftguitools.gui_arcs.Arc.finish(), draftguitools.gui_splines.BSpline.finish(), draftguitools.gui_beziers.BezCurve.finish(), draftguitools.gui_fillets.Fillet.finish(), draftguitools.gui_rotate.Rotate.finish(), draftguitools.gui_beziers.CubicBezCurve.finish(), Mod.Show.SceneDetail.SceneDetail.full_key(), draftguitools.gui_trimex.Trimex.redraw(), draftguitools.gui_lines.Line.removeTemporaryObject(), WorkingPlane.Plane.reset(), Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.scene_value(), Mod.Show.SceneDetails.Pickability.Pickability.scene_value(), Mod.Show.SceneDetails.VProperty.VProperty.scene_value(), Mod.Show.SceneDetail.SceneDetail.set_doc(), PathTests.TestPathToolController.TestPathToolController.tearDown(), PathTests.TestPathHelix.TestPathHelix.tearDown(), PathTests.TestPathSetupSheet.TestPathSetupSheet.tearDown(), drafttests.test_creation.DraftCreation.tearDown(), TestSpreadsheet.SpreadsheetCases.tearDown(), PathTests.TestPathUtil.TestPathUtil.test00(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test00(), PathTests.TestPathUtil.TestPathUtil.test01(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test01(), PathTests.TestPathUtil.TestPathUtil.test02(), PathTests.TestPathUtil.TestPathUtil.test03(), PathTests.TestPathHelix.TestPathHelix.test03(), PathTests.TestPathUtil.TestPathUtil.test04(), PathTests.TestPathHelix.TestPathHelix.test04(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test13(), drafttests.test_creation.DraftCreation.test_dimension_radial(), drafttests.test_creation.DraftCreation.test_facebinder(), drafttests.test_creation.DraftCreation.test_fillet(), drafttests.test_creation.DraftCreation.test_label(), TestSpreadsheet.SpreadsheetCases.testAggregates(), TestSpreadsheet.SpreadsheetCases.testAlias(), TestSpreadsheet.SpreadsheetCases.testAmbiguousAlias(), TestSpreadsheet.SpreadsheetCases.testClearAlias(), TestSpreadsheet.SpreadsheetCases.testCrossDocumentLinks(), TestSpreadsheet.SpreadsheetCases.testFunctions(), TestSpreadsheet.SpreadsheetCases.testInsertRows(), TestSpreadsheet.SpreadsheetCases.testInvoluteGear(), TestSpreadsheet.SpreadsheetCases.testIssue3128(), TestSpreadsheet.SpreadsheetCases.testIssue3225(), TestSpreadsheet.SpreadsheetCases.testIssue3363(), TestSpreadsheet.SpreadsheetCases.testIssue3432(), TestSpreadsheet.SpreadsheetCases.testMatrix(), TestSpreadsheet.SpreadsheetCases.testNumbers(), TestSpreadsheet.SpreadsheetCases.testPlacementName(), TestSpreadsheet.SpreadsheetCases.testPrecedence(), TestSpreadsheet.SpreadsheetCases.testRelationalOperators(), TestSpreadsheet.SpreadsheetCases.testRemoveRows(), TestSpreadsheet.SpreadsheetCases.testRenameAlias(), TestSpreadsheet.SpreadsheetCases.testRenameAlias2(), TestSpreadsheet.SpreadsheetCases.testRenameAlias3(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias2(), TestSpreadsheet.SpreadsheetCases.testSketcher(), TestSpreadsheet.SpreadsheetCases.testUnits(), draftguitools.gui_trimex.Trimex.trimObject(), draftguitools.gui_trimex.Trimex.trimObjects(), Mod.PartDesign.WizardShaft.Shaft.Shaft.updateConstraint(), Mod.PartDesign.WizardShaft.Shaft.Shaft.updateEdge(), and Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.val().
◆ planetrack
draftguitools.gui_base.GuiCommandBase.planetrack |
Referenced by draftguitools.gui_labels.Label.action(), draftguitools.gui_stretch.Stretch.addPoint(), draftguitools.gui_ellipses.Ellipse.appendPoint(), draftguitools.gui_rectangles.Rectangle.appendPoint(), draftguitools.gui_lines.Line.drawSegment(), draftguitools.gui_splines.BSpline.drawUpdate(), draftguitools.gui_beziers.BezCurve.drawUpdate(), draftguitools.gui_beziers.CubicBezCurve.drawUpdate(), draftguitools.gui_base_original.DraftTool.finish(), draftguitools.gui_base.GuiCommandBase.finish(), and draftguitools.gui_lines.Line.orientWP().
◆ view
draftguitools.gui_base.GuiCommandBase.view |
Referenced by drafttaskpanels.task_shapestring.ShapeStringTaskPanel.accept(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_polararray.PolarArray.Activated(), draftguitools.gui_circulararray.CircularArray.Activated(), draftguitools.gui_orthoarray.OrthoArray.Activated(), draftguitools.gui_points.Point.click(), draftguitools.gui_orthoarray.OrthoArray.completed(), draftguitools.gui_circulararray.CircularArray.completed(), draftguitools.gui_polararray.PolarArray.completed(), draftguitools.gui_selectplane.Draft_SelectPlane.finish(), draftguitools.gui_base_original.DraftTool.finish(), draftguitools.gui_base.GuiCommandBase.finish(), draftguitools.gui_subelements.SubelementHighlight.get_selection(), PathScripts.PathGetPoint.TaskPanel.getPoint(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickAlign(), draftguitools.gui_facebinders.Facebinder.proceed(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_mirror.Mirror.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_stretch.Stretch.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_array_simple.Array.proceed(), draftguitools.gui_rotate.Rotate.proceed(), draftguitools.gui_offset.Offset.proceed(), draftguitools.gui_clone.Clone.proceed(), draftguitools.gui_move.Move.proceed(), draftguitools.gui_scale.Scale.proceed(), draftguitools.gui_drawing.Drawing.proceed(), draftguitools.gui_split.Split.proceed(), draftguitools.gui_trimex.Trimex.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_patharray.PathArray.proceed(), draftguitools.gui_edit.Edit.register_selection_callback(), drafttaskpanels.task_shapestring.ShapeStringTaskPanel.reject(), draftguitools.gui_subelements.SubelementHighlight.remove_view_callback(), PathScripts.PathGetPoint.TaskPanel.removeGlobalCallbacks(), and draftguitools.gui_edit.Edit.unregister_selection_callback().
The documentation for this class was generated from the following file:
- src/Mod/Draft/draftguitools/gui_base.py