cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity

This commit is contained in:
Tomasz Włostowski 2017-10-31 16:38:10 +01:00
parent 3170eba801
commit b945d2a708
34 changed files with 57 additions and 58 deletions

View File

@ -126,7 +126,7 @@ set( BMAPS_MID
add_line2bus
add_line_label
add_line
add_mires
add_pcb_target
add_polygon
add_power
add_rectangle
@ -326,7 +326,7 @@ set( BMAPS_MID
locked
measurement
minus
mirepcb
pcb_target
mirror_h
mirror_v
mode_module

View File

@ -47,6 +47,6 @@ static const unsigned char png[] = {
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE add_mires_xpm[1] = {{ png, sizeof( png ), "add_mires_xpm" }};
const BITMAP_OPAQUE add_pcb_target_xpm[1] = {{ png, sizeof( png ), "add_pcb_target_xpm" }};
//EOF

View File

@ -40,6 +40,6 @@ static const unsigned char png[] = {
0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE mirepcb_xpm[1] = {{ png, sizeof( png ), "mirepcb_xpm" }};
const BITMAP_OPAQUE pcb_target_xpm[1] = {{ png, sizeof( png ), "pcb_target_xpm" }};
//EOF

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -379,7 +379,7 @@ set( PCB_COMMON_SRCS
../pcbnew/class_netinfo_item.cpp
../pcbnew/class_netinfolist.cpp
../pcbnew/class_marker_pcb.cpp
../pcbnew/class_mire.cpp
../pcbnew/class_pcb_target.cpp
../pcbnew/class_module.cpp
../pcbnew/class_pad.cpp
../pcbnew/class_pad_custom_shape_functions.cpp

View File

@ -1221,10 +1221,10 @@ SIM_PLOT_FRAME::SIGNAL_CONTEXT_MENU::SIGNAL_CONTEXT_MENU( const wxString& aSigna
if( trace->HasCursor() )
AddMenuItem( this, HIDE_CURSOR, _( "Hide cursor" ),
wxEmptyString, KiBitmap( mirepcb_xpm ) );
wxEmptyString, KiBitmap( pcb_target_xpm ) );
else
AddMenuItem( this, SHOW_CURSOR, _( "Show cursor" ),
wxEmptyString, KiBitmap( mirepcb_xpm ) );
wxEmptyString, KiBitmap( pcb_target_xpm ) );
Connect( wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( SIGNAL_CONTEXT_MENU::onMenuEvent ), NULL, this );
}

View File

@ -51,7 +51,7 @@ EXTERN_BITMAP( add_keepout_area_xpm )
EXTERN_BITMAP( add_line2bus_xpm )
EXTERN_BITMAP( add_line_label_xpm )
EXTERN_BITMAP( add_line_xpm )
EXTERN_BITMAP( add_mires_xpm )
EXTERN_BITMAP( add_pcb_target_xpm )
EXTERN_BITMAP( add_polygon_xpm )
EXTERN_BITMAP( add_power_xpm )
EXTERN_BITMAP( add_rectangle_xpm )
@ -268,7 +268,6 @@ EXTERN_BITMAP( local_ratsnest_xpm )
EXTERN_BITMAP( locked_xpm )
EXTERN_BITMAP( measurement_xpm )
EXTERN_BITMAP( minus_xpm )
EXTERN_BITMAP( mirepcb_xpm )
EXTERN_BITMAP( mirror_h_xpm )
EXTERN_BITMAP( mirror_v_xpm )
EXTERN_BITMAP( mode_module_xpm )
@ -353,6 +352,7 @@ EXTERN_BITMAP( palette_xpm )
EXTERN_BITMAP( part_properties_xpm )
EXTERN_BITMAP( paste_xpm )
EXTERN_BITMAP( path_xpm )
EXTERN_BITMAP( pcb_target_xpm )
EXTERN_BITMAP( pcbnew_xpm )
EXTERN_BITMAP( pcbcalculator_xpm )
EXTERN_BITMAP( pcb_offset_xpm )

View File

@ -442,7 +442,7 @@ if( KICAD_SCRIPTING ) # Generate pcbnew.py and pcbnew_wrap.cxx using swig
DEPENDS swig/drawsegment.i
DEPENDS swig/edge_mod.i
DEPENDS swig/marker_pcb.i
DEPENDS swig/mire.i
DEPENDS swig/pcb_target.i
DEPENDS swig/module.i
DEPENDS swig/netclass.i
DEPENDS swig/netinfo.i

View File

@ -40,7 +40,7 @@
#include <class_track.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_module.h>
#include <class_dimension.h>
#include <class_zone.h>

View File

@ -48,7 +48,7 @@
#include <class_track.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_module.h>
#include <class_dimension.h>
#include <class_edge_mod.h>

View File

@ -56,7 +56,7 @@
#include <class_marker_pcb.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_dimension.h>
#include <connectivity.h>

View File

@ -25,8 +25,8 @@
*/
/**
* @file class_mire.cpp
* MIRE class definition (targets for photo plots)
* @file class_pcb_target.cpp
* PCB_TARGET class definition - targets for photo plots, formerly called MIRE (from French 'mire optique')
*/
#include <fctsys.h>
@ -41,7 +41,7 @@
#include <wxPcbStruct.h>
#include <class_board.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <base_units.h>
@ -199,7 +199,7 @@ wxString PCB_TARGET::GetSelectMenuText() const
BITMAP_DEF PCB_TARGET::GetMenuImage() const
{
return add_mires_xpm;
return add_pcb_target_xpm;
}
EDA_ITEM* PCB_TARGET::Clone() const

View File

@ -23,13 +23,12 @@
*/
/**
* @file class_mire.h
* @file class_pcb_target.h
* @brief PCB_TARGET class definition. (targets for photo plots).
*/
#ifndef MIRE_H
#define MIRE_H
#ifndef PCB_TARGET_H_
#define PCB_TARGET_H_
#include <class_board_item.h>
@ -112,4 +111,4 @@ public:
};
#endif // #define MIRE_H
#endif

View File

@ -83,7 +83,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_FLIP_TEXTEPCB:
case ID_POPUP_PCB_COPY_TEXTEPCB:
case ID_POPUP_PCB_EDIT_TEXTEPCB:
case ID_POPUP_PCB_EDIT_MIRE:
case ID_POPUP_PCB_EDIT_PCB_TARGET:
case ID_POPUP_PCB_ROTATE_TEXTMODULE:
case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE:
case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE:
@ -154,7 +154,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_DRAG_MODULE_REQUEST:
case ID_POPUP_PCB_MOVE_MODULE_REQUEST:
case ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST:
case ID_POPUP_PCB_MOVE_MIRE_REQUEST:
case ID_POPUP_PCB_MOVE_PCB_TARGET_REQUEST:
break;
case ID_POPUP_CANCEL_CURRENT_COMMAND:
@ -1069,17 +1069,17 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas->MoveCursorToCrossHair();
break;
case ID_POPUP_PCB_MOVE_MIRE_REQUEST:
case ID_POPUP_PCB_MOVE_PCB_TARGET_REQUEST:
BeginMoveTarget( (PCB_TARGET*) GetCurItem(), &dc );
m_canvas->MoveCursorToCrossHair();
break;
case ID_POPUP_PCB_EDIT_MIRE:
case ID_POPUP_PCB_EDIT_PCB_TARGET:
ShowTargetOptionsDialog( (PCB_TARGET*) GetCurItem(), &dc );
m_canvas->MoveCursorToCrossHair();
break;
case ID_POPUP_PCB_DELETE_MIRE:
case ID_POPUP_PCB_DELETE_PCB_TARGET:
m_canvas->MoveCursorToCrossHair();
DeleteTarget( (PCB_TARGET*) GetCurItem(), &dc );
SetCurItem( NULL );
@ -1474,7 +1474,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) );
break;
case ID_PCB_MIRE_BUTT:
case ID_PCB_TARGET_BUTT:
SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) );
break;

