DraftGui Namespace Reference
GUI elements and utilities of the Draft workbench. More...
Classes | |
class | DraftBaseWidget |
class | DraftDockWidget |
class | DraftLineEdit |
class | DraftTaskPanel |
class | DraftToolBar |
class | FacebinderTaskPanel |
Functions | |
def | displayExternal (internValue, decimals=None, dim='Length', showUnit=True, unit=None) |
def | getDefaultUnit (dim) |
def | makeFormatSpec (decimals=4, dim='Length') |
Variables | |
draftToolBar | |
for debugging: else: msg = "TranslateWidget: Can not translate widget: {0} type: {1}\n".format(w.objectName(),w.metaObject().className()) FreeCAD.Console.PrintMessage(msg) More... | |
dictionary | inCommandShortcuts |
todo = draftutils.todo.ToDo | |
translate = draftutils.translate.translate | |
utf8_decode = draftutils.utils.utf8_decode | |
Detailed Description
GUI elements and utilities of the Draft workbench.
This module provides GUI tools for the Draft workbench, such as toolbars and task panels, and Qt-dependent utilities such as a delayed (todo) commit system
Function Documentation
◆ displayExternal()
def DraftGui.displayExternal | ( | internValue, | |
decimals = None , |
|||
dim = 'Length' , |
|||
showUnit = True , |
|||
unit = None |
|||
) |
return an internal value (ie mm) Length or Angle converted for display according to Units Schema in use. Unit can be used to force the value to express in a certain unit
Referenced by DraftGui.DraftToolBar.changeAngleValue(), DraftGui.DraftToolBar.displayPoint(), and DraftGui.DraftToolBar.setRadiusValue().
◆ getDefaultUnit()
def DraftGui.getDefaultUnit | ( | dim | ) |
return default Unit of Measure for a Dimension based on user preference Units Schema
Referenced by makeFormatSpec().
◆ makeFormatSpec()
def DraftGui.makeFormatSpec | ( | decimals = 4 , |
|
dim = 'Length' |
|||
) |
return a % format spec with specified decimals for a specified dimension based on on user preference Units Schema
References getDefaultUnit().
Variable Documentation
◆ draftToolBar
DraftGui.draftToolBar |
for debugging: else: msg = "TranslateWidget: Can not translate widget: {0} type: {1}\n".format(w.objectName(),w.metaObject().className()) FreeCAD.Console.PrintMessage(msg)
◆ inCommandShortcuts
dictionary DraftGui.inCommandShortcuts |
Initial value:
2 "Relative": [Draft.getParam("inCommandShortcutRelative", "R"),translate("draft","Relative"), "isRelative"],
3 "Continue": [Draft.getParam("inCommandShortcutContinue", "T"),translate("draft","Continue"), "continueCmd"],
4 "Close": [Draft.getParam("inCommandShortcutClose", "O"),translate("draft","Close"), "closeButton"],
6 "SubelementMode": [Draft.getParam("inCommandShortcutSubelementMode", "D"),translate("draft","Subelement mode"), "isSubelementMode"],
10 "Increase": [Draft.getParam("inCommandShortcutIncrease", "["),translate("draft","Increase snap radius"), None],
11 "Decrease": [Draft.getParam("inCommandShortcutDecrease", "]"),translate("draft","Decrease snap radius"), None],
12 "RestrictX": [Draft.getParam("inCommandShortcutRestrictX", "X"),translate("draft","Restrict X"), None],
13 "RestrictY": [Draft.getParam("inCommandShortcutRestrictY", "Y"),translate("draft","Restrict Y"), None],
14 "RestrictZ": [Draft.getParam("inCommandShortcutRestrictZ", "Z"),translate("draft","Restrict Z"), None],
15 "SelectEdge": [Draft.getParam("inCommandShortcutSelectEdge", "E"),translate("draft","Select edge"), "selectButton"],
16 "AddHold": [Draft.getParam("inCommandShortcutAddHold", "Q"),translate("draft","Add custom snap point"),None],
17 "Length": [Draft.getParam("inCommandShortcutLength", "H"),translate("draft","Length mode"), "lengthValue"],
19 "SetWP": [Draft.getParam("inCommandShortcutSetWP", "U"),translate("draft","Set Working Plane"), "orientWPButton"],
20 "CycleSnap": [Draft.getParam("inCommandShortcutCycleSnap", "`"),translate("draft","Cycle snap object"), None],
21 "NearSnap": [Draft.getParam("inCommandShortcutNearSnap", "N"),translate("draft","Toggle near snap on/off"), None],
◆ todo
DraftGui.todo = draftutils.todo.ToDo |
◆ translate
DraftGui.translate = draftutils.translate.translate |
◆ utf8_decode
DraftGui.utf8_decode = draftutils.utils.utf8_decode |
Referenced by DraftGui.DraftToolBar.validateFile().
Provide translate functions for the Draft Workbench.