Support wildcards and regEx's in Net Inspector.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18071
This commit is contained in:
Jeff Young 2024-05-24 12:23:27 +01:00
parent 132ecee665
commit 397ae3bafd
8 changed files with 480 additions and 457 deletions

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -15,17 +15,16 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
m_mainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerContent;
bSizerContent = new wxBoxSizer( wxVERTICAL );
m_ContentSizer = new wxBoxSizer( wxVERTICAL );
m_label = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_label->Wrap( -1 );
bSizerContent->Add( m_label, 0, wxALL|wxEXPAND, 5 );
m_ContentSizer->Add( m_label, 0, wxALL|wxEXPAND, 5 );
m_textCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrl->SetMinSize( wxSize( 300,-1 ) );
bSizerContent->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_ContentSizer->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
@ -44,10 +43,10 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
bSizer3->Add( m_choice, 3, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bSizerContent->Add( bSizer3, 1, wxEXPAND, 5 );
m_ContentSizer->Add( bSizer3, 1, wxEXPAND, 5 );
m_mainSizer->Add( bSizerContent, 1, wxALL|wxEXPAND, 5 );
m_mainSizer->Add( m_ContentSizer, 1, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );

View File

@ -1,357 +1,362 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<FileVersion major="1" minor="17"/>
<object class="Project" expanded="true">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="1">
<property name="name">m_ContentSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">public</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerContent</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="0">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="false">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -44,6 +44,7 @@ class WX_TEXT_ENTRY_DIALOG_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1Cancel;
public:
wxBoxSizer* m_ContentSizer;
WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );

View File

@ -401,6 +401,12 @@ EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern,
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NET:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NETCLASS:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX_ANCHORED>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD_ANCHORED>() );

View File