View File

@ -35,7 +35,7 @@
#include <class_module.h>
#include <class_track.h>
#include <class_pcb_text.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_drawsegment.h>
#include <pcbnew.h>
@ -642,7 +642,7 @@ bool PCB_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand )
case PCB_TARGET_T:
if( aIdCommand == HK_EDIT_ITEM )
evt_type = ID_POPUP_PCB_EDIT_MIRE;
evt_type = ID_POPUP_PCB_EDIT_PCB_TARGET;
break;
@ -781,7 +781,7 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand )
case PCB_TARGET_T:
if( aIdCommand == HK_MOVE_ITEM )
evt_type = ID_POPUP_PCB_MOVE_MIRE_REQUEST;
evt_type = ID_POPUP_PCB_MOVE_PCB_TARGET_REQUEST;
break;

View File

@ -37,7 +37,7 @@
#include <class_track.h>
#include <class_zone.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_edge_mod.h>
#include <pcb_plot_params.h>
#include <zones.h>

View File

@ -78,7 +78,7 @@
#include <class_zone.h>
#include <class_dimension.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_edge_mod.h>
#include <3d_cache/3d_info.h>
#include <pcb_plot_params.h>

View File

@ -350,9 +350,9 @@ void preparePlaceMenu( wxMenu* aParentMenu )
_( "&Dimension" ), _( "Add dimension" ),
KiBitmap( add_dimension_xpm ) );
AddMenuItem( aParentMenu, ID_PCB_MIRE_BUTT,
AddMenuItem( aParentMenu, ID_PCB_TARGET_BUTT,
_( "La&yer Alignment Target" ), _( "Add layer alignment target" ),
KiBitmap( add_mires_xpm ) );
KiBitmap( add_pcb_target_xpm ) );
aParentMenu->AppendSeparator();

