diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 4b10ca678c..e2f23e300a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -289,7 +289,7 @@ set( PCBNEW_CLASS_SRCS tools/edit_tool.cpp tools/pcbnew_control.cpp tools/pcb_editor_control.cpp - tools/module_tools.cpp + tools/module_editor_tools.cpp tools/placement_tool.cpp tools/common_actions.cpp tools/grid_helper.cpp diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 43ce535b5d..77f1502c48 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -64,7 +64,7 @@ #include "tools/drawing_tool.h" #include "tools/point_editor.h" #include "tools/pcbnew_control.h" -#include "tools/module_tools.h" +#include "tools/module_editor_tools.h" #include "tools/placement_tool.h" #include "tools/picker_tool.h" #include "tools/pad_tool.h" @@ -955,11 +955,10 @@ void FOOTPRINT_EDIT_FRAME::setupTools() m_toolManager->RegisterTool( new DRAWING_TOOL ); m_toolManager->RegisterTool( new POINT_EDITOR ); m_toolManager->RegisterTool( new PCBNEW_CONTROL ); - m_toolManager->RegisterTool( new MODULE_TOOLS ); + m_toolManager->RegisterTool( new MODULE_EDITOR_TOOLS ); m_toolManager->RegisterTool( new PLACEMENT_TOOL ); m_toolManager->RegisterTool( new PICKER_TOOL ); - m_toolManager->GetTool()->SetEditModules( true ); m_toolManager->GetTool()->SetEditModules( true ); m_toolManager->GetTool()->SetEditModules( true ); diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_editor_tools.cpp similarity index 93% rename from pcbnew/tools/module_tools.cpp rename to pcbnew/tools/module_editor_tools.cpp index 6f8fbada40..8ee451cbd3 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_editor_tools.cpp @@ -22,7 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "module_tools.h" +#include "module_editor_tools.h" #include "selection_tool.h" #include "common_actions.h" #include @@ -49,7 +49,7 @@ using namespace std::placeholders; #include -MODULE_TOOLS::MODULE_TOOLS() : +MODULE_EDITOR_TOOLS::MODULE_EDITOR_TOOLS() : TOOL_INTERACTIVE( "pcbnew.ModuleEditor" ), m_view( NULL ), m_controls( NULL ), m_board( NULL ), m_frame( NULL ) { @@ -62,13 +62,13 @@ MODULE_TOOLS::MODULE_TOOLS() : } -MODULE_TOOLS::~MODULE_TOOLS() +MODULE_EDITOR_TOOLS::~MODULE_EDITOR_TOOLS() { delete m_axisOrigin; } -void MODULE_TOOLS::Reset( RESET_REASON aReason ) +void MODULE_EDITOR_TOOLS::Reset( RESET_REASON aReason ) { // Init variables used by every drawing tool m_view = getView(); @@ -85,7 +85,7 @@ void MODULE_TOOLS::Reset( RESET_REASON aReason ) } -bool MODULE_TOOLS::Init() +bool MODULE_EDITOR_TOOLS::Init() { // Find the selection tool, so they can cooperate SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); @@ -102,7 +102,7 @@ bool MODULE_TOOLS::Init() } -int MODULE_TOOLS::PlacePad( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::PlacePad( const TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_MODEDIT_PAD_TOOL, wxCURSOR_PENCIL, _( "Add pads" ) ); @@ -189,7 +189,7 @@ int MODULE_TOOLS::PlacePad( const TOOL_EVENT& aEvent ) } -int MODULE_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent ) { std::list pads; std::set allPads; @@ -331,7 +331,7 @@ int MODULE_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent ) } -int MODULE_TOOLS::CopyItems( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::CopyItems( const TOOL_EVENT& aEvent ) { const SELECTION& selection = m_toolMgr->GetTool()->GetSelection(); @@ -401,7 +401,7 @@ int MODULE_TOOLS::CopyItems( const TOOL_EVENT& aEvent ) } -int MODULE_TOOLS::PasteItems( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::PasteItems( const TOOL_EVENT& aEvent ) { // Parse clipboard PCB_IO io( CTL_FOR_CLIPBOARD ); @@ -519,7 +519,7 @@ int MODULE_TOOLS::PasteItems( const TOOL_EVENT& aEvent ) } -int MODULE_TOOLS::ModuleTextOutlines( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::ModuleTextOutlines( const TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = getView(); KIGFX::PCB_RENDER_SETTINGS* settings = @@ -554,7 +554,7 @@ int MODULE_TOOLS::ModuleTextOutlines( const TOOL_EVENT& aEvent ) } -int MODULE_TOOLS::ModuleEdgeOutlines( const TOOL_EVENT& aEvent ) +int MODULE_EDITOR_TOOLS::ModuleEdgeOutlines( const TOOL_EVENT& aEvent ) { KIGFX::VIEW* view = getView(); KIGFX::PCB_RENDER_SETTINGS* settings = @@ -584,12 +584,12 @@ int MODULE_TOOLS::ModuleEdgeOutlines( const TOOL_EVENT& aEvent ) } -void MODULE_TOOLS::SetTransitions() +void MODULE_EDITOR_TOOLS::SetTransitions() { - Go( &MODULE_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); - Go( &MODULE_TOOLS::EnumeratePads, COMMON_ACTIONS::enumeratePads.MakeEvent() ); - Go( &MODULE_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); - Go( &MODULE_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); - Go( &MODULE_TOOLS::ModuleTextOutlines, COMMON_ACTIONS::moduleTextOutlines.MakeEvent() ); - Go( &MODULE_TOOLS::ModuleEdgeOutlines, COMMON_ACTIONS::moduleEdgeOutlines.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::PlacePad, COMMON_ACTIONS::placePad.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::EnumeratePads, COMMON_ACTIONS::enumeratePads.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::CopyItems, COMMON_ACTIONS::copyItems.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::PasteItems, COMMON_ACTIONS::pasteItems.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::ModuleTextOutlines, COMMON_ACTIONS::moduleTextOutlines.MakeEvent() ); + Go( &MODULE_EDITOR_TOOLS::ModuleEdgeOutlines, COMMON_ACTIONS::moduleEdgeOutlines.MakeEvent() ); } diff --git a/pcbnew/tools/module_tools.h b/pcbnew/tools/module_editor_tools.h similarity index 93% rename from pcbnew/tools/module_tools.h rename to pcbnew/tools/module_editor_tools.h index 584c49f79f..1435609882 100644 --- a/pcbnew/tools/module_tools.h +++ b/pcbnew/tools/module_editor_tools.h @@ -22,8 +22,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef MODULE_TOOLS_H -#define MODULE_TOOLS_H +#ifndef MODULE_EDITOR_TOOLS_H +#define MODULE_EDITOR_TOOLS_H #include #include @@ -37,15 +37,15 @@ class BOARD; class PCB_EDIT_FRAME; /** - * Class MODULE_TOOLS + * Class MODULE_EDITOR_TOOLS * * Module editor specific tools. */ -class MODULE_TOOLS : public TOOL_INTERACTIVE +class MODULE_EDITOR_TOOLS : public TOOL_INTERACTIVE { public: - MODULE_TOOLS(); - ~MODULE_TOOLS(); + MODULE_EDITOR_TOOLS(); + ~MODULE_EDITOR_TOOLS(); /// @copydoc TOOL_INTERACTIVE::Reset() void Reset( RESET_REASON aReason ) override;