Add CvPcb footprint search and filter by name.

This commit is contained in:
lukasz.iwaszkiewicz@gmail.com 2016-02-24 17:30:35 +01:00 committed by jean-pierre charras
parent 38b9fcd4c1
commit 0829446c86
14 changed files with 420 additions and 111 deletions

View File

@ -362,6 +362,7 @@ set( BMAPS_MID
module_options
module_pin_filtered_list
module_library_list
module_name_filtered_list
module_ratsnest
module
modview_icon

View File

@ -0,0 +1,89 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x08, 0x06, 0x00, 0x00, 0x00, 0x2f, 0xde, 0x3e,
0x60, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x00, 0x0e,
0x58, 0x01, 0x22, 0x7b, 0x1d, 0x35, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f,
0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63,
0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x04, 0x38, 0x49,
0x44, 0x41, 0x54, 0x48, 0x89, 0xbd, 0x95, 0x5f, 0x4c, 0x53, 0x57, 0x1c, 0xc7, 0x3f, 0xe7, 0xde,
0xde, 0x0b, 0x6d, 0x57, 0xdb, 0x2e, 0x13, 0x44, 0x4c, 0x24, 0x1d, 0x4b, 0xb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x77, 0x37, 0x99, 0x4c, 0x06, 0x8f, 0xc7, 0x43, 0x4b,
0x4b, 0x0b, 0xf5, 0xf5, 0xf5, 0xab, 0x2a, 0xb6, 0xad, 0xb2, 0xbc, 0x00, 0x92, 0xc9, 0x64, 0x7e,
0x1d, 0x02, 0x81, 0x00, 0xad, 0xad, 0xad, 0x78, 0xbd, 0xde, 0x35, 0x63, 0xff, 0x95, 0x90, 0xd7,
0xeb, 0xe5, 0xdc, 0xb9, 0x73, 0x94, 0x94, 0x94, 0xb0, 0x7b, 0xf7, 0xee, 0x75, 0x63, 0x2d, 0x42,
0x8a, 0xa2, 0xa4, 0xcb, 0xee, 0xbb, 0xed, 0x47, 0xbf, 0xde, 0x39, 0x0f, 0x20, 0x4c, 0x14, 0x45,
0x8a, 0xe5, 0xbe, 0x10, 0x29, 0xd7, 0x5c, 0xb1, 0xd3, 0xb6, 0xa4, 0x5a, 0x08, 0x8e, 0x1c, 0x39,
0xb2, 0xa1, 0xa4, 0x56, 0x2d, 0x6c, 0x30, 0x18, 0xf4, 0x38, 0x1c, 0x8e, 0xbc, 0x5d, 0xd7, 0xf5,
0xc5, 0xde, 0xde, 0xde, 0x34, 0x40, 0x47, 0x47, 0xc7, 0x5e, 0x5d, 0xd7, 0x6f, 0x15, 0xbe, 0x61,
0x1b, 0x81, 0xa2, 0x28, 0x0b, 0x7f, 0x01, 0x15, 0x0c, 0xa7, 0xd1, 0x9f, 0xd3, 0xfe, 0xa7, 0x00,
0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE module_name_filtered_list_xpm[1] = {{ png, sizeof( png ), "module_name_filtered_list_xpm" }};
//EOF

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="26"
width="26"
version="1.1"
viewBox="0 0 26 26"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="module_name_filtered_list.svg">
<metadata
id="metadata100">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/3.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1267"
inkscape:window-height="751"
id="namedview98"
showgrid="true"
inkscape:zoom="33.560376"
inkscape:cx="5.98956"
inkscape:cy="6.5381667"
inkscape:window-x="395"
inkscape:window-y="82"
inkscape:window-maximized="0"
inkscape:current-layer="svg2"
inkscape:snap-to-guides="false"
inkscape:snap-grids="false">
<inkscape:grid
type="xygrid"
id="grid3048"
empspacing="1"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<defs
id="defs4" />
<rect
style="fill:#ffffff;stroke:#545454;stroke-width:0.97711289000000001;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0,-1,1,0,0,0)"
height="22.924355"
width="14.08869"
y="1.4947493"
x="-20.593565"
id="rect51" />
<path
style="fill:none;stroke:#545454;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0"
d="m 0.98623924,11.082126 a 2.2240581,1.9589449 0 1 1 0.0137601,3.917871"
id="path53" />
<g
id="g3983">
<rect
id="rect73"
x="-8.5317764"
y="4.5123401"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;stroke:#545454;stroke-width:0.93241322000000004;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1;stroke-opacity:1" />
<rect
id="rect73-5"
x="-8.5076618"
y="11.451617"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;fill-opacity:1;stroke:#545454;stroke-width:0.93241322;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
id="rect73-56"
x="-8.5498009"
y="18.488895"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;fill-opacity:1;stroke:#545454;stroke-width:0.93241322;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
<g
transform="translate(0.05384896,16.090848)"
id="g3983-1">
<rect
id="rect73-0"
x="-8.5317764"
y="4.5123401"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;fill-opacity:1;stroke:#545454;stroke-width:0.93241322;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
id="rect73-5-4"
x="-8.5076618"
y="11.451617"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;fill-opacity:1;stroke:#545454;stroke-width:0.93241322;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
id="rect73-56-9"
x="-8.5498009"
y="18.488895"
width="6.0590835"
height="4.0659709"
transform="matrix(0,-1,1,0,0,0)"
style="fill:#00c921;fill-opacity:1;stroke:#545454;stroke-width:0.93241322;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
<path
style="fill:#f9f9f9;stroke:#808080;stroke-width:0.99121374;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none"
d="m 12.500122,13.492781 12.961754,0 0,11.985901 -12.961754,0 c 0,-3.9953 0,-7.990602 0,-11.985901 z"
id="rect3938"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.92000002;fill:none;stroke:#333333;stroke-width:2.25878382;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.158618,22.826969 5.439219,-3.188993"
id="path3943-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="opacity:0.92000002;fill:none;stroke:#333333;stroke-width:2.25878382;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 20.538241,19.430106 15.099022,16.241113"
id="path3943-2-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -137,6 +137,7 @@ add_library( cvpcb_kiface MODULE
${CVPCB_SRCS}
${CVPCB_DIALOGS}
)
set_target_properties( cvpcb_kiface PROPERTIES
OUTPUT_NAME cvpcb
PREFIX ${KIFACE_PREFIX}

View File

@ -127,7 +127,7 @@ void FOOTPRINTS_LISTBOX::SetSelection( int index, bool State )
void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& aLibName,
COMPONENT* aComponent, int aFilterType )
COMPONENT* aComponent, const wxString &footPrintName, int aFilterType )
{
wxArrayString newList;
wxString msg;
@ -159,6 +159,15 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
&& aComponent->GetNetCount() != aList.GetItem( ii ).GetUniquePadCount() )
continue;
wxString itemsName = aList.GetItem( ii ).GetNickname().Lower () +
aList.GetItem (ii).GetFootprintName().Lower ();
if( (aFilterType & BY_NAME) && !footPrintName.IsEmpty()
&& itemsName.Find (footPrintName.Lower ()) == wxNOT_FOUND)
{
continue;
}
msg.Printf( wxT( "%3d %s:%s" ), int( newList.GetCount() + 1 ),
GetChars( aList.GetItem( ii ).GetNickname() ),
GetChars( aList.GetItem( ii ).GetFootprintName() ) );