View File

@ -41,7 +41,7 @@
#include <class_pcb_text.h>
#include <class_text_mod.h>
#include <class_module.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <project.h>
#include <pcbnew.h>
@ -225,7 +225,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break;
case ID_PCB_MIRE_BUTT:
case ID_PCB_TARGET_BUTT:
if( (curr_item == NULL) || (curr_item->GetFlags() == 0) )
{
SetCurItem( (BOARD_ITEM*) CreateTarget( aDC ) );

View File

@ -296,7 +296,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
{
msg = AddHotkeyName( _( "Move" ), g_Board_Editor_Hokeys_Descr,
HK_MOVE_ITEM );
AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_MIRE_REQUEST,
AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_PCB_TARGET_REQUEST,
msg, KiBitmap( move_target_xpm ) );
msg = AddHotkeyName( _("Move Exactly" ), g_Board_Editor_Hokeys_Descr,
@ -311,10 +311,10 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr,
HK_EDIT_ITEM );
AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_MIRE, msg, KiBitmap( edit_xpm ) );
AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_PCB_TARGET, msg, KiBitmap( edit_xpm ) );
msg = AddHotkeyName( _( "Delete" ), g_Board_Editor_Hokeys_Descr, HK_DELETE );
AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_MIRE,
AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_PCB_TARGET,
msg, KiBitmap( delete_xpm ) );
}

View File

@ -33,7 +33,7 @@
#include <class_colors_design_settings.h>
#include <class_marker_pcb.h>
#include <class_dimension.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_marker_pcb.h>
#include <layers_id_colors_and_visibility.h>

View File

@ -38,7 +38,7 @@
#include <class_dimension.h>
#include <class_drawsegment.h>
#include <class_edge_mod.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_module.h>
#include <class_netclass.h>
#include <class_pad.h>

View File

