Skip to content

Commit

Permalink
Add CvPcb footprint search and filter by name.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz.iwaszkiewicz@gmail.com authored and jp-charras committed Feb 24, 2016
1 parent 38b9fcd commit 0829446
Show file tree
Hide file tree
Showing 14 changed files with 403 additions and 94 deletions.
1 change: 1 addition & 0 deletions bitmaps_png/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
89 changes: 89 additions & 0 deletions bitmaps_png/cpp_26/module_name_filtered_list.cpp
Original file line number Diff line number Diff line change
@@ -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,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bd, 0x40, 0x7e, 0x9f,
0x4b, 0x21, 0xef, 0xf7, 0xf7, 0xf7, 0xbf, 0xd1, 0xd4, 0xd4, 0xb4, 0x57, 0x0a, 0xe5, 0x7b, 0xc0,
0x55, 0x48, 0xd0, 0xd7, 0xd7, 0x47, 0x77, 0x77, 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
162 changes: 162 additions & 0 deletions bitmaps_png/sources/module_name_filtered_list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cvpcb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 10 additions & 1 deletion cvpcb/class_footprints_listbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ) );
Expand Down
1 change: 1 addition & 0 deletions cvpcb/cvpcb_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 0829446

Please sign in to comment.