From 6c601565e2c149610eed18a1659f20c152a8671c Mon Sep 17 00:00:00 2001 From: yorikvanhavre Date: Mon, 12 Dec 2011 16:03:18 +0000 Subject: [PATCH] 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 --- src/Mod/Draft/CMakeLists.txt | 4 ++-- src/Mod/Draft/Draft.py | 12 +++++----- src/Mod/Draft/{draftGui.py => DraftGui.py} | 0 .../Draft/{draftTools.py => DraftTools.py} | 2 +- src/Mod/Draft/InitGui.py | 22 +++++++++---------- src/Mod/Draft/Makefile.am | 4 ++-- src/WindowsInstaller/ModDraft.wxi | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) rename src/Mod/Draft/{draftGui.py => DraftGui.py} (100%) rename src/Mod/Draft/{draftTools.py => DraftTools.py} (99%) diff --git a/src/Mod/Draft/CMakeLists.txt b/src/Mod/Draft/CMakeLists.txt index 9ce900bfb..593095a2e 100644 --- a/src/Mod/Draft/CMakeLists.txt +++ b/src/Mod/Draft/CMakeLists.txt @@ -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 diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index c9022417c..eb9cf9259 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -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 diff --git a/src/Mod/Draft/draftGui.py b/src/Mod/Draft/DraftGui.py similarity index 100% rename from src/Mod/Draft/draftGui.py rename to src/Mod/Draft/DraftGui.py diff --git a/src/Mod/Draft/draftTools.py b/src/Mod/Draft/DraftTools.py similarity index 99% rename from src/Mod/Draft/draftTools.py rename to src/Mod/Draft/DraftTools.py index 64ba541e2..0474cb30f 100755 --- a/src/Mod/Draft/draftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -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 diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index 76cea71ce..0e5917df3 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -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" diff --git a/src/Mod/Draft/Makefile.am b/src/Mod/Draft/Makefile.am index 0b9812345..2ed301f93 100644 --- a/src/Mod/Draft/Makefile.am +++ b/src/Mod/Draft/Makefile.am @@ -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 \ diff --git a/src/WindowsInstaller/ModDraft.wxi b/src/WindowsInstaller/ModDraft.wxi index 817ce0373..0f709ef40 100644 --- a/src/WindowsInstaller/ModDraft.wxi +++ b/src/WindowsInstaller/ModDraft.wxi @@ -27,8 +27,8 @@ - - + +