Public Member Functions | |
def | commit (self, name, func) |
def | finish (self) |
def | IsActive (self) |
Public Attributes | |
call | |
commit_list | |
doc | |
planetrack | |
view | |
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)
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_labels.Label.create(), draftguitools.gui_dimensions.Dimension.create_angle_dimension(), draftguitools.gui_dimensions.Dimension.create_linear_dimension(), draftguitools.gui_dimensions.Dimension.create_linear_dimension_obj(), draftguitools.gui_dimensions.Dimension.create_radial_dimension_obj(), draftguitools.gui_dimensions.Dimension.create_with_app_measure(), draftguitools.gui_ellipses.Ellipse.createObject(), draftguitools.gui_rectangles.Rectangle.createObject(), draftguitools.gui_shapestrings.ShapeString.createObject(), draftguitools.gui_texts.Text.createObject(), draftguitools.gui_stretch.Stretch.doStretch(), draftguitools.gui_fillets.Fillet.draw_arc(), draftguitools.gui_arcs.Arc.drawArc(), draftguitools.gui_polygons.Polygon.drawPolygon(), draftguitools.gui_beziers.BezCurve.finish(), draftguitools.gui_beziers.CubicBezCurve.finish(), draftguitools.gui_lines.Line.finish(), draftguitools.gui_splines.BSpline.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_array_simple.Array.proceed(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_patharray.PathArray.proceed(), draftguitools.gui_pathtwistedarray.PathTwistedArray.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_split.Split.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().
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 Py::PythonExtensionBase.call(), draftguitools.gui_arcs.Arc.call, draftguitools.gui_array_simple.Array.call, draftguitools.gui_base.GuiCommandBase.call, draftguitools.gui_base_original.DraftTool.call, draftguitools.gui_clone.Clone.call, draftguitools.gui_dimensions.Dimension.call, draftguitools.gui_downgrade.Downgrade.call, draftguitools.gui_draft2sketch.Draft2Sketch.call, draftguitools.gui_drawing.Drawing.call, draftguitools.gui_ellipses.Ellipse.call, draftguitools.gui_facebinders.Facebinder.call, draftguitools.gui_join.Join.call, draftguitools.gui_labels.Label.call, draftguitools.gui_lines.Line.call, draftguitools.gui_mirror.Mirror.call, draftguitools.gui_move.Move.call, draftguitools.gui_offset.Offset.call, draftguitools.gui_patharray.PathArray.call, draftguitools.gui_pathtwistedarray.PathTwistedArray.call, draftguitools.gui_polygons.Polygon.call, draftguitools.gui_rectangles.Rectangle.call, draftguitools.gui_rotate.Rotate.call, draftguitools.gui_scale.Scale.call, draftguitools.gui_selectplane.Draft_SelectPlane.call, draftguitools.gui_shape2dview.Shape2DView.call, draftguitools.gui_shapestrings.ShapeString.call, draftguitools.gui_split.Split.call, draftguitools.gui_stretch.Stretch.call, draftguitools.gui_subelements.SubelementHighlight.call, draftguitools.gui_texts.Text.call, draftguitools.gui_trimex.Trimex.call, draftguitools.gui_upgrade.Upgrade.call, drafttaskpanels.task_shapestring.ShapeStringTaskPanelEdit.call, Commands.TemplatePyMod_Cmd2.call, draftguitools.gui_base.GuiCommandBase.commit_list, draftguitools.gui_base.GuiCommandBase.planetrack, draftguitools.gui_base_original.DraftTool.planetrack, Gui::Dialog::Clipping::Private.view, Gui::GraphvizView.view, Gui::ItemViewSelection.view, Gui::PointMarker.view, draftguitools.gui_base.GuiCommandBase.view, draftguitools.gui_base_original.DraftTool.view, draftguitools.gui_circulararray.CircularArray.view, draftguitools.gui_edit.Edit.view, draftguitools.gui_orthoarray.OrthoArray.view, draftguitools.gui_points.Point.view, draftguitools.gui_polararray.PolarArray.view, draftguitools.gui_selectplane.Draft_SelectPlane.view, draftguitools.gui_snapper.Snapper.view, draftguitools.gui_trackers.archDimTracker.view, DrawingGui::ViewProviderDrawingPage.view, femexamples.examplesgui.FemExamples.view, FemGui::PointMarker.view, FemGui::DataMarker.view, MeshGui::DlgEvaluateMeshImp::Private.view, MeshPartGui::CrossSections.view, PartGui::CrossSections.view, PartGui::FaceColors::Private.view, PathScripts.PathGetPoint.TaskPanel.view, MyPaintable.view, Teapots.view, Rubberband.view, ExpressionDelegate.view, SpreadsheetGui::ViewProviderSheet.view, Commands.TemplatePyMod_Cmd2.view, and WebGui::BrowserView.view.
Referenced by drafttaskpanels.task_circulararray.TaskPanelCircularArray.accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray.accept(), drafttaskpanels.task_polararray.TaskPanelPolarArray.accept(), draftguitools.gui_arcs.Arc.action(), draftguitools.gui_beziers.BezCurve.action(), draftguitools.gui_beziers.CubicBezCurve.action(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_ellipses.Ellipse.action(), draftguitools.gui_fillets.Fillet.action(), draftguitools.gui_labels.Label.action(), draftguitools.gui_lines.Line.action(), draftguitools.gui_mirror.Mirror.action(), draftguitools.gui_move.Move.action(), draftguitools.gui_offset.Offset.action(), draftguitools.gui_polygons.Polygon.action(), draftguitools.gui_rectangles.Rectangle.action(), draftguitools.gui_rotate.Rotate.action(), draftguitools.gui_scale.Scale.action(), draftguitools.gui_selectplane.Draft_SelectPlane.action(), draftguitools.gui_shapestrings.ShapeString.action(), draftguitools.gui_splines.BSpline.action(), draftguitools.gui_split.Split.action(), draftguitools.gui_stretch.Stretch.action(), draftguitools.gui_texts.Text.action(), draftguitools.gui_trimex.Trimex.action(), draftguitools.gui_subelements.SubelementHighlight.action(), draftguitools.gui_clone.Clone.Activated(), draftguitools.gui_dimensions.Dimension.Activated(), draftguitools.gui_downgrade.Downgrade.Activated(), draftguitools.gui_draft2sketch.Draft2Sketch.Activated(), draftguitools.gui_edit.Edit.Activated(), draftguitools.gui_facebinders.Facebinder.Activated(), draftguitools.gui_join.Join.Activated(), draftguitools.gui_shape2dview.Shape2DView.Activated(), draftguitools.gui_subelements.SubelementHighlight.Activated(), draftguitools.gui_upgrade.Upgrade.Activated(), draftguitools.gui_wire2spline.WireToBSpline.Activated(), draftguitools.gui_selectplane.Draft_SelectPlane.checkSelection(), DraftGui.DraftToolBar.checkSpecialChars(), draftguitools.gui_points.Point.click(), draftguitools.gui_circulararray.CircularArray.completed(), draftguitools.gui_orthoarray.OrthoArray.completed(), draftguitools.gui_polararray.PolarArray.completed(), draftguitools.gui_labels.Label.create(), draftguitools.gui_ellipses.Ellipse.createObject(), draftguitools.gui_rectangles.Rectangle.createObject(), draftguitools.gui_shapestrings.ShapeString.createObject(), draftguitools.gui_texts.Text.createObject(), draftviewproviders.view_text.ViewProviderText.createObject(), draftguitools.gui_stretch.Stretch.doStretch(), draftguitools.gui_arcs.Arc.drawArc(), draftguitools.gui_polygons.Polygon.drawPolygon(), DraftGui.DraftToolBar.escape(), draftguitools.gui_move.Move.get_object_selection(), draftguitools.gui_rotate.Rotate.get_object_selection(), draftguitools.gui_scale.Scale.get_object_selection(), draftguitools.gui_arcs.Arc_3Points.getPoint(), draftguitools.gui_edit.Edit.keyPressed(), draftguitools.gui_dimensions.Dimension.numericInput(), draftguitools.gui_trimex.Trimex.numericRadius(), draftguitools.gui_fillets.Fillet.numericRadius(), draftguitools.gui_offset.Offset.numericRadius(), draftguitools.gui_rotate.Rotate.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_array_simple.Array.proceed(), draftguitools.gui_clone.Clone.proceed(), draftguitools.gui_downgrade.Downgrade.proceed(), draftguitools.gui_draft2sketch.Draft2Sketch.proceed(), draftguitools.gui_edit.Edit.proceed(), draftguitools.gui_facebinders.Facebinder.proceed(), draftguitools.gui_join.Join.proceed(), draftguitools.gui_patharray.PathArray.proceed(), draftguitools.gui_pathtwistedarray.PathTwistedArray.proceed(), draftguitools.gui_pointarray.PointArray.proceed(), draftguitools.gui_shape2dview.Shape2DView.proceed(), draftguitools.gui_subelements.SubelementHighlight.proceed(), draftguitools.gui_trimex.Trimex.proceed(), draftguitools.gui_upgrade.Upgrade.proceed(), draftguitools.gui_split.Split.proceed(), draftguitools.gui_selectplane.Draft_SelectPlane.reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray.reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray.reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray.reject(), and draftguitools.gui_edit.Edit.setTrackers().
def draftguitools.gui_base.GuiCommandBase.IsActive | ( | self | ) |
Return True when this command should be available.
draftguitools.gui_base.GuiCommandBase.call |
Referenced by draftguitools.gui_base.GuiCommandBase.finish(), drafttaskpanels.task_shapestring.ShapeStringTaskPanelEdit.finish(), draftguitools.gui_base_original.DraftTool.finish(), draftguitools.gui_selectplane.Draft_SelectPlane.finish(), draftguitools.gui_subelements.SubelementHighlight.get_selection(), draftguitools.gui_drawing.Drawing.proceed(), draftguitools.gui_mirror.Mirror.proceed(), draftguitools.gui_move.Move.proceed(), draftguitools.gui_offset.Offset.proceed(), draftguitools.gui_rotate.Rotate.proceed(), draftguitools.gui_scale.Scale.proceed(), draftguitools.gui_stretch.Stretch.proceed(), draftguitools.gui_trimex.Trimex.proceed(), and draftguitools.gui_subelements.SubelementHighlight.remove_view_callback().
draftguitools.gui_base.GuiCommandBase.commit_list |
draftguitools.gui_base.GuiCommandBase.doc |
Referenced by draftguitools.gui_lineslope.LineSlope.accept(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_base.GuiCommandSimplest.Activated(), draftguitools.gui_beziers.BezCurve.Activated(), draftguitools.gui_beziers.CubicBezCurve.Activated(), draftguitools.gui_dimension_ops.FlipDimension.Activated(), draftguitools.gui_groups.AddToConstruction.Activated(), draftguitools.gui_heal.Heal.Activated(), draftguitools.gui_layers.Layer.Activated(), draftguitools.gui_splines.BSpline.Activated(), draftguitools.gui_wire2spline.WireToBSpline.Activated(), draftguitools.gui_lines.Line.Activated(), WorkingPlane.Plane.alignToPointAndAxis(), WorkingPlane.Plane.alignToPointAndAxis_SVG(), Mod.Show.SceneDetails.ClipPlane.ClipPlane.apply_data(), Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.apply_data(), Mod.Show.SceneDetails.Pickability.Pickability.apply_data(), Mod.Show.SceneDetails.VProperty.VProperty.apply_data(), importSVG.svgHandler.characters(), draftguitools.gui_drawing.Drawing.createDefaultPage(), draftguitools.gui_fillets.Fillet.draw_arc(), importSVG.svgHandler.endElement(), draftguitools.gui_arcs.Arc_3Points.finish(), draftguitools.gui_fillets.Fillet.finish(), draftguitools.gui_arcs.Arc.finish(), draftguitools.gui_beziers.BezCurve.finish(), draftguitools.gui_beziers.CubicBezCurve.finish(), draftguitools.gui_polygons.Polygon.finish(), draftguitools.gui_rotate.Rotate.finish(), draftguitools.gui_splines.BSpline.finish(), Mod.Show.SceneDetail.SceneDetail.full_key(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.get_annotations(), importIFClegacy.IfcEntity.getProperties(), importIFClegacy.IfcEntity.getProperty(), draftguitools.gui_groups.AddToGroup.proceed(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.read_meta(), draftguitools.gui_trimex.Trimex.redraw(), draftguitools.gui_lines.Line.removeTemporaryObject(), WorkingPlane.Plane.reset(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.save_meta(), 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(), drafttests.test_creation.DraftCreation.tearDown(), PathTests.TestPathDrillable.TestPathDrillable.tearDown(), PathTests.TestPathHelix.TestPathHelix.tearDown(), PathTests.TestPathPropertyBag.TestPathPropertyBag.tearDown(), PathTests.TestPathSetupSheet.TestPathSetupSheet.tearDown(), PathTests.TestPathToolController.TestPathToolController.tearDown(), TestSpreadsheet.SpreadsheetCases.tearDown(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test00(), PathTests.TestPathUtil.TestPathUtil.test00(), PathTests.TestPathPost.TestOutputNameSubstitution.test000(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test01(), PathTests.TestPathUtil.TestPathUtil.test01(), PathTests.TestPathAdaptive.TestPathAdaptive.test02(), PathTests.TestPathUtil.TestPathUtil.test02(), PathTests.TestPathAdaptive.TestPathAdaptive.test03(), PathTests.TestPathHelix.TestPathHelix.test03(), PathTests.TestPathUtil.TestPathUtil.test03(), PathTests.TestPathAdaptive.TestPathAdaptive.test04(), PathTests.TestPathHelix.TestPathHelix.test04(), PathTests.TestPathUtil.TestPathUtil.test04(), PathTests.TestPathAdaptive.TestPathAdaptive.test05(), PathTests.TestPathAdaptive.TestPathAdaptive.test06(), PathTests.TestPathAdaptive.TestPathAdaptive.test07(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test13(), drafttests.test_creation.DraftCreation.test_dimension_linear_obj(), drafttests.test_creation.DraftCreation.test_dimension_radial_obj(), 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.testBindAcrossSheets(), TestSpreadsheet.SpreadsheetCases.testBindHiddenRefAcrossSheets(), TestSpreadsheet.SpreadsheetCases.testClearAlias(), TestSpreadsheetGui.SpreadsheetGuiCases.testCopySingleCell(), TestSpreadsheet.SpreadsheetCases.testCrossDocumentLinks(), TestSpreadsheet.SpreadsheetCases.testExpressionWithAlias(), TestSpreadsheet.SpreadsheetCases.testFixPR6843(), TestSpreadsheet.SpreadsheetCases.testFunctions(), TestSpreadsheet.SpreadsheetCases.testInsertColumnsAlias(), TestSpreadsheet.SpreadsheetCases.testInsertRows(), TestSpreadsheet.SpreadsheetCases.testInsertRowsAlias(), TestSpreadsheet.SpreadsheetCases.testInvoluteGear(), TestSpreadsheet.SpreadsheetCases.testIssue3128(), TestSpreadsheet.SpreadsheetCases.testIssue3225(), TestSpreadsheet.SpreadsheetCases.testIssue3363(), TestSpreadsheet.SpreadsheetCases.testIssue3432(), TestSpreadsheet.SpreadsheetCases.testIssue4156(), TestSpreadsheet.SpreadsheetCases.testIssue6840(), TestSpreadsheet.SpreadsheetCases.testIssue6844(), TestSpreadsheet.SpreadsheetCases.testMatrix(), TestSpreadsheet.SpreadsheetCases.testMergeCells(), TestSpreadsheet.SpreadsheetCases.testMergeCellsAndBind(), TestSpreadsheet.SpreadsheetCases.testNumbers(), TestSpreadsheet.SpreadsheetCases.testPlacementName(), TestSpreadsheet.SpreadsheetCases.testPrecedence(), TestSpreadsheet.SpreadsheetCases.testQuantitiesAndFractionsAsNumbers(), TestSpreadsheet.SpreadsheetCases.testRelationalOperators(), TestSpreadsheet.SpreadsheetCases.testRemoveColumnsAlias(), TestSpreadsheet.SpreadsheetCases.testRemoveColumnsAliasReuseName(), TestSpreadsheet.SpreadsheetCases.testRemoveRows(), TestSpreadsheet.SpreadsheetCases.testRemoveRowsAlias(), TestSpreadsheet.SpreadsheetCases.testRemoveRowsAliasReuseName(), TestSpreadsheet.SpreadsheetCases.testRenameAlias(), TestSpreadsheet.SpreadsheetCases.testRenameAlias2(), TestSpreadsheet.SpreadsheetCases.testRenameAlias3(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias2(), TestSpreadsheet.SpreadsheetCases.testSketcher(), TestSpreadsheet.SpreadsheetCases.testUndoAliasCreationReuseName(), 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().
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_beziers.BezCurve.drawUpdate(), draftguitools.gui_beziers.CubicBezCurve.drawUpdate(), draftguitools.gui_splines.BSpline.drawUpdate(), draftguitools.gui_base.GuiCommandBase.finish(), draftguitools.gui_base_original.DraftTool.finish(), and draftguitools.gui_lines.Line.orientWP().
draftguitools.gui_base.GuiCommandBase.view |
Referenced by femexamples.examplesgui.FemExamples.accept(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_circulararray.CircularArray.Activated(), draftguitools.gui_orthoarray.OrthoArray.Activated(), draftguitools.gui_polararray.PolarArray.Activated(), draftguitools.gui_circulararray.CircularArray.completed(), draftguitools.gui_orthoarray.OrthoArray.completed(), draftguitools.gui_polararray.PolarArray.completed(), femexamples.examplesgui.FemExamples.double_clicked(), femexamples.examplesgui.FemExamples.enable_buttons(), draftguitools.gui_base.GuiCommandBase.finish(), draftguitools.gui_base_original.DraftTool.finish(), draftguitools.gui_selectplane.Draft_SelectPlane.finish(), draftguitools.gui_points.Point.finish(), draftguitools.gui_subelements.SubelementHighlight.get_selection(), PathScripts.PathGetPoint.TaskPanel.getPoint(), draftguitools.gui_selectplane.Draft_SelectPlane.onClickAlign(), draftguitools.gui_drawing.Drawing.proceed(), draftguitools.gui_mirror.Mirror.proceed(), draftguitools.gui_move.Move.proceed(), draftguitools.gui_offset.Offset.proceed(), draftguitools.gui_rotate.Rotate.proceed(), draftguitools.gui_scale.Scale.proceed(), draftguitools.gui_stretch.Stretch.proceed(), draftguitools.gui_trimex.Trimex.proceed(), draftguitools.gui_edit.Edit.register_selection_callback(), draftguitools.gui_subelements.SubelementHighlight.remove_view_callback(), PathScripts.PathGetPoint.TaskPanel.removeGlobalCallbacks(), femexamples.examplesgui.FemExamples.run(), and draftguitools.gui_edit.Edit.unregister_selection_callback().