@ -201,6 +201,7 @@ protected:
enum COMBINED_MATCHER_CONTEXT
{
CTX_LIBITEM,
CTX_NET,
CTX_NETCLASS,
CTX_SIGNAL,
CTX_SEARCH

View File

@ -34,6 +34,7 @@
#include <settings/settings_manager.h>
#include <validators.h>
#include <wildcards_and_files_ext.h>
#include <eda_pattern_match.h>
#include <wx/wupdlock.h>
#include <wx/headerctrl.h>
@ -443,7 +444,12 @@ void PCB_NET_INSPECTOR_PANEL::buildNetsList( bool rebuildColumns )
}
m_data_model->deleteAllItems();
m_custom_group_rules = cfg->custom_group_rules;
m_custom_group_rules.clear();
for( const wxString& rule : cfg->custom_group_rules )
m_custom_group_rules.push_back( std::make_unique<EDA_COMBINED_MATCHER>( rule, CTX_NET ) );
m_data_model->addCustomGroups();
std::vector<std::unique_ptr<LIST_ITEM>> new_items;
@ -1167,14 +1173,14 @@ void PCB_NET_INSPECTOR_PANEL::OnNetsListContextMenu( wxDataViewEvent& event )
wxMenu menu;
// Net edit menu items
wxMenuItem* highlightNet =
new wxMenuItem( &menu, ID_HIGHLIGHT_SELECTED_NETS, _( "Highlight Selected Net" ),
wxEmptyString, wxITEM_NORMAL );
wxMenuItem* highlightNet = new wxMenuItem( &menu, ID_HIGHLIGHT_SELECTED_NETS,
_( "Highlight Selected Net" ),
wxEmptyString, wxITEM_NORMAL );
menu.Append( highlightNet );
wxMenuItem* clearHighlighting =
new wxMenuItem( &menu, ID_CLEAR_HIGHLIGHTING, _( "Clear Net Highlighting" ),
wxEmptyString, wxITEM_NORMAL );
wxMenuItem* clearHighlighting = new wxMenuItem( &menu, ID_CLEAR_HIGHLIGHTING,
_( "Clear Net Highlighting" ),
wxEmptyString, wxITEM_NORMAL );
menu.Append( clearHighlighting );
RENDER_SETTINGS* renderSettings = m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings();
@ -1245,8 +1251,13 @@ void PCB_NET_INSPECTOR_PANEL::onAddGroup()
wxString newGroupName;
NETNAME_VALIDATOR validator( &newGroupName );
WX_TEXT_ENTRY_DIALOG dlg( this, _( "Group name:" ), _( "New Group" ), newGroupName );
WX_TEXT_ENTRY_DIALOG dlg( this, _( "Group name / pattern:" ), _( "New Group" ), newGroupName );
wxStaticText* help = new wxStaticText( &dlg, wxID_ANY,
_( "(Use /.../ to indicate a regular expression.)" ) );
help->SetFont( KIUI::GetInfoFont( this ).Italic() );
dlg.m_ContentSizer->Add( help, 0, wxALL|wxEXPAND, 5 );
dlg.SetTextValidator( validator );
dlg.GetSizer()->SetSizeHints( &dlg );
if( dlg.ShowModal() != wxID_OK || dlg.GetValue().IsEmpty() )
return; //Aborted by user
@ -1254,19 +1265,16 @@ void PCB_NET_INSPECTOR_PANEL::onAddGroup()
newGroupName = UnescapeString( dlg.GetValue() );
if( newGroupName == "" )
{
return;
}
auto pred = [&]( wxString& rule )
if( std::find_if( m_custom_group_rules.begin(), m_custom_group_rules.end(),
[&]( std::unique_ptr<EDA_COMBINED_MATCHER>& rule )
{
return rule->GetPattern().Upper() == newGroupName.Upper();
} ) == m_custom_group_rules.end() )
{
return rule.Upper() == newGroupName.Upper();
};
if( std::find_if( m_custom_group_rules.begin(), m_custom_group_rules.end(), pred )
== m_custom_group_rules.end() )
{
m_custom_group_rules.push_back( newGroupName );
m_custom_group_rules.push_back( std::make_unique<EDA_COMBINED_MATCHER>( newGroupName,
CTX_NET ) );
SaveSettings();
}
@ -1317,13 +1325,15 @@ void PCB_NET_INSPECTOR_PANEL::OnConfigButton( wxCommandEvent& event )
wxMenu menu;
// Filtering menu items
wxMenuItem* filterByNetName = new wxMenuItem(
&menu, ID_FILTER_BY_NET_NAME, _( "Filter by Net Name" ), wxEmptyString, wxITEM_CHECK );
wxMenuItem* filterByNetName = new wxMenuItem( &menu, ID_FILTER_BY_NET_NAME,
_( "Filter by Net Name" ),
wxEmptyString, wxITEM_CHECK );
filterByNetName->Check( cfg.filter_by_net_name );
menu.Append( filterByNetName );
wxMenuItem* filterByNetclass = new wxMenuItem(
&menu, ID_FILTER_BY_NETCLASS, _( "Filter by Netclass" ), wxEmptyString, wxITEM_CHECK );
wxMenuItem* filterByNetclass = new wxMenuItem( &menu, ID_FILTER_BY_NETCLASS,
_( "Filter by Netclass" ),
wxEmptyString, wxITEM_CHECK );
filterByNetclass->Check( cfg.filter_by_netclass );
menu.Append( filterByNetclass );
@ -1347,9 +1357,9 @@ void PCB_NET_INSPECTOR_PANEL::OnConfigButton( wxCommandEvent& event )
wxEmptyString, wxITEM_NORMAL );
menu.Append( addGroup );
wxMenuItem* removeSelectedGroup =
new wxMenuItem( &menu, ID_REMOVE_SELECTED_GROUP, _( "Remove Selected Custom Group" ),
wxEmptyString, wxITEM_NORMAL );
wxMenuItem* removeSelectedGroup = new wxMenuItem( &menu, ID_REMOVE_SELECTED_GROUP,
_( "Remove Selected Custom Group" ),
wxEmptyString, wxITEM_NORMAL );
menu.Append( removeSelectedGroup );
if( !selItem || !selItem->GetIsGroup() )
@ -1357,31 +1367,32 @@ void PCB_NET_INSPECTOR_PANEL::OnConfigButton( wxCommandEvent& event )
removeSelectedGroup->Enable( false );
}
wxMenuItem* removeCustomGroups =
new wxMenuItem( &menu, ID_REMOVE_GROUPS, _( "Remove All Custom Groups" ), wxEmptyString,
wxITEM_NORMAL );
wxMenuItem* removeCustomGroups = new wxMenuItem( &menu, ID_REMOVE_GROUPS,
_( "Remove All Custom Groups" ),
wxEmptyString, wxITEM_NORMAL );
menu.Append( removeCustomGroups );
removeCustomGroups->Enable( m_custom_group_rules.size() != 0 );
menu.AppendSeparator();
wxMenuItem* showZeroNetPads = new wxMenuItem(
&menu, ID_SHOW_ZERO_NET_PADS, _( "Show Zero Pad Nets" ), wxEmptyString, wxITEM_CHECK );
wxMenuItem* showZeroNetPads = new wxMenuItem( &menu, ID_SHOW_ZERO_NET_PADS,
_( "Show Zero Pad Nets" ),
wxEmptyString, wxITEM_CHECK );
showZeroNetPads->Check( m_show_zero_pad_nets );
menu.Append( showZeroNetPads );
wxMenuItem* showUnconnectedNets =
new wxMenuItem( &menu, ID_SHOW_UNCONNECTED_NETS, _( "Show Unconnected Nets" ),
wxEmptyString, wxITEM_CHECK );
wxMenuItem* showUnconnectedNets = new wxMenuItem( &menu, ID_SHOW_UNCONNECTED_NETS,
_( "Show Unconnected Nets" ),
wxEmptyString, wxITEM_CHECK );
showUnconnectedNets->Check( m_show_unconnected_nets );
menu.Append( showUnconnectedNets );
menu.AppendSeparator();
// Report generation
wxMenuItem* generateReport =
new wxMenuItem( &menu, ID_GENERATE_REPORT, _( "Save Net Inspector Report" ),
wxEmptyString, wxITEM_NORMAL );
wxMenuItem* generateReport = new wxMenuItem( &menu, ID_GENERATE_REPORT,
_( "Save Net Inspector Report" ),
wxEmptyString, wxITEM_NORMAL );
menu.Append( generateReport );
menu.AppendSeparator();
@ -1428,85 +1439,69 @@ void PCB_NET_INSPECTOR_PANEL::onSettingsMenu( wxCommandEvent& event )
switch( event.GetId() )
{
case ID_ADD_NET:
{
onAddNet();
break;
}
case ID_RENAME_NET:
{
onRenameSelectedNet();
break;
}
case ID_DELETE_NET:
{
onDeleteSelectedNet();
break;
}
case ID_ADD_GROUP:
{
onAddGroup();
break;
}
case ID_GROUP_BY_CONSTRAINT:
{
m_group_by_constraint = !m_group_by_constraint;
break;
}
case ID_GROUP_BY_NETCLASS:
{
m_group_by_netclass = !m_group_by_netclass;
break;
}
case ID_FILTER_BY_NET_NAME:
{
m_filter_by_net_name = !m_filter_by_net_name;
break;
}
case ID_FILTER_BY_NETCLASS:
{
m_filter_by_netclass = !m_filter_by_netclass;
break;
}
case ID_REMOVE_SELECTED_GROUP:
{
onRemoveSelectedGroup();
break;
}
case ID_REMOVE_GROUPS:
{
m_custom_group_rules.clear();
break;
}
case ID_SHOW_ZERO_NET_PADS:
{
m_show_zero_pad_nets = !m_show_zero_pad_nets;
break;
}
case ID_SHOW_UNCONNECTED_NETS:
{
m_show_unconnected_nets = !m_show_unconnected_nets;
break;
}
case ID_GENERATE_REPORT:
{
generateReport();
saveAndRebuild = false;
break;
}
case ID_HIGHLIGHT_SELECTED_NETS:
{
highlightSelectedNets();
saveAndRebuild = false;
break;
}
case ID_CLEAR_HIGHLIGHTING:
{
onClearHighlighting();
saveAndRebuild = false;
break;
}
default:
{
if( event.GetId() >= ID_HIDE_COLUMN )
{
const int columnId = event.GetId() - ID_HIDE_COLUMN;
@ -1517,7 +1512,6 @@ void PCB_NET_INSPECTOR_PANEL::onSettingsMenu( wxCommandEvent& event )
}
break;
}
}
if( saveAndRebuild )
{
@ -1531,14 +1525,16 @@ void PCB_NET_INSPECTOR_PANEL::onRemoveSelectedGroup()
{
if( m_netsList->GetSelectedItemsCount() == 1 )
{
const LIST_ITEM* selItem =
static_cast<const LIST_ITEM*>( m_netsList->GetSelection().GetID() );
auto* selItem = static_cast<const LIST_ITEM*>( m_netsList->GetSelection().GetID() );
if( selItem->GetIsGroup() )
{
wxString groupName = selItem->GetGroupName();
auto groupIter = std::find( m_custom_group_rules.begin(), m_custom_group_rules.end(),
groupName );
auto groupIter = std::find_if( m_custom_group_rules.begin(), m_custom_group_rules.end(),
[&]( std::unique_ptr<EDA_COMBINED_MATCHER>& rule )
{
return rule->GetPattern() == groupName;
} );
if( groupIter != m_custom_group_rules.end() )
{
@ -1575,13 +1571,15 @@ void PCB_NET_INSPECTOR_PANEL::generateReport()
if( col.has_units )
{
txt += wxString::Format( _( "%s (%s)" ), col.csv_name,
txt += wxString::Format( _( "%s (%s)" ),
col.csv_name,
EDA_UNIT_UTILS::GetLabel( m_frame->GetUserUnits() ) );
}
else
{
txt += col.csv_name;
}
txt += wxT( "\";" );
}
@ -1958,16 +1956,12 @@ void PCB_NET_INSPECTOR_PANEL::SaveSettings()
for( std::pair<wxString, wxDataViewItem>& item : groupItems )
{
if( m_netsList->IsExpanded( item.second ) )
{
cfg.expanded_rows.push_back( item.first );
}
}
// Customer group rules
cfg.custom_group_rules.clear();
for( const wxString& rule : m_custom_group_rules )
{
cfg.custom_group_rules.push_back( rule );
}
for( const std::unique_ptr<EDA_COMBINED_MATCHER>& rule : m_custom_group_rules )
cfg.custom_group_rules.push_back( rule->GetPattern() );
}

View File

@ -34,6 +34,7 @@ class BOARD;
class BOARD_ITEM;
class CN_ITEM;
class PCB_TRACK;
class EDA_COMBINED_MATCHER;
/**
* Net inspection panel for pcbnew
@ -284,7 +285,7 @@ private:
int m_num_copper_layers = 0;
std::vector<wxString> m_custom_group_rules;
std::vector<std::unique_ptr<EDA_COMBINED_MATCHER>> m_custom_group_rules;
/**
* CSV output control

View File

@ -20,6 +20,9 @@
#ifndef PCB_NET_INSPECTOR_PANEL_DATA_MODEL
#define PCB_NET_INSPECTOR_PANEL_DATA_MODEL
#include <eda_pattern_match.h>
/**
* Primary data item for entries in the Net Inspector list.
*
@ -36,13 +39,17 @@ public:
};
LIST_ITEM( unsigned int aGroupNumber, const wxString& aGroupName, GROUP_TYPE aGroupType ) :
m_group_type( aGroupType ), m_group_number( aGroupNumber ), m_net_name( aGroupName )
m_group_type( aGroupType ),
m_group_number( aGroupNumber ),
m_net_name( aGroupName )
{
m_group_name = aGroupName;
m_column_changed.resize( COLUMN_LAST_STATIC_COL + 1 + MAX_CU_LAYERS, 0 );
}
LIST_ITEM( NETINFO_ITEM* aNet ) : m_group_type( GROUP_TYPE::NONE ), m_net( aNet )
LIST_ITEM( NETINFO_ITEM* aNet ) :
m_group_type( GROUP_TYPE::NONE ),
m_net( aNet )
{
wxASSERT( aNet );
m_net_name = UnescapeString( aNet->GetNetname() );
@ -195,8 +202,11 @@ public:
wxCHECK_RET( aLayer < m_layer_wire_length.size(), wxT( "Invalid layer specified" ) );
if( m_parent )
m_parent->SetLayerWireLength(
m_parent->GetBoardWireLength() - m_layer_wire_length[aLayer] + aValue, aLayer );
{
m_parent->SetLayerWireLength( m_parent->GetBoardWireLength()
- m_layer_wire_length[aLayer] + aValue,
aLayer );
}
m_column_changed[COLUMN_BOARD_LENGTH] |= ( m_layer_wire_length[aLayer] != aValue );
m_layer_wire_length[aLayer] = aValue;
@ -280,8 +290,8 @@ public:
m_parent->SubPadDieLength( GetPadDieLength() );
m_parent->m_children.erase(
std::find( m_parent->m_children.begin(), m_parent->m_children.end(), this ) );
m_parent->m_children.erase( std::find( m_parent->m_children.begin(),
m_parent->m_children.end(), this ) );
}
m_parent = aParent;
@ -400,8 +410,10 @@ public:
for( std::unique_ptr<LIST_ITEM>& item : m_items )
{
if( item->GetIsGroup() )
ret.push_back(
std::make_pair( item->GetGroupName(), wxDataViewItem( item.get() ) ) );
{
ret.push_back( std::make_pair( item->GetGroupName(),
wxDataViewItem( item.get() ) ) );
}
}
return ret;
@ -454,8 +466,8 @@ public:
if( group == groupsEnd )
{
int dist = std::distance( groupsBegin, groupsEnd );
std::unique_ptr<LIST_ITEM> groupItem =
std::make_unique<LIST_ITEM>( dist, groupName, groupType );
std::unique_ptr<LIST_ITEM> groupItem = std::make_unique<LIST_ITEM>( dist, groupName,
groupType );
group = m_items.insert( groupsEnd, std::move( groupItem ) );
ItemAdded( wxDataViewItem( ( *group )->Parent() ), wxDataViewItem( &**group ) );
}
@ -476,11 +488,11 @@ public:
{
wxString searchName = aItem->GetNetName().Upper();
for( const wxString& groupName : m_parent.m_custom_group_rules )
for( const std::unique_ptr<EDA_COMBINED_MATCHER>& rule : m_parent.m_custom_group_rules )
{
if( searchName.Find( groupName.Upper() ) != wxNOT_FOUND )
if( rule->Find( searchName.Upper() ) )
{
aItem->SetParent( m_custom_group_map[groupName] );
aItem->SetParent( m_custom_group_map[ rule->GetPattern() ] );
groupMatched = true;
break;
}
@ -573,11 +585,11 @@ public:
m_custom_group_map.clear();
int groupId = 0;
for( const wxString& groupName : m_parent.m_custom_group_rules )
for( const std::unique_ptr<EDA_COMBINED_MATCHER>& rule : m_parent.m_custom_group_rules )
{
std::unique_ptr<LIST_ITEM>& group = m_items.emplace_back( std::make_unique<LIST_ITEM>(
groupId, groupName, LIST_ITEM::GROUP_TYPE::USER_DEFINED ) );
m_custom_group_map[groupName] = group.get();
groupId, rule->GetPattern(), LIST_ITEM::GROUP_TYPE::USER_DEFINED ) );
m_custom_group_map[ rule->GetPattern() ] = group.get();
ItemAdded( wxDataViewItem( group->Parent() ), wxDataViewItem( group.get() ) );
++groupId;
}
@ -674,6 +686,7 @@ protected:
if( i->GetIsGroup() )
{
if( aCol == COLUMN_NAME )
{
switch( i->GetGroupType() )
{
case LIST_ITEM::GROUP_TYPE::NETCLASS:
@ -682,11 +695,15 @@ protected:
case LIST_ITEM::GROUP_TYPE::USER_DEFINED:
aOutValue = _( "Custom" ) + ": " + i->GetGroupName();
break;
default: aOutValue = i->GetGroupName(); break;
default:
aOutValue = i->GetGroupName();
break;
}
}
else
{
aOutValue = "";
}
}
else if( aCol == COLUMN_NAME )
@ -714,8 +731,7 @@ protected:
aOutValue = m_parent.formatLength( i->GetTotalLength() );
else if( aCol > COLUMN_LAST_STATIC_COL && aCol <= m_parent.m_columns.size() )
aOutValue = m_parent.formatLength(
i->GetLayerWireLength( m_parent.m_columns[aCol].layer ) );
aOutValue = m_parent.formatLength( i->GetLayerWireLength( m_parent.m_columns[aCol].layer ) );
else
aOutValue = "";