Changing some filenames in Draft to more unified naming scheme

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5276 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
yorikvanhavre 2011-12-12 16:03:18 +00:00
parent 2b4147da66
commit 6c601565e2
7 changed files with 24 additions and 24 deletions

View File

@ -3,8 +3,8 @@ SET(Draft_SRCS
Init.py
InitGui.py
Draft.py
draftTools.py
draftGui.py
DraftTools.py
DraftGui.py
WorkingPlane.py
importDXF.py
importOCA.py

View File

@ -50,8 +50,8 @@ How it works / how to extend:
- Draft.py: Hosts the functions that are useful for scripting outside of
the Draft module, it is the "Draft API"
- draftGui.py: Creates and manages the special Draft toolbar
- draftTools.py: Contains the user tools of the Draft module (the commands
- DraftGui.py: Creates and manages the special Draft toolbar
- DraftTools.py: Contains the user tools of the Draft module (the commands
from the Draft menu), and a couple of helpers such as the "Trackers"
(temporary geometry used while drawing)
- draftlibs/fcvec.py: a vector math library, contains functions that are not
@ -59,10 +59,10 @@ How it works / how to extend:
- draftlibs/fcgeo.py: a library of misc functions to manipulate shapes.
The Draft.py contains everything to create geometry in the scene. You
should start there if you intend to modify something. Then, the draftTools
are where the FreeCAD commands are defined, while in draftGui.py
you have the ui part, ie. the draft command bar. Both draftTools and
draftGui are loaded at module init by InitGui.py, which is called directly by FreeCAD.
should start there if you intend to modify something. Then, the DraftTools
are where the FreeCAD commands are defined, while in DraftGui.py
you have the ui part, ie. the draft command bar. Both DraftTools and
DraftGui are loaded at module init by InitGui.py, which is called directly by FreeCAD.
The tools all have an Activated() function, which is called by FreeCAD when the
corresponding FreeCAD command is invoked. Most tools then create the trackers they
will need during operation, then place a callback mechanism, which will detect

View File

@ -33,7 +33,7 @@ import os, FreeCAD, FreeCADGui, Part, WorkingPlane, math, re, importSVG, Draft,
from functools import partial
from draftlibs import fcvec,fcgeo
from FreeCAD import Vector
from draftGui import todo,QtCore,QtGui
from DraftGui import todo,QtCore,QtGui
from pivy import coin
# loads a translation engine

View File

@ -181,8 +181,8 @@ class DraftWorkbench (Workbench):
return
Log ('Loading Draft GUI...\n')
try:
import macros,draftTools,draftGui
self.appendMenu(["&Macro",str(draftTools.translate("draft","Installed Macros"))],macros.macrosList)
import macros,DraftTools,DraftGui
self.appendMenu(["&Macro",str(DraftTools.translate("draft","Installed Macros"))],macros.macrosList)
except:
pass
self.cmdList = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc",
@ -194,11 +194,11 @@ class DraftWorkbench (Workbench):
"Draft_DelPoint","Draft_Shape2DView","Draft_Draft2Sketch","Draft_Array"]
self.treecmdList = ["Draft_ApplyStyle","Draft_ToggleDisplayMode","Draft_AddToGroup","Draft_SelectGroup"]
self.lineList = ["Draft_UndoLine","Draft_FinishLine","Draft_CloseLine"]
self.appendToolbar(str(draftTools.translate("draft","Draft creation tools")),self.cmdList)
self.appendToolbar(str(draftTools.translate("draft","Draft modification tools")),self.modList)
self.appendMenu(str(draftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendMenu([str(draftTools.translate("draft","Draft")),str(draftTools.translate("draft","Display options"))],self.treecmdList)
self.appendMenu([str(draftTools.translate("draft","Draft")),str(draftTools.translate("draft","Wire tools"))],self.lineList)
self.appendToolbar(str(DraftTools.translate("draft","Draft creation tools")),self.cmdList)
self.appendToolbar(str(DraftTools.translate("draft","Draft modification tools")),self.modList)
self.appendMenu(str(DraftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendMenu([str(DraftTools.translate("draft","Draft")),str(DraftTools.translate("draft","Display options"))],self.treecmdList)
self.appendMenu([str(DraftTools.translate("draft","Draft")),str(DraftTools.translate("draft","Wire tools"))],self.lineList)
def Activated(self):
FreeCADGui.draftToolBar.Activated()
@ -210,16 +210,16 @@ class DraftWorkbench (Workbench):
if (recipient == "View"):
if (FreeCAD.activeDraftCommand == None):
if (FreeCADGui.Selection.getSelection() != []):
self.appendContextMenu(str(draftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendContextMenu(str(draftTools.translate("draft","Display options")),self.treecmdList)
self.appendContextMenu(str(DraftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendContextMenu(str(DraftTools.translate("draft","Display options")),self.treecmdList)
else:
self.appendContextMenu(str(draftTools.translate("draft","Draft")),self.cmdList)
self.appendContextMenu(str(DraftTools.translate("draft","Draft")),self.cmdList)
else:
if (FreeCAD.activeDraftCommand.featureName == "Line"):
self.appendContextMenu("",self.lineList)
else:
if (FreeCADGui.Selection.getSelection() != []):
self.appendContextMenu(str(draftTools.translate("draft","Display options")),self.treecmdList)
self.appendContextMenu(str(DraftTools.translate("draft","Display options")),self.treecmdList)
def GetClassName(self):
return "Gui::PythonWorkbench"

View File

@ -9,8 +9,8 @@
datadir = $(prefix)/Mod/Draft
data_DATA = \
Draft.py \
draftTools.py \
draftGui.py \
DraftTools.py \
DraftGui.py \
WorkingPlane.py \
importOCA.py \
importDXF.py \

View File

@ -27,8 +27,8 @@
<File Id="DraftInitPy" Name="Init.py" DiskId="1" />
<File Id="DraftInitGuiPy" Name="InitGui.py" DiskId="1" />
<File Id="DraftPy" Name="Draft.py" DiskId="1" />
<File Id="draftToolsPy" Name="draftTools.py" DiskId="1" />
<File Id="draftGuiPy" Name="draftGui.py" DiskId="1" />
<File Id="DraftToolsPy" Name="DraftTools.py" DiskId="1" />
<File Id="DraftGuiPy" Name="DraftGui.py" DiskId="1" />
<File Id="importDXFPy" Name="importDXF.py" DiskId="1" />
<File Id="importOCAPy" Name="importOCA.py" DiskId="1" />
<File Id="importSVGPy" Name="importSVG.py" DiskId="1" />