View File

@ -53,6 +53,7 @@ enum id_cvpcb_frm
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST,
ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME,
ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
ID_CVPCB_LIBRARY_LIST,
ID_CVPCB_EQUFILES_LIST_EDIT,

View File

@ -67,6 +67,7 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )
EVT_MENU( wxID_HELP, CVPCB_MAINFRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, CVPCB_MAINFRAME::GetKicadAbout )
EVT_MENU( ID_SAVE_PROJECT, CVPCB_MAINFRAME::SaveProjectFile )
EVT_MENU( ID_FIND_ITEMS, CVPCB_MAINFRAME::OnMenuSearch )
EVT_MENU( ID_PREFERENCES_CONFIGURE_PATHS, CVPCB_MAINFRAME::OnConfigurePaths )
EVT_MENU( ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE, CVPCB_MAINFRAME::OnKeepOpenOnSave )
EVT_MENU( ID_CVPCB_EQUFILES_LIST_EDIT, CVPCB_MAINFRAME::OnEditEquFilesList )
@ -87,6 +88,8 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )
CVPCB_MAINFRAME::OnSelectFilteringFootprint )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST,
CVPCB_MAINFRAME::OnSelectFilteringFootprint )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME,
CVPCB_MAINFRAME::OnToolbarSearch )
// Frame events
EVT_CLOSE( CVPCB_MAINFRAME::OnCloseWindow )
@ -223,6 +226,9 @@ void CVPCB_MAINFRAME::SaveSettings( wxConfigBase* aCfg )
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) )
state |= FOOTPRINTS_LISTBOX::BY_LIBRARY;
// if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME ) )
// state |= FOOTPRINTS_LISTBOX::BY_NAME;
aCfg->Write( wxT( FILTERFOOTPRINTKEY ), state );
}
@ -511,75 +517,120 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
return;
wxString libraryName;
COMPONENT* component = NULL;
int filter = FOOTPRINTS_LISTBOX::UNFILTERED;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_COMPONENT;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_PIN_COUNT;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_LIBRARY;
component = GetSelectedComponent();
COMPONENT* component = GetSelectedComponent();
int filter = getFilterType ();
libraryName = m_libListBox->GetSelectedLibrary();
m_footprintListBox->SetFootprints( m_footprints, libraryName, component, filter );
// Tell AuiMgr that objects are changed !
if( m_auimgr.GetManagedWindow() ) // Be sure Aui Manager is initialized
// (could be not the case when starting CvPcb
m_auimgr.Update();
if( component == NULL )
return;
// Preview of the already assigned footprint.
// Find the footprint that was already chosen for this component and select it,
// but only if the selection is made from the component list or the library list.
// If the selection is made from the footprint list, do not change the current
// selected footprint.
if( FindFocus() == m_compListBox || FindFocus() == m_libListBox )
{
wxString module = FROM_UTF8( component->GetFPID().Format().c_str() );
bool found = false;
for( int ii = 0; ii < m_footprintListBox->GetCount(); ii++ )
{
wxString footprintName;
wxString msg = m_footprintListBox->OnGetItemText( ii, 0 );
msg.Trim( true );
msg.Trim( false );
footprintName = msg.AfterFirst( wxChar( ' ' ) );
if( module.Cmp( footprintName ) == 0 )
{
m_footprintListBox->SetSelection( ii, true );
found = true;
break;
}
}
if( !found )
{
int ii = m_footprintListBox->GetSelection();
if ( ii >= 0 )
m_footprintListBox->SetSelection( ii, false );
if( GetFootprintViewerFrame() )
{
CreateScreenCmp();
}
}
}
SendMessageToEESCHEMA();
DisplayStatus();
m_footprintListBox->SetFootprints( m_footprints, libraryName, component, m_currentSearch, filter);
RefreshAfterComponentSearch (component);
}
void CVPCB_MAINFRAME::OnToolbarSearch( wxCommandEvent& aEvent )
{
if( m_skipComponentSelect )
return;
if(m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME ) ) {
SearchDialogAndStore ();
}
else {
m_currentSearch = "";
}
OnSelectFilteringFootprint (aEvent);
}
void CVPCB_MAINFRAME::OnMenuSearch( wxCommandEvent& aEvent )
{
if( m_skipComponentSelect )
return;
SearchDialogAndStore ();
OnSelectFilteringFootprint (aEvent);
}
void CVPCB_MAINFRAME::SearchDialogAndStore ()
{
wxTextEntryDialog myDialog (this, _ ("Find footprint"), _ ("Find"), "");
if (myDialog.ShowModal () == wxID_OK) {
m_currentSearch = myDialog.GetValue ();
}
m_mainToolBar->ToggleTool ( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME, !m_currentSearch.empty ());
}
int CVPCB_MAINFRAME::getFilterType ()
{
int filter = FOOTPRINTS_LISTBOX::UNFILTERED;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_COMPONENT;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_PIN_COUNT;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST ) )
filter |= FOOTPRINTS_LISTBOX::BY_LIBRARY;
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME) )
filter |= FOOTPRINTS_LISTBOX::BY_NAME;
return filter;
}
void CVPCB_MAINFRAME::RefreshAfterComponentSearch (COMPONENT* component)
{
// Tell AuiMgr that objects are changed !
if( m_auimgr.GetManagedWindow() ) // Be sure Aui Manager is initialized
// (could be not the case when starting CvPcb
m_auimgr.Update();
if( component == NULL )
return;
// Preview of the already assigned footprint.
// Find the footprint that was already chosen for this component and select it,
// but only if the selection is made from the component list or the library list.
// If the selection is made from the footprint list, do not change the current
// selected footprint.
if( FindFocus() == m_compListBox || FindFocus() == m_libListBox )
{
wxString module = FROM_UTF8( component->GetFPID().Format().c_str() );
bool found = false;
for( int ii = 0; ii < m_footprintListBox->GetCount(); ii++ )
{
wxString footprintName;
wxString msg = m_footprintListBox->OnGetItemText( ii, 0 );
msg.Trim( true );
msg.Trim( false );
footprintName = msg.AfterFirst( wxChar( ' ' ) );
if( module.Cmp( footprintName ) == 0 )
{
m_footprintListBox->SetSelection( ii, true );
found = true;
break;
}
}
if( !found )
{
int ii = m_footprintListBox->GetSelection();
if ( ii >= 0 )
m_footprintListBox->SetSelection( ii, false );
if( GetFootprintViewerFrame() )
{
CreateScreenCmp();
}
}
}
SendMessageToEESCHEMA();
DisplayStatus();
}
void CVPCB_MAINFRAME::OnSelectFilteringFootprint( wxCommandEvent& event )
{
@ -665,6 +716,14 @@ void CVPCB_MAINFRAME::DisplayStatus()
filters += _( "library" );
}
if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME ) )
{
if( !filters.IsEmpty() )
filters += wxT( "+" );
filters += _( "name" );
}
if( filters.IsEmpty() )
msg = _( "No filtering" );
else
@ -822,7 +881,7 @@ void CVPCB_MAINFRAME::BuildFOOTPRINTS_LISTBOX()
}
m_footprintListBox->SetFootprints( m_footprints, wxEmptyString, NULL,
FOOTPRINTS_LISTBOX::UNFILTERED );
wxEmptyString, FOOTPRINTS_LISTBOX::UNFILTERED );
DisplayStatus();
}

