pcbnew: start integrating P&S router

This commit is contained in:
tomasz.wlostowski@cern.ch 2013-09-10 19:26:44 +02:00
parent b73474bda6
commit fa817b7475
7 changed files with 21 additions and 3 deletions

View File

@ -269,6 +269,10 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent )
switch( aEvent.GetId() ) switch( aEvent.GetId() )
{ {
case ID_PNS_ROUTER_TOOL:
toolName = "pcbnew.InteractiveRouter";
activateTool = true;
break;
case ID_SELECTION_TOOL: case ID_SELECTION_TOOL:
toolName = "pcbnew.InteractiveSelection"; toolName = "pcbnew.InteractiveSelection";
activateTool = true; activateTool = true;

View File

@ -1,4 +1,5 @@
add_definitions(-DPCBNEW) add_definitions(-DPCBNEW)
add_subdirectory(router)
if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting)
@ -117,6 +118,7 @@ set(PCBNEW_AUTOROUTER_SRCS
autorouter/work.cpp autorouter/work.cpp
) )
set(PCBNEW_CLASS_SRCS set(PCBNEW_CLASS_SRCS
tool_modview.cpp tool_modview.cpp
modview.cpp modview.cpp
@ -324,6 +326,7 @@ if (KICAD_SCRIPTING_MODULES)
swig_link_libraries(pcbnew swig_link_libraries(pcbnew
3d-viewer 3d-viewer
pcbcommon pcbcommon
pnsrouter
common common
pcad2kicadpcb pcad2kicadpcb
polygon polygon
@ -420,6 +423,7 @@ endif(APPLE)
target_link_libraries(pcbnew target_link_libraries(pcbnew
3d-viewer 3d-viewer
pcbcommon pcbcommon
pnsrouter
common common
pcad2kicadpcb pcad2kicadpcb
polygon polygon

View File

@ -815,7 +815,7 @@ void PCB_BASE_FRAME::LoadSettings()
{ {
// Copper layers are required for netname layers // Copper layers are required for netname layers
view->SetRequired( GetNetnameLayer( layer ), layer ); view->SetRequired( GetNetnameLayer( layer ), layer );
view->SetLayerTarget( layer, KiGfx::TARGET_CACHED ); view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED );
} }
else if( IsNetnameLayer( layer ) ) else if( IsNetnameLayer( layer ) )
{ {

View File

@ -305,6 +305,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
_( "Interactive selection and drag&drop tool." ), _( "Interactive selection and drag&drop tool." ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL,
_( "Interactive router" ),
_( "Interactive router drag&drop tool." ),
KiBitmap( tools_xpm ) );
/** Create View menu **/ /** Create View menu **/
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;

View File

@ -122,6 +122,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
/* Tom's hacks start */ /* Tom's hacks start */
EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand )
/* Tom's hacks end */ /* Tom's hacks end */
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions ) EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions )

View File

@ -366,7 +366,8 @@ enum pcbnew_ids
ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_SELECT_WIZARD,
ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD,
ID_SELECTION_TOOL ID_SELECTION_TOOL,
ID_PNS_ROUTER_TOOL
}; };
#endif // PCBNEW_ID_H_ #endif // PCBNEW_ID_H_

View File

@ -35,6 +35,7 @@
#include <pcbnew_id.h> #include <pcbnew_id.h>
#include "selection_tool.h" #include "selection_tool.h"
#include <router/router_tool.h>
void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::setupTools()
{ {
@ -45,6 +46,7 @@ void PCB_EDIT_FRAME::setupTools()
// register our selection tool. // register our selection tool.
m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new SELECTION_TOOL );
m_toolManager->RegisterTool( new ROUTER_TOOL );
} }