@ -38,7 +38,7 @@ enum pcbnew_ids
ID_PCB_ARC_BUTT,
ID_PCB_ADD_TEXT_BUTT,
ID_PCB_DIMENSION_BUTT,
ID_PCB_MIRE_BUTT,
ID_PCB_TARGET_BUTT,
ID_PCB_DELETE_ITEM_BUTT,
ID_PCB_PLACE_OFFSET_COORD_BUTT,
ID_PCB_PLACE_GRID_COORD_BUTT,
@ -135,9 +135,9 @@ enum pcbnew_ids
ID_POPUP_PCB_DELETE_DIMENSION,
ID_POPUP_PCB_MOVE_TEXT_DIMENSION_REQUEST,
ID_POPUP_PCB_MOVE_MIRE_REQUEST,
ID_POPUP_PCB_DELETE_MIRE,
ID_POPUP_PCB_EDIT_MIRE,
ID_POPUP_PCB_MOVE_PCB_TARGET_REQUEST,
ID_POPUP_PCB_DELETE_PCB_TARGET,
ID_POPUP_PCB_EDIT_PCB_TARGET,
ID_POPUP_PCB_STOP_CURRENT_DRAWING,

View File

@ -45,7 +45,7 @@
#include <class_pcb_text.h>
#include <class_zone.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_dimension.h>
#include <pcbnew.h>

View File

@ -43,7 +43,7 @@
#include <class_pcb_text.h>
#include <class_zone.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_dimension.h>
#include <pcbnew.h>

View File

@ -56,7 +56,7 @@ HANDLE_EXCEPTIONS(BOARD::TracksInNetBetweenPoints)
%include dimension.i
%include drawsegment.i
%include marker_pcb.i
%include mire.i
%include pcb_target.i
%include text_mod.i
%include edge_mod.i
%include netinfo.i

View File

@ -1,6 +1,5 @@
%include class_mire.h
%include class_pcb_target.h
%{
#include <class_mire.h>
#include <class_pcb_target.h>
%}

View File

@ -37,7 +37,7 @@
#include <board_commit.h>
#include <class_board.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <pcbnew.h>
#include <dialog_target_properties_base.h>

View File

@ -472,7 +472,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
m_drawToolBar->AddTool( ID_PCB_DIMENSION_BUTT, wxEmptyString, KiBitmap( add_dimension_xpm ),
_( "Add dimension" ), wxITEM_CHECK );
m_drawToolBar->AddTool( ID_PCB_MIRE_BUTT, wxEmptyString, KiBitmap( add_mires_xpm ),
m_drawToolBar->AddTool( ID_PCB_TARGET_BUTT, wxEmptyString, KiBitmap( add_pcb_target_xpm ),
_( "Add layer alignment target" ), wxITEM_CHECK );
m_drawToolBar->AddSeparator();

View File

@ -87,7 +87,7 @@ boost::optional<TOOL_EVENT> PCB_ACTIONS::TranslateLegacyId( int aId )
case ID_PCB_DIMENSION_BUTT:
return PCB_ACTIONS::drawDimension.MakeEvent();
case ID_PCB_MIRE_BUTT:
case ID_PCB_TARGET_BUTT:
return PCB_ACTIONS::placeTarget.MakeEvent();
case ID_MODEDIT_PAD_TOOL:

View File

@ -41,7 +41,7 @@
#include <class_zone.h>
#include <pcb_draw_panel_gal.h>
#include <class_module.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <connectivity.h>
#include <collectors.h>
#include <zones_functions_for_undo_redo.h>
@ -595,7 +595,7 @@ int PCB_EDITOR_CONTROL::PlaceTarget( const TOOL_EVENT& aEvent )
controls->SetSnapping( true );
Activate();
m_frame->SetToolID( ID_PCB_MIRE_BUTT, wxCURSOR_PENCIL, _( "Add layer alignment target" ) );
m_frame->SetToolID( ID_PCB_TARGET_BUTT, wxCURSOR_PENCIL, _( "Add layer alignment target" ) );
// Main loop: keep receiving events
while( OPT_TOOL_EVENT evt = Wait() )

View File

@ -39,7 +39,7 @@ using namespace std::placeholders;
#include <class_track.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <class_mire.h>
#include <class_pcb_target.h>
#include <class_module.h>
#include <class_dimension.h>
#include <class_zone.h>

View File

@ -11,3 +11,4 @@ if( KICAD_SCRIPTING_MODULES )
endif()
add_subdirectory( geometry )
add_subdirectory( pcb_test_window )