View File

@ -58,6 +58,7 @@ class CVPCB_MAINFRAME : public KIWAY_PLAYER
friend struct CV::IFACE;
wxArrayString m_footprintListEntries;
wxString m_currentSearch;
public:
bool m_KeepCvpcbOpen;
@ -102,6 +103,8 @@ public:
* * Updates the footprint shown in footprint display window (if opened)
*/
void OnSelectComponent( wxListEvent& event );
void OnToolbarSearch (wxCommandEvent& aEvent);
void OnMenuSearch (wxCommandEvent& aEvent);
/**
* Function OnEditFootrprintLibraryTable
@ -293,6 +296,11 @@ private:
*/
int buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wxString * aErrorMessages = NULL );
void RefreshAfterComponentSearch (COMPONENT* component);
int getFilterType ();
void SearchDialogAndStore ();
DECLARE_EVENT_TABLE()
};

View File

@ -96,6 +96,7 @@ public:
BY_COMPONENT = 0x0001,
BY_PIN_COUNT = 0x0002,
BY_LIBRARY = 0x0004,
BY_NAME = 0x0008,
};
FOOTPRINTS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id,
@ -119,7 +120,9 @@ public:
* @param aFilterType defines the criteria to filter \a aList.
*/
void SetFootprints( FOOTPRINT_LIST& aList, const wxString& aLibName,
COMPONENT* aComponent, int aFilterType );
COMPONENT* aComponent, const wxString &footPrintName, int aFilterType );
// void searchByName (FOOTPRINT_LIST& aList, const wxString &footPrintName);
wxString GetSelectedFootprint();

View File

@ -78,7 +78,15 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
_( "&Close" ), _( "Close CvPcb" ),
KiBitmap( exit_xpm ) );
// Menu Preferences:
// Find menu
wxMenu* findMenu = new wxMenu;
AddMenuItem( findMenu, ID_FIND_ITEMS,
_( "&Find footprint\tCtrl+F" ),
_( "Find footprint by its name\nor filter the footprint list by the partial name" ),
KiBitmap( info_xpm ));
// Preferences Menu :
wxMenu* preferencesMenu = new wxMenu;
AddMenuItem( preferencesMenu, ID_CVPCB_LIB_TABLE_EDIT,
@ -139,6 +147,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Create the menubar and append all submenus
menuBar->Append( filesMenu, _( "&Save" ) );
menuBar->Append( findMenu, _( "&Find" ) );
menuBar->Append( preferencesMenu, _( "&Preferences" ) );
menuBar->Append( helpMenu, _( "&Help" ) );

View File

@ -105,11 +105,18 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
_( "Filter footprint list by library" ),
wxEmptyString );
m_mainToolBar->AddTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME,
KiBitmap( module_name_filtered_list_xpm ),
wxNullBitmap, true, NULL,
_( "Find footprint by its name\nor filter the footprint list by the partial name\n"
"Ctrl+F to call the dialog to enter the filter string" ),
wxEmptyString );
if( config )
{
wxString key = wxT( FILTERFOOTPRINTKEY );
int opt = config->Read( key, (long) 1 );
m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_NAME, opt & 8 );
m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST, opt & 4 );
m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST, opt & 2 );
m_mainToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt & 1 );

View File

@ -328,6 +328,7 @@ EXTERN_BITMAP( module_wizard_xpm )
EXTERN_BITMAP( module_filtered_list_xpm )
EXTERN_BITMAP( module_pin_filtered_list_xpm )
EXTERN_BITMAP( module_library_list_xpm )
EXTERN_BITMAP( module_name_filtered_list_xpm )
EXTERN_BITMAP( module_full_list_xpm )
EXTERN_BITMAP( module_options_xpm )
EXTERN_BITMAP( module_ratsnest_xpm )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB