KiCad PCB EDA Suite
DIALOG_NET_INSPECTOR Class Reference

#include <dialog_net_inspector.h>

Inheritance diagram for DIALOG_NET_INSPECTOR:
DIALOG_NET_INSPECTOR_BASE BOARD_LISTENER DIALOG_SHIM KIWAY_HOLDER

Classes

struct  COLUMN_DESC
 
class  DATA_MODEL
 
class  LIST_ITEM
 
struct  LIST_ITEM_NETCODE_CMP_LESS
 
struct  SETTINGS
 

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL }
 

Public Member Functions

 DIALOG_NET_INSPECTOR (PCB_EDIT_FRAME *aParent, const SETTINGS &aSettings)
 
 ~DIALOG_NET_INSPECTOR ()
 
SETTINGS Settings () const
 
virtual void OnBoardItemAdded (BOARD &aBoard, BOARD_ITEM *aBoardItem) override
 
virtual void OnBoardItemsAdded (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
 
virtual void OnBoardItemRemoved (BOARD &aBoard, BOARD_ITEM *aBoardItem) override
 
virtual void OnBoardItemsRemoved (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
 
virtual void OnBoardNetSettingsChanged (BOARD &aBoard) override
 
virtual void OnBoardItemChanged (BOARD &aBoard, BOARD_ITEM *aBoardItem) override
 
virtual void OnBoardItemsChanged (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
 
virtual void OnBoardHighlightNetChanged (BOARD &aBoard) override
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal () const
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
void SetPosition (const wxPoint &aNewPosition)
 Force the position of the dialog to a new position. More...
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Return a reference to the PROJECT associated with this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 It is only used for debugging, since "this" is not a wxWindow*. More...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 

Protected Member Functions

void finishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void setSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int horizPixelsFromDU (int x) const
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int vertPixelsFromDU (int y) const
 Convert an integer number of dialog units to pixels, vertically. More...
 
void resetSize ()
 Clear the existing dialog size and position. More...
 
virtual void OnCharHook (wxKeyEvent &aEvt)
 

Protected Attributes

wxStaticText * m_staticTextFilter
 
wxTextCtrl * m_textCtrlFilter
 
wxCheckBox * m_cbShowZeroPad
 
wxCheckBox * m_groupBy
 
wxTextCtrl * m_groupByText
 
wxComboBox * m_groupByKind
 
wxDataViewCtrl * m_netsList
 
wxBitmapButton * m_addNet
 
wxBitmapButton * m_renameNet
 
wxBitmapButton * m_deleteNet
 
wxButton * m_ReportButt
 
wxStaticLine * m_staticline1
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_useCalculatedSize
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 
wxSize m_initialSize
 

Private Types

using LIST_ITEM_ITER = std::vector< std::unique_ptr< LIST_ITEM > >::iterator
 
using LIST_ITEM_CONST_ITER = std::vector< std::unique_ptr< LIST_ITEM > >::const_iterator
 

Private Member Functions

wxString formatNetCode (const NETINFO_ITEM *aNet) const
 
wxString formatNetName (const NETINFO_ITEM *aNet) const
 
wxString formatCount (unsigned int aValue) const
 
wxString formatLength (int64_t aValue) const
 
std::vector< CN_ITEM * > relevantConnectivityItems () const
 
bool netFilterMatches (NETINFO_ITEM *aNet) const
 
void updateNet (NETINFO_ITEM *aNet)
 
unsigned int calculateViaLength (const PCB_TRACK *) const
 
void onSelChanged (wxDataViewEvent &event) override
 
void onSelChanged ()
 
void onSortingChanged (wxDataViewEvent &event) override
 
void onFilterChange (wxCommandEvent &event) override
 
void onListSize (wxSizeEvent &event) override
 
void onAddNet (wxCommandEvent &event) override
 
void onRenameNet (wxCommandEvent &event) override
 
void onDeleteNet (wxCommandEvent &event) override
 
void onReport (wxCommandEvent &event) override
 
std::unique_ptr< LIST_ITEMbuildNewItem (NETINFO_ITEM *aNet, unsigned int aPadCount, const std::vector< CN_ITEM * > &aCNItems)
 
void buildNetsList ()
 
void adjustListColumns ()
 
void onParentWindowClosed (wxCommandEvent &event)
 
void onUnitsChanged (wxCommandEvent &event)
 
void onBoardChanged (wxCommandEvent &event)
 
void updateDisplayedRowValues (const OPT< LIST_ITEM_ITER > &aRow)
 

Private Attributes

NETINFO_ITEMm_zero_netitem
 
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_netFilter
 
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_groupFilter
 
BOARDm_brd
 
PCB_EDIT_FRAMEm_frame
 
bool m_in_build_nets_list = false
 
bool m_filter_change_no_rebuild = false
 
wxObjectDataPtr< DATA_MODELm_data_model
 

Static Private Attributes

static const COLUMN_DESC COLUMN_NET
 
static const COLUMN_DESC COLUMN_NAME
 
static const COLUMN_DESC COLUMN_PAD_COUNT
 
static const COLUMN_DESC COLUMN_VIA_COUNT
 
static const COLUMN_DESC COLUMN_VIA_LENGTH
 
static const COLUMN_DESC COLUMN_BOARD_LENGTH
 
static const COLUMN_DESC COLUMN_CHIP_LENGTH
 
static const COLUMN_DESC COLUMN_TOTAL_LENGTH
 

Detailed Description

Definition at line 37 of file dialog_net_inspector.h.

Member Typedef Documentation

◆ LIST_ITEM_CONST_ITER

using DIALOG_NET_INSPECTOR::LIST_ITEM_CONST_ITER = std::vector<std::unique_ptr<LIST_ITEM> >::const_iterator
private

Definition at line 73 of file dialog_net_inspector.h.

◆ LIST_ITEM_ITER

using DIALOG_NET_INSPECTOR::LIST_ITEM_ITER = std::vector<std::unique_ptr<LIST_ITEM> >::iterator
private

Definition at line 72 of file dialog_net_inspector.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_NET_INSPECTOR()

DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR ( PCB_EDIT_FRAME aParent,
const SETTINGS aSettings 
)

Definition at line 786 of file dialog_net_inspector.cpp.

787  :
788  DIALOG_NET_INSPECTOR_BASE( aParent ),
789  m_zero_netitem( nullptr ),
790  m_frame( aParent )
791 {
792  m_brd = aParent->GetBoard();
793 
794  m_data_model = new DATA_MODEL( *this );
795  m_netsList->AssociateModel( &*m_data_model );
796 
797  std::array<std::function<void( void )>, 8> add_col = {
798  [&]()
799  {
800  m_netsList->AppendTextColumn( COLUMN_NET.display_name, COLUMN_NET,
801  wxDATAVIEW_CELL_INERT, -1, wxALIGN_LEFT,
802  wxDATAVIEW_COL_SORTABLE );
803  },
804  [&]()
805  {
806  m_netsList->AppendTextColumn( COLUMN_NAME.display_name, COLUMN_NAME,
807  wxDATAVIEW_CELL_INERT, -1, wxALIGN_LEFT,
808  wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_COL_REORDERABLE |
809  wxDATAVIEW_COL_SORTABLE );
810  },
811  [&]()
812  {
814  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
815  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
816  },
817  [&]()
818  {
820  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
821  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
822  },
823  [&]()
824  {
826  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
827  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
828  },
829  [&]()
830  {
832  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
833  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
834  },
835  [&]()
836  {
838  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
839  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
840  },
841  [&]()
842  {
844  wxDATAVIEW_CELL_INERT, -1, wxALIGN_CENTER,
845  wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_SORTABLE );
846  }
847  };
848 
849  std::vector<int> col_order = aSettings.column_order;
850 
851  if( col_order.size() != add_col.size() )
852  {
853  col_order.resize( add_col.size() );
854 
855  for( unsigned int i = 0; i < add_col.size(); ++i )
856  col_order[i] = i;
857  }
858 
859  for( unsigned int i : col_order )
860  add_col.at( i )();
861 
862  m_netsList->SetExpanderColumn( m_netsList->GetColumn( 0 ) );
863 
864  // avoid onFilterChange for each of the settings as it will re-build the
865  // list over and over again.
867 
868  m_textCtrlFilter->SetValue( aSettings.filter_string );
869  m_cbShowZeroPad->SetValue( aSettings.show_zero_pad_nets );
870  m_groupBy->SetValue( aSettings.group_by );
871  m_groupByKind->SetSelection( aSettings.group_by_kind );
872  m_groupByText->SetValue( aSettings.group_by_text );
873 
875  buildNetsList();
876 
878 
879  m_addNet->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
880  m_renameNet->SetBitmap( KiBitmap( BITMAPS::small_edit ) );
881  m_deleteNet->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
882 
883  m_sdbSizerOK->SetDefault();
884  m_renameNet->Disable();
885  m_deleteNet->Disable();
886 
887  if( aSettings.sorting_column != -1 )
888  {
889  if( wxDataViewColumn* c = m_netsList->GetColumn( aSettings.sorting_column ) )
890  {
891  c->SetSortOrder( aSettings.sort_order_asc );
892  m_data_model->Resort();
893  }
894  }
895 
897 
898  m_frame->Connect( wxEVT_CLOSE_WINDOW,
899  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onParentWindowClosed ),
900  nullptr, this );
901  m_frame->Connect( UNITS_CHANGED,
902  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onUnitsChanged ),
903  nullptr, this );
904  m_frame->Connect( BOARD_CHANGED,
905  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onBoardChanged ),
906  nullptr, this );
907 
908  if( m_brd != nullptr )
909  {
910  // if the dialog is opened while something is highlighted on the board ...
912 
913  m_brd->AddListener( this );
914  }
915 }
static const COLUMN_DESC COLUMN_CHIP_LENGTH
void AddListener(BOARD_LISTENER *aListener)
Add a listener to the board to receive calls whenever something on the board has been modified.
Definition: board.cpp:1960
virtual void OnBoardHighlightNetChanged(BOARD &aBoard) override
void onBoardChanged(wxCommandEvent &event)
static const COLUMN_DESC COLUMN_NET
static const COLUMN_DESC COLUMN_TOTAL_LENGTH
static const COLUMN_DESC COLUMN_PAD_COUNT
void onParentWindowClosed(wxCommandEvent &event)
static const COLUMN_DESC COLUMN_NAME
static const COLUMN_DESC COLUMN_BOARD_LENGTH
void onUnitsChanged(wxCommandEvent &event)
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
DIALOG_NET_INSPECTOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Net Inspector"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
static const COLUMN_DESC COLUMN_VIA_LENGTH
BOARD * GetBoard() const
static const COLUMN_DESC COLUMN_VIA_COUNT
wxObjectDataPtr< DATA_MODEL > m_data_model

References BOARD::AddListener(), adjustListColumns(), buildNetsList(), COLUMN_BOARD_LENGTH, COLUMN_CHIP_LENGTH, COLUMN_NAME, COLUMN_NET, DIALOG_NET_INSPECTOR::SETTINGS::column_order, COLUMN_PAD_COUNT, COLUMN_TOTAL_LENGTH, COLUMN_VIA_COUNT, COLUMN_VIA_LENGTH, DIALOG_NET_INSPECTOR::COLUMN_DESC::display_name, DIALOG_NET_INSPECTOR::SETTINGS::filter_string, DIALOG_SHIM::finishDialogSettings(), PCB_BASE_FRAME::GetBoard(), DIALOG_NET_INSPECTOR::SETTINGS::group_by, DIALOG_NET_INSPECTOR::SETTINGS::group_by_kind, DIALOG_NET_INSPECTOR::SETTINGS::group_by_text, KiBitmap(), DIALOG_NET_INSPECTOR_BASE::m_addNet, m_brd, DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, DIALOG_NET_INSPECTOR_BASE::m_deleteNet, m_filter_change_no_rebuild, m_frame, DIALOG_NET_INSPECTOR_BASE::m_groupBy, DIALOG_NET_INSPECTOR_BASE::m_groupByKind, DIALOG_NET_INSPECTOR_BASE::m_groupByText, DIALOG_NET_INSPECTOR_BASE::m_netsList, DIALOG_NET_INSPECTOR_BASE::m_renameNet, DIALOG_NET_INSPECTOR_BASE::m_sdbSizerOK, DIALOG_NET_INSPECTOR_BASE::m_textCtrlFilter, onBoardChanged(), OnBoardHighlightNetChanged(), onParentWindowClosed(), onUnitsChanged(), DIALOG_NET_INSPECTOR::SETTINGS::show_zero_pad_nets, small_edit, small_plus, small_trash, DIALOG_NET_INSPECTOR::SETTINGS::sort_order_asc, and DIALOG_NET_INSPECTOR::SETTINGS::sorting_column.

◆ ~DIALOG_NET_INSPECTOR()

DIALOG_NET_INSPECTOR::~DIALOG_NET_INSPECTOR ( )

Definition at line 918 of file dialog_net_inspector.cpp.

919 {
920  // the displayed list elements are going to be deleted before the list view itself.
921  // in some cases it might still do queries on the data model, which would crash
922  // from now on. so just disassociate it.
923  m_netsList->AssociateModel( nullptr );
924 
925  m_frame->Disconnect( wxEVT_CLOSE_WINDOW,
926  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onParentWindowClosed ),
927  nullptr, this );
928  m_frame->Disconnect( UNITS_CHANGED,
929  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onUnitsChanged ),
930  nullptr, this );
931  m_frame->Disconnect( BOARD_CHANGED,
932  wxCommandEventHandler( DIALOG_NET_INSPECTOR::onBoardChanged ),
933  nullptr, this );
934 
935  if( m_brd != nullptr )
936  m_brd->RemoveListener( this );
937 
938  m_frame->GetCanvas()->SetFocus();
939 }
void onBoardChanged(wxCommandEvent &event)
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void onParentWindowClosed(wxCommandEvent &event)
void RemoveListener(BOARD_LISTENER *aListener)
Remove the specified listener.
Definition: board.cpp:1967
virtual void SetFocus() override
void onUnitsChanged(wxCommandEvent &event)

References PCB_BASE_FRAME::GetCanvas(), m_brd, m_frame, DIALOG_NET_INSPECTOR_BASE::m_netsList, onBoardChanged(), onParentWindowClosed(), onUnitsChanged(), BOARD::RemoveListener(), and EDA_DRAW_PANEL_GAL::SetFocus().

Member Function Documentation

◆ adjustListColumns()

void DIALOG_NET_INSPECTOR::adjustListColumns ( )
private

Calculating optimal width of the first (Net) and the last (Pad Count) columns. That width must be enough to fit column header label and be not less than width of four chars (0000).

Definition at line 1701 of file dialog_net_inspector.cpp.

1702 {
1709  wxClientDC dc( GetParent() );
1710 
1711  int h, minw, minw_col0, minw_col1;
1712  int w0, w1, w2, w3, w4, w5, w6, w7;
1713 
1714  dc.GetTextExtent( COLUMN_NET.display_name, &w0, &h );
1715  dc.GetTextExtent( "MMMMMMMMMMMMMMMM", &minw_col1, &h );
1716  dc.GetTextExtent( COLUMN_PAD_COUNT.display_name, &w2, &h );
1717  dc.GetTextExtent( COLUMN_VIA_COUNT.display_name, &w3, &h );
1718  dc.GetTextExtent( COLUMN_VIA_LENGTH.display_name, &w4, &h );
1719  dc.GetTextExtent( COLUMN_BOARD_LENGTH.display_name, &w5, &h );
1720  dc.GetTextExtent( COLUMN_CHIP_LENGTH.display_name, &w6, &h );
1721  dc.GetTextExtent( COLUMN_TOTAL_LENGTH.display_name, &w7, &h );
1722  dc.GetTextExtent( "00000,000 mm", &minw, &h );
1723  dc.GetTextExtent( "00000", &minw_col0, &h );
1724 
1725  // Considering left and right margins.
1726  // For wxRenderGeneric it is 5px.
1727  // Also account for the sorting arrow in the column header.
1728  // Column 0 also needs space for any potential expander icons.
1729  const int extra_width = 30;
1730 
1731  w0 = std::max( w0, minw_col0 ) + extra_width;
1732  minw_col1 = minw_col1 + extra_width;
1733  w2 = w2 + extra_width;
1734  w3 = w3 + extra_width;
1735  w4 = std::max( w4 + extra_width, minw );
1736  w5 = std::max( w5 + extra_width, minw );
1737  w6 = std::max( w6 + extra_width, minw );
1738  w7 = std::max( w7 + extra_width, minw );
1739 
1740  // the columns might have been reordered. we work on the column model numbers though.
1741  std::vector<int> column_order( m_data_model->columnCount() );
1742 
1743  for( unsigned int i = 0; i < column_order.size(); ++i )
1744  column_order[m_netsList->GetColumn( i )->GetModelColumn()] = i;
1745 
1746  assert( column_order.size() == 8 );
1747 
1748  m_netsList->GetColumn( column_order[0] )->SetWidth( w0 );
1749  m_netsList->GetColumn( column_order[1] )->SetMinWidth( minw_col1 );
1750  m_netsList->GetColumn( column_order[2] )->SetWidth( w2 );
1751  m_netsList->GetColumn( column_order[3] )->SetWidth( w3 );
1752  m_netsList->GetColumn( column_order[4] )->SetWidth( w4 );
1753  m_netsList->GetColumn( column_order[5] )->SetWidth( w5 );
1754  m_netsList->GetColumn( column_order[6] )->SetWidth( w6 );
1755  m_netsList->GetColumn( column_order[7] )->SetWidth( w7 );
1756 
1757  // At resizing of the list the width of middle column (Net Names) changes only.
1758  int width = m_netsList->GetClientSize().x - 24;
1759  w1 = width - w0 - w2 - w3 - w4 - w5 - w6 - w7;
1760 
1761  if( w1 > minw_col1 )
1762  m_netsList->GetColumn( column_order[1] )->SetWidth( w1 );
1763 
1764  m_netsList->Refresh();
1765 }
static const COLUMN_DESC COLUMN_CHIP_LENGTH
static const COLUMN_DESC COLUMN_NET
static const COLUMN_DESC COLUMN_TOTAL_LENGTH
static const COLUMN_DESC COLUMN_PAD_COUNT
static const COLUMN_DESC COLUMN_BOARD_LENGTH
static const COLUMN_DESC COLUMN_VIA_LENGTH
static const COLUMN_DESC COLUMN_VIA_COUNT
wxObjectDataPtr< DATA_MODEL > m_data_model

References COLUMN_BOARD_LENGTH, COLUMN_CHIP_LENGTH, COLUMN_NET, COLUMN_PAD_COUNT, COLUMN_TOTAL_LENGTH, COLUMN_VIA_COUNT, COLUMN_VIA_LENGTH, DIALOG_NET_INSPECTOR::COLUMN_DESC::display_name, m_data_model, and DIALOG_NET_INSPECTOR_BASE::m_netsList.

Referenced by DIALOG_NET_INSPECTOR(), and onListSize().

◆ buildNetsList()

void DIALOG_NET_INSPECTOR::buildNetsList ( )
private

Definition at line 1436 of file dialog_net_inspector.cpp.

1437 {
1438  // Only build the list of nets if there is a board present
1439  if( !m_brd )
1440  return;
1441 
1442  m_in_build_nets_list = true;
1443 
1444  // when rebuilding the netlist, try to keep the row selection
1445  // FIXME: handle group selections, preserve expanded/collapsed group states
1446  wxDataViewItemArray sel;
1447  m_netsList->GetSelections( sel );
1448 
1449  std::vector<int> prev_selected_netcodes;
1450  prev_selected_netcodes.reserve( sel.GetCount() );
1451 
1452  for( unsigned int i = 0; i < sel.GetCount(); ++i )
1453  {
1454  const LIST_ITEM* item = static_cast<const LIST_ITEM*>( sel.Item( i ).GetID() );
1455  prev_selected_netcodes.push_back( item->GetNetCode() );
1456  }
1457 
1458  m_data_model->deleteAllItems();
1459 
1460  std::vector<std::unique_ptr<LIST_ITEM>> new_items;
1461 
1462  // for group mode 0,1 each group filter string represents one displayed group,
1463  // so just add them first. for group mode 2,3 the groups are generated dynamically.
1464  if( m_groupBy->IsChecked()
1465  && ( m_groupByKind->GetSelection() == 0 || m_groupByKind->GetSelection() == 1 ) )
1466  {
1467  for( unsigned int i = 0; i < m_groupFilter.size(); ++i )
1468  {
1469  const std::unique_ptr<EDA_PATTERN_MATCH>& filter = m_groupFilter[i];
1470  new_items.emplace_back( std::make_unique<LIST_ITEM>( i, filter->GetPattern() ) );
1471  }
1472  }
1473 
1474  std::vector<CN_ITEM*> prefiltered_cn_items = relevantConnectivityItems();
1475 
1476 
1477  // collect all nets which pass the filter string and also remember the
1478  // suffix after the filter match, if any.
1479  struct NET_INFO
1480  {
1481  int netcode;
1482  NETINFO_ITEM* net;
1483  unsigned int pad_count;
1484  };
1485 
1486  struct NET_INFO_CMP_LESS
1487  {
1488  bool operator()( const NET_INFO& a, const NET_INFO& b ) const
1489  {
1490  return a.netcode < b.netcode;
1491  }
1492  bool operator()( const NET_INFO& a, int b ) const
1493  {
1494  return a.netcode < b;
1495  }
1496  bool operator()( int a, const NET_INFO& b ) const
1497  {
1498  return a < b.netcode;
1499  }
1500  };
1501 
1502  std::vector<NET_INFO> nets;
1503  nets.reserve( m_brd->GetNetInfo().NetsByNetcode().size() );
1504 
1505  for( const std::pair<int, NETINFO_ITEM*> ni : m_brd->GetNetInfo().NetsByNetcode() )
1506  {
1507  if( ni.first == 0 )
1508  m_zero_netitem = ni.second;
1509 
1510  if( netFilterMatches( ni.second ) )
1511  nets.emplace_back( NET_INFO{ ni.first, ni.second, 0 } );
1512  }
1513 
1514  // count the pads for each net. since the nets are sorted by netcode
1515  // iterating over the footprints' pads is faster.
1516 
1517  for( FOOTPRINT* footprint : m_brd->Footprints() )
1518  {
1519  for( PAD* pad : footprint->Pads() )
1520  {
1521  auto i = std::lower_bound( nets.begin(), nets.end(), pad->GetNetCode(),
1522  NET_INFO_CMP_LESS() );
1523 
1524  if( i != nets.end() && i->netcode == pad->GetNetCode() )
1525  i->pad_count += 1;
1526  }
1527  }
1528 
1529  for( NET_INFO& ni : nets )
1530  {
1531  if( m_cbShowZeroPad->IsChecked() || ni.pad_count > 0 )
1532  new_items.emplace_back( buildNewItem( ni.net, ni.pad_count, prefiltered_cn_items ) );
1533  }
1534 
1535 
1536  m_data_model->addItems( std::move( new_items ) );
1537 
1538  // try to restore the selected rows. set the ones that we can't find anymore to -1.
1539  sel.Clear();
1540 
1541  for( int& nc : prev_selected_netcodes )
1542  {
1543  auto r = m_data_model->findItem( nc );
1544 
1545  if( r )
1546  {
1547  const std::unique_ptr<LIST_ITEM>& list_item = *r.get();
1548  sel.Add( wxDataViewItem( list_item.get() ) );
1549  }
1550  else
1551  {
1552  nc = -1;
1553  }
1554  }
1555 
1556  if( !sel.IsEmpty() )
1557  {
1558  m_netsList->SetSelections( sel );
1559  m_netsList->EnsureVisible( sel.Item( 0 ) );
1560  }
1561  else
1562  {
1563  m_netsList->UnselectAll();
1564  }
1565 
1566  alg::delete_matching( prev_selected_netcodes, -1 );
1567 
1569 
1570  for( int& i : prev_selected_netcodes )
1571  m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings()->SetHighlight( true, i, true );
1572 
1574  m_frame->GetCanvas()->Refresh();
1575 
1576  m_in_build_nets_list = false;
1577 }
std::vector< CN_ITEM * > relevantConnectivityItems() const
const NETCODES_MAP & NetsByNetcode() const
Return the netcode map, at least for python.
Definition: netinfo.h:363
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
const NETINFO_LIST & GetNetInfo() const
Definition: board.h:679
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:208
bool netFilterMatches(NETINFO_ITEM *aNet) const
FOOTPRINTS & Footprints()
Definition: board.h:233
E_SERIE r
Definition: eserie.cpp:41
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_groupFilter
Handle the data for a net.
Definition: netinfo.h:66
std::unique_ptr< LIST_ITEM > buildNewItem(NETINFO_ITEM *aNet, unsigned int aPadCount, const std::vector< CN_ITEM * > &aCNItems)
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void delete_matching(_Container &__c, _Value __value)
Covers for the horrifically named std::remove and std::remove_if (neither of which remove anything).
Definition: kicad_algo.h:164
Definition: pad.h:57
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
Definition: view.cpp:766
wxObjectDataPtr< DATA_MODEL > m_data_model

References buildNewItem(), alg::delete_matching(), filter, BOARD::Footprints(), PCB_BASE_FRAME::GetCanvas(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetNetCode(), BOARD::GetNetInfo(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PCB_DRAW_PANEL_GAL::GetView(), m_brd, DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, m_frame, DIALOG_NET_INSPECTOR_BASE::m_groupBy, DIALOG_NET_INSPECTOR_BASE::m_groupByKind, m_groupFilter, m_in_build_nets_list, DIALOG_NET_INSPECTOR_BASE::m_netsList, m_zero_netitem, netFilterMatches(), NETINFO_LIST::NetsByNetcode(), pad, r, EDA_DRAW_PANEL_GAL::Refresh(), relevantConnectivityItems(), KIGFX::RENDER_SETTINGS::SetHighlight(), and KIGFX::VIEW::UpdateAllLayersColor().

Referenced by DIALOG_NET_INSPECTOR(), onBoardChanged(), OnBoardItemChanged(), OnBoardItemsChanged(), OnBoardNetSettingsChanged(), and onFilterChange().

◆ buildNewItem()

std::unique_ptr< DIALOG_NET_INSPECTOR::LIST_ITEM > DIALOG_NET_INSPECTOR::buildNewItem ( NETINFO_ITEM aNet,
unsigned int  aPadCount,
const std::vector< CN_ITEM * > &  aCNItems 
)
private

Definition at line 1403 of file dialog_net_inspector.cpp.

1405 {
1406  std::unique_ptr<LIST_ITEM> new_item = std::make_unique<LIST_ITEM>( aNet );
1407 
1408  new_item->SetPadCount( aPadCount );
1409 
1410  const auto cn_items = std::equal_range( aCNItems.begin(), aCNItems.end(), aNet->GetNetCode(),
1411  NETCODE_CMP_LESS() );
1412 
1413  for( auto i = cn_items.first; i != cn_items.second; ++i )
1414  {
1415  BOARD_CONNECTED_ITEM* item = ( *i )->Parent();
1416 
1417  if( item->Type() == PCB_PAD_T )
1418  new_item->AddChipWireLength( static_cast<PAD*>( item )->GetPadToDieLength() );
1419 
1420  else if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( item ) )
1421  {
1422  new_item->AddBoardWireLength( track->GetLength() );
1423 
1424  if( item->Type() == PCB_VIA_T )
1425  {
1426  new_item->AddViaCount( 1 );
1427  new_item->AddViaLength( calculateViaLength( track ) );
1428  }
1429  }
1430  }
1431 
1432  return new_item;
1433 }
class PAD, a pad in a footprint
Definition: typeinfo.h:89
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
unsigned int calculateViaLength(const PCB_TRACK *) const
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:113
int GetNetCode() const
Definition: netinfo.h:115

References calculateViaLength(), NETINFO_ITEM::GetNetCode(), PCB_PAD_T, PCB_VIA_T, and EDA_ITEM::Type().

Referenced by buildNetsList(), and updateNet().

◆ calculateViaLength()

unsigned int DIALOG_NET_INSPECTOR::calculateViaLength ( const PCB_TRACK aTrack) const
private

Definition at line 1373 of file dialog_net_inspector.cpp.

1374 {
1375  const PCB_VIA& via = dynamic_cast<const PCB_VIA&>( *aTrack );
1377 
1378  // calculate the via length individually from the board stackup and via's start and end layer.
1379  if( bds.m_HasStackup )
1380  {
1381  const BOARD_STACKUP& stackup = bds.GetStackupDescriptor();
1382  return stackup.GetLayerDistance( via.TopLayer(), via.BottomLayer() );
1383  }
1384  else
1385  {
1386  int dielectricLayers = bds.GetCopperLayerCount() - 1;
1387  int layerThickness = bds.GetBoardThickness() / dielectricLayers;
1388  int effectiveBottomLayer;
1389 
1390  if( via.BottomLayer() == B_Cu )
1391  effectiveBottomLayer = F_Cu + dielectricLayers;
1392  else
1393  effectiveBottomLayer = via.BottomLayer();
1394 
1395  int layerCount = effectiveBottomLayer - via.TopLayer();
1396 
1397  return layerCount * layerThickness;
1398  }
1399 }
Manage layers needed to make a physical board.
int GetLayerDistance(PCB_LAYER_ID aFirstLayer, PCB_LAYER_ID aSecondLayer) const
Calculate the distance (height) between the two given copper layers.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
BOARD_STACKUP & GetStackupDescriptor()
Definition: layer_ids.h:71
Container for design settings for a BOARD object.

References B_Cu, F_Cu, BOARD_DESIGN_SETTINGS::GetBoardThickness(), BOARD_DESIGN_SETTINGS::GetCopperLayerCount(), BOARD::GetDesignSettings(), BOARD_STACKUP::GetLayerDistance(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), m_brd, BOARD_DESIGN_SETTINGS::m_HasStackup, and via.

Referenced by buildNewItem(), OnBoardItemAdded(), and OnBoardItemRemoved().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 312 of file dialog_shim.cpp.

313 {
314  // so we can do logging of this state change:
315  return wxDialog::Enable( enable );
316 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 473 of file dialog_shim.cpp.

474 {
475  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
476  // handle validation in the same way as other dialogs.
477  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
478  return;
479 
480  SetReturnCode( retCode );
481 
482  if( !IsQuasiModal() )
483  {
484  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
485  "wasn't called" );
486  return;
487  }
488 
489  if( m_qmodal_loop )
490  {
491  if( m_qmodal_loop->IsRunning() )
492  m_qmodal_loop->Exit( 0 );
493  else
494  m_qmodal_loop->ScheduleExit( 0 );
495 
496  m_qmodal_loop = nullptr;
497  }
498 
500  m_qmodal_parent_disabler = nullptr;
501 
502  Show( false );
503 }
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:211
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:214

References DIALOG_SHIM::IsQuasiModal(), DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, and DIALOG_SHIM::Show().

Referenced by NETLIST_DIALOG::OnAddGenerator(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_SYMBOLS_LIBID::onCancel(), DIALOG_LIB_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), NETLIST_DIALOG::OnDelGenerator(), DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol(), DIALOG_SYMBOL_PROPERTIES::OnEditSymbol(), DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol(), PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick(), PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick(), DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_PUSH_PAD_PROPERTIES::PadPropertiesAccept(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls.

finishDialogSettings must be called from derived classes after all widgets have been initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at the end of TransferDataToWindow, or better yet, at end of a wxInitDialogEvent handler.

Definition at line 151 of file dialog_shim.cpp.

152 {
153  // must be called from the constructor of derived classes,
154  // when all widgets are initialized, and therefore their size fixed
155 
156  // SetSizeHints fixes the minimal size of sizers in the dialog
157  // (SetSizeHints calls Fit(), so no need to call it)
158  GetSizer()->SetSizeHints( this );
159 }

Referenced by DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), PAGED_DIALOG::finishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_BOARD_STATISTICS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ formatCount()

wxString DIALOG_NET_INSPECTOR::formatCount ( unsigned int  aValue) const
private

Definition at line 1096 of file dialog_net_inspector.cpp.

1097 {
1098  return wxString::Format( "%u", aValue );
1099 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format().

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::GetValue().

◆ formatLength()

wxString DIALOG_NET_INSPECTOR::formatLength ( int64_t  aValue) const
private

Definition at line 1102 of file dialog_net_inspector.cpp.

1103 {
1104  return MessageTextFromValue( GetUserUnits(), static_cast<long long int>( aValue ) );
1105 }
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:104
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:119

References DIALOG_SHIM::GetUserUnits(), and MessageTextFromValue().

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::GetValue().

◆ formatNetCode()

wxString DIALOG_NET_INSPECTOR::formatNetCode ( const NETINFO_ITEM aNet) const
private

Definition at line 1084 of file dialog_net_inspector.cpp.

1085 {
1086  return wxString::Format( "%.3d", aNet->GetNetCode() );
1087 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
int GetNetCode() const
Definition: netinfo.h:115

References Format(), and NETINFO_ITEM::GetNetCode().

Referenced by DIALOG_NET_INSPECTOR::DATA_MODEL::GetValue().

◆ formatNetName()

wxString DIALOG_NET_INSPECTOR::formatNetName ( const NETINFO_ITEM aNet) const
private

Definition at line 1090 of file dialog_net_inspector.cpp.

1091 {
1092  return UnescapeString( aNet->GetNetname() );
1093 }
const wxString & GetNetname() const
Definition: netinfo.h:121
wxString UnescapeString(const wxString &aSource)

References NETINFO_ITEM::GetNetname(), and UnescapeString().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

46 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:76

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

Convert an integer number of dialog units to pixels, horizontally.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 169 of file dialog_shim.cpp.

170 {
171  wxSize sz( x, 0 );
172  return ConvertDialogToPixels( sz ).x;
173 }

Referenced by DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), and DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ IsCtrl()

static bool DIALOG_SHIM::IsCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 124 of file dialog_shim.h.

125  {
126  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
127  !e.ShiftDown() && !e.MetaDown();
128  }

◆ IsQuasiModal()

◆ IsShiftCtrl()

static bool DIALOG_SHIM::IsShiftCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 130 of file dialog_shim.h.

131  {
132  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
133  e.ShiftDown() && !e.MetaDown();
134  }

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Return a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

54  {
55  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
56  return *m_kiway;
57  }
KIWAY * m_kiway
Definition: kiway_holder.h:75

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SYMBOL_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SCH_EDITOR_CONTROL::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ netFilterMatches()

bool DIALOG_NET_INSPECTOR::netFilterMatches ( NETINFO_ITEM aNet) const
private

Definition at line 996 of file dialog_net_inspector.cpp.

997 {
998  // Note: the filtering is case insensitive.
999 
1000  // Never show the unconnected net
1001  if( aNet->GetNetCode() <= 0 )
1002  return false;
1003 
1004  // Show unconnected nets only if specifically asked for by filter
1005  if( m_netFilter.empty() )
1006  return !aNet->GetNetname().StartsWith( "unconnected-(" );
1007 
1008  wxString net_str = UnescapeString( aNet->GetNetname() ).Upper();
1009 
1010  for( const std::unique_ptr<EDA_PATTERN_MATCH>& f : m_netFilter )
1011  {
1012  if( f->Find( net_str ) )
1013  return true;
1014  }
1015 
1016  return false;
1017 }
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_netFilter
const wxString & GetNetname() const
Definition: netinfo.h:121
wxString UnescapeString(const wxString &aSource)
int GetNetCode() const
Definition: netinfo.h:115

References NETINFO_ITEM::GetNetCode(), NETINFO_ITEM::GetNetname(), m_netFilter, and UnescapeString().

Referenced by buildNetsList(), OnBoardItemAdded(), onRenameNet(), and updateNet().

◆ onAddNet()

void DIALOG_NET_INSPECTOR::onAddNet ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1775 of file dialog_net_inspector.cpp.

1776 {
1777  wxString newNetName;
1778  NETNAME_VALIDATOR validator( &newNetName );
1779 
1780  WX_TEXT_ENTRY_DIALOG dlg( this, _( "Net name:" ), _( "New Net" ), newNetName );
1781  dlg.SetTextValidator( validator );
1782 
1783  while( true )
1784  {
1785  if( dlg.ShowModal() != wxID_OK || dlg.GetValue().IsEmpty() )
1786  return; //Aborted by user
1787 
1788  newNetName = dlg.GetValue();
1789 
1790  if( m_brd->FindNet( newNetName ) )
1791  {
1792  DisplayError( this, wxString::Format( _( "Net name '%s' is already in use." ),
1793  newNetName ) );
1794  newNetName = wxEmptyString;
1795  }
1796  else
1797  {
1798  break;
1799  }
1800  }
1801 
1802  NETINFO_ITEM *newnet = new NETINFO_ITEM( m_brd, dlg.GetValue(), 0 );
1803 
1804  m_brd->Add( newnet );
1805  m_frame->OnModify();
1806 
1807  // We'll get an OnBoardItemAdded callback from this to update our listbox
1808 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:279
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1325
void OnModify() override
Must be called after a board change to set the modified flag.
A KICAD version of wxTextEntryDialog which supports the various improvements/work-arounds from DIALOG...
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Definition: board.cpp:608
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
Handle the data for a net.
Definition: netinfo.h:66

References _, BOARD::Add(), DisplayError(), BOARD::FindNet(), Format(), WX_TEXT_ENTRY_DIALOG::GetValue(), m_brd, m_frame, PCB_EDIT_FRAME::OnModify(), and WX_TEXT_ENTRY_DIALOG::SetTextValidator().

◆ onBoardChanged()

void DIALOG_NET_INSPECTOR::onBoardChanged ( wxCommandEvent &  event)
private

Definition at line 982 of file dialog_net_inspector.cpp.

983 {
984  m_brd = m_frame->GetBoard();
985 
986  if( m_brd != nullptr )
987  m_brd->AddListener( this );
988 
989  buildNetsList();
990  m_netsList->Refresh();
991 
992  event.Skip();
993 }
void AddListener(BOARD_LISTENER *aListener)
Add a listener to the board to receive calls whenever something on the board has been modified.
Definition: board.cpp:1960
BOARD * GetBoard() const

References BOARD::AddListener(), buildNetsList(), PCB_BASE_FRAME::GetBoard(), m_brd, m_frame, and DIALOG_NET_INSPECTOR_BASE::m_netsList.

Referenced by DIALOG_NET_INSPECTOR(), and ~DIALOG_NET_INSPECTOR().

◆ OnBoardHighlightNetChanged()

void DIALOG_NET_INSPECTOR::OnBoardHighlightNetChanged ( BOARD aBoard)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1284 of file dialog_net_inspector.cpp.

1285 {
1286  if( !m_brd->IsHighLightNetON() )
1287  {
1288  m_netsList->UnselectAll();
1289  }
1290  else
1291  {
1292  const std::set<int>& selected_codes = m_brd->GetHighLightNetCodes();
1293 
1294  wxDataViewItemArray new_selection;
1295  new_selection.Alloc( selected_codes.size() );
1296 
1297  for( int code : selected_codes )
1298  {
1299  if( OPT<LIST_ITEM_ITER> r = m_data_model->findItem( code ) )
1300  new_selection.Add( wxDataViewItem( &***r ) );
1301  }
1302 
1303  m_netsList->SetSelections( new_selection );
1304 
1305  if( !new_selection.IsEmpty() )
1306  m_netsList->EnsureVisible( new_selection.Item( 0 ) );
1307  }
1308 }
bool IsHighLightNetON() const
Definition: board.h:402
E_SERIE r
Definition: eserie.cpp:41
const std::set< int > & GetHighLightNetCodes() const
Definition: board.h:386
boost::optional< T > OPT
Definition: optional.h:7
wxObjectDataPtr< DATA_MODEL > m_data_model

References BOARD::GetHighLightNetCodes(), BOARD::IsHighLightNetON(), m_brd, m_data_model, DIALOG_NET_INSPECTOR_BASE::m_netsList, and r.

Referenced by DIALOG_NET_INSPECTOR().

◆ OnBoardItemAdded()

void DIALOG_NET_INSPECTOR::OnBoardItemAdded ( BOARD aBoard,
BOARD_ITEM aBoardItem 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1108 of file dialog_net_inspector.cpp.

1109 {
1110  if( NETINFO_ITEM* net = dynamic_cast<NETINFO_ITEM*>( aBoardItem ) )
1111  {
1112  // a new net has been added to the board. add it to our list if it
1113  // passes the netname filter test.
1114 
1115  if( netFilterMatches( net ) )
1116  {
1117  std::unique_ptr<LIST_ITEM> new_item = std::make_unique<LIST_ITEM>( net );
1118 
1119  // the new net could have some pads already assigned, count them.
1120  new_item->SetPadCount( m_brd->GetNodesCount( net->GetNetCode() ) );
1121 
1122  m_data_model->addItem( std::move( new_item ) );
1123  }
1124  }
1125  else if( BOARD_CONNECTED_ITEM* i = dynamic_cast<BOARD_CONNECTED_ITEM*>( aBoardItem ) )
1126  {
1127  OPT<LIST_ITEM_ITER> r = m_data_model->findItem( i->GetNet() );
1128 
1129  if( r )
1130  {
1131  // try to handle frequent operations quickly.
1132  if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( i ) )
1133  {
1134  const std::unique_ptr<LIST_ITEM>& list_item = *r.get();
1135  int len = track->GetLength();
1136 
1137  list_item->AddBoardWireLength( len );
1138 
1139  if( track->Type() == PCB_VIA_T )
1140  {
1141  list_item->AddViaCount( 1 );
1142  list_item->AddViaLength( calculateViaLength( track ) );
1143  }
1144 
1146  return;
1147  }
1148  }
1149 
1150  // resort to generic slower net update otherwise.
1151  updateNet( i->GetNet() );
1152  }
1153  else if( FOOTPRINT* footprint = dynamic_cast<FOOTPRINT*>( aBoardItem ) )
1154  {
1155  for( const PAD* pad : footprint->Pads() )
1156  {
1157  OPT<LIST_ITEM_ITER> r = m_data_model->findItem( pad->GetNet() );
1158 
1159  if( !r )
1160  {
1161  // if show-zero-pads is off, we might not have this net
1162  // in our list yet, so add it first.
1163  // notice that at this point we are very certain that this net
1164  // will have at least one pad.
1165 
1166  if( netFilterMatches( pad->GetNet() ) )
1167  r = m_data_model->addItem( std::make_unique<LIST_ITEM>( pad->GetNet() ) );
1168  }
1169 
1170  if( r )
1171  {
1172  const std::unique_ptr<LIST_ITEM>& list_item = *r.get();
1173  int len = pad->GetPadToDieLength();
1174 
1175  list_item->AddPadCount( 1 );
1176  list_item->AddChipWireLength( len );
1177 
1178  if( list_item->GetPadCount() == 0 && !m_cbShowZeroPad->IsChecked() )
1179  m_data_model->deleteItem( r );
1180  else
1182  }
1183  }
1184  }
1185 }
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
unsigned GetNodesCount(int aNet=-1) const
Definition: board.cpp:1059
bool netFilterMatches(NETINFO_ITEM *aNet) const
void updateNet(NETINFO_ITEM *aNet)
void updateDisplayedRowValues(const OPT< LIST_ITEM_ITER > &aRow)
E_SERIE r
Definition: eserie.cpp:41
unsigned int calculateViaLength(const PCB_TRACK *) const
Handle the data for a net.
Definition: netinfo.h:66
boost::optional< T > OPT
Definition: optional.h:7
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
Definition: pad.h:57
wxObjectDataPtr< DATA_MODEL > m_data_model

References calculateViaLength(), BOARD::GetNodesCount(), m_brd, DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, netFilterMatches(), pad, PCB_VIA_T, r, updateDisplayedRowValues(), and updateNet().

Referenced by OnBoardItemsAdded().

◆ OnBoardItemChanged()

void DIALOG_NET_INSPECTOR::OnBoardItemChanged ( BOARD aBoard,
BOARD_ITEM aBoardItem 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1265 of file dialog_net_inspector.cpp.

1266 {
1267  if( dynamic_cast<BOARD_CONNECTED_ITEM*>( aBoardItem ) != nullptr
1268  || dynamic_cast<FOOTPRINT*>( aBoardItem ) != nullptr )
1269  {
1270  buildNetsList();
1271  m_netsList->Refresh();
1272  }
1273 }

References buildNetsList(), and DIALOG_NET_INSPECTOR_BASE::m_netsList.

◆ OnBoardItemRemoved()

void DIALOG_NET_INSPECTOR::OnBoardItemRemoved ( BOARD aBoard,
BOARD_ITEM aBoardItem 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1197 of file dialog_net_inspector.cpp.

1198 {
1199  if( NETINFO_ITEM* net = dynamic_cast<NETINFO_ITEM*>( aBoardItem ) )
1200  {
1201  m_data_model->deleteItem( m_data_model->findItem( net ) );
1202  }
1203  else if( FOOTPRINT* footprint = dynamic_cast<FOOTPRINT*>( aBoardItem ) )
1204  {
1205  for( const PAD* pad : footprint->Pads() )
1206  {
1207  OPT<LIST_ITEM_ITER> r = m_data_model->findItem( pad->GetNet() );
1208 
1209  if( r )
1210  {
1211  const std::unique_ptr<LIST_ITEM>& list_item = *r.get();
1212  int len = pad->GetPadToDieLength();
1213 
1214  list_item->SubPadCount( 1 );
1215  list_item->SubChipWireLength( len );
1216 
1217  if( list_item->GetPadCount() == 0 && !m_cbShowZeroPad->IsChecked() )
1218  m_data_model->deleteItem( r );
1219  else
1221  }
1222  }
1223  }
1224  else if( BOARD_CONNECTED_ITEM* i = dynamic_cast<BOARD_CONNECTED_ITEM*>( aBoardItem ) )
1225  {
1226  OPT<LIST_ITEM_ITER> r = m_data_model->findItem( i->GetNet() );
1227 
1228  if( r )
1229  {
1230  // try to handle frequent operations quickly.
1231  if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( i ) )
1232  {
1233  const std::unique_ptr<LIST_ITEM>& list_item = *r.get();
1234  int len = track->GetLength();
1235 
1236  list_item->SubBoardWireLength( len );
1237 
1238  if( track->Type() == PCB_VIA_T )
1239  {
1240  list_item->SubViaCount( 1 );
1241  list_item->SubViaLength( calculateViaLength( track ) );
1242  }
1243 
1245  return;
1246  }
1247 
1248  // resort to generic slower net update otherwise.
1249  updateNet( i->GetNet() );
1250  }
1251  }
1252 }
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
void updateNet(NETINFO_ITEM *aNet)
void updateDisplayedRowValues(const OPT< LIST_ITEM_ITER > &aRow)
E_SERIE r
Definition: eserie.cpp:41
unsigned int calculateViaLength(const PCB_TRACK *) const
Handle the data for a net.
Definition: netinfo.h:66
boost::optional< T > OPT
Definition: optional.h:7
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
Definition: pad.h:57
wxObjectDataPtr< DATA_MODEL > m_data_model

References calculateViaLength(), DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, pad, PCB_VIA_T, r, updateDisplayedRowValues(), and updateNet().

Referenced by OnBoardItemsRemoved().

◆ OnBoardItemsAdded()

void DIALOG_NET_INSPECTOR::OnBoardItemsAdded ( BOARD aBoard,
std::vector< BOARD_ITEM * > &  aBoardItems 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1188 of file dialog_net_inspector.cpp.

1189 {
1190  for( BOARD_ITEM* item : aBoardItem )
1191  {
1192  OnBoardItemAdded( aBoard, item );
1193  }
1194 }
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
virtual void OnBoardItemAdded(BOARD &aBoard, BOARD_ITEM *aBoardItem) override

References OnBoardItemAdded().

◆ OnBoardItemsChanged()

void DIALOG_NET_INSPECTOR::OnBoardItemsChanged ( BOARD aBoard,
std::vector< BOARD_ITEM * > &  aBoardItems 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1276 of file dialog_net_inspector.cpp.

1278 {
1279  buildNetsList();
1280  m_netsList->Refresh();
1281 }

References buildNetsList(), and DIALOG_NET_INSPECTOR_BASE::m_netsList.

◆ OnBoardItemsRemoved()

void DIALOG_NET_INSPECTOR::OnBoardItemsRemoved ( BOARD aBoard,
std::vector< BOARD_ITEM * > &  aBoardItems 
)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1255 of file dialog_net_inspector.cpp.

1257 {
1258  for( BOARD_ITEM* item : aBoardItems )
1259  {
1260  OnBoardItemRemoved( aBoard, item );
1261  }
1262 }
virtual void OnBoardItemRemoved(BOARD &aBoard, BOARD_ITEM *aBoardItem) override
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49

References OnBoardItemRemoved().

◆ OnBoardNetSettingsChanged()

void DIALOG_NET_INSPECTOR::OnBoardNetSettingsChanged ( BOARD aBoard)
overridevirtual

Reimplemented from BOARD_LISTENER.

Definition at line 1311 of file dialog_net_inspector.cpp.

1312 {
1313  buildNetsList();
1314  m_netsList->Refresh();
1315 }

References buildNetsList(), and DIALOG_NET_INSPECTOR_BASE::m_netsList.

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in DIALOG_CHOOSE_SYMBOL, HK_PROMPT_DIALOG, and HTML_MESSAGE_BOX.

Definition at line 563 of file dialog_shim.cpp.

564 {
565  if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
566  {
567  if( m_parentFrame )
568  {
570  return;
571  }
572  }
573  // shift-return (Mac default) or Ctrl-Return (GTK) for OK
574  else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
575  {
576  wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
577  return;
578  }
579  else if( aEvt.GetKeyCode() == WXK_TAB && !aEvt.ControlDown() )
580  {
581  wxWindow* currentWindow = wxWindow::FindFocus();
582  int currentIdx = -1;
583  int delta = aEvt.ShiftDown() ? -1 : 1;
584 
585  auto advance = [&]( int& idx )
586  {
587  // Wrap-around modulus
588  int size = m_tabOrder.size();
589  idx = ( ( idx + delta ) % size + size ) % size;
590  };
591 
592  for( size_t i = 0; i < m_tabOrder.size(); ++i )
593  {
594  if( m_tabOrder[i] == currentWindow )
595  {
596  currentIdx = (int) i;
597  break;
598  }
599  }
600 
601  if( currentIdx >= 0 )
602  {
603  advance( currentIdx );
604 
605  //todo: We don't currently have non-textentry dialog boxes but this will break if
606  // we add them.
607 #ifdef __APPLE__
608  while( dynamic_cast<wxTextEntry*>( m_tabOrder[ currentIdx ] ) == nullptr )
609  advance( currentIdx );
610 #endif
611 
612  m_tabOrder[ currentIdx ]->SetFocus();
613  return;
614  }
615  }
616 
617  aEvt.Skip();
618 }
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:218
EDA_BASE_FRAME * m_parentFrame
Definition: dialog_shim.h:216
virtual void ToggleUserUnits()
constexpr int delta

References delta, DIALOG_SHIM::m_parentFrame, DIALOG_SHIM::m_tabOrder, and EDA_BASE_FRAME::ToggleUserUnits().

Referenced by DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), and DIALOG_TEXT_PROPERTIES::~DIALOG_TEXT_PROPERTIES().

◆ onDeleteNet()

void DIALOG_NET_INSPECTOR::onDeleteNet ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1904 of file dialog_net_inspector.cpp.

1905 {
1906  if( !m_netsList->HasSelection() )
1907  return;
1908 
1909  wxDataViewItemArray sel;
1910  m_netsList->GetSelections( sel );
1911 
1912  auto delete_one =
1913  [this]( const LIST_ITEM* i )
1914  {
1915  if( i->GetPadCount() == 0
1916  || IsOK( this, wxString::Format( _( "Net '%s' is in use. Delete anyway?" ),
1917  i->GetNetName() ) ) )
1918  {
1919  // This is a bit hacky, but it will do for now, since this is the only path
1920  // outside the netlist updater where you can remove a net from a BOARD.
1921  int removedCode = i->GetNetCode();
1922 
1924  [removedCode]( KIGFX::VIEW_ITEM* aItem ) -> bool
1925  {
1926  if( auto bci = dynamic_cast<BOARD_CONNECTED_ITEM*>( aItem ) )
1927  return bci->GetNetCode() == removedCode;
1928 
1929  return false;
1930  } );
1931 
1932  m_brd->Remove( i->GetNet() );
1933  m_frame->OnModify();
1934 
1935  // We'll get an OnBoardItemRemoved callback from this to update our listbox
1936  }
1937  };
1938 
1939  for( unsigned int i = 0; i < sel.GetCount(); ++i )
1940  {
1941  const LIST_ITEM* ii = static_cast<const LIST_ITEM*>( sel.Item( i ).GetID() );
1942 
1943  if( ii->GetIsGroup() )
1944  {
1945  if( ii->ChildrenCount() != 0
1946  && IsOK( this, wxString::Format( _( "Delete all nets in group '%s'?" ),
1947  ii->GetGroupName() ) ) )
1948  {
1949  // we can't be iterating the children container and deleting items from
1950  // it at the same time. thus take a copy of it first.
1951  std::vector<const LIST_ITEM*> children;
1952  children.reserve( ii->ChildrenCount() );
1953  std::copy( ii->ChildrenBegin(), ii->ChildrenEnd(), std::back_inserter( children ) );
1954 
1955  for( const LIST_ITEM* c : children )
1956  delete_one( c );
1957  }
1958  }
1959  else
1960  {
1961  delete_one( ii );
1962  }
1963  }
1964 }
void OnModify() override
Must be called after a board change to set the modified flag.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
Definition: view.cpp:1434
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
An abstract base class for deriving all objects that can be added to a VIEW.
Definition: view_item.h:76
Item needs to be redrawn.
Definition: view_item.h:52
#define _(s)
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
void Remove(BOARD_ITEM *aBoardItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
Definition: board.cpp:710
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:323

References _, DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenBegin(), DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenCount(), DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenEnd(), Format(), PCB_BASE_FRAME::GetCanvas(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetGroupName(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetIsGroup(), PCB_DRAW_PANEL_GAL::GetView(), IsOK(), m_brd, m_frame, DIALOG_NET_INSPECTOR_BASE::m_netsList, PCB_EDIT_FRAME::OnModify(), BOARD::Remove(), KIGFX::REPAINT, and KIGFX::VIEW::UpdateAllItemsConditionally().

◆ onFilterChange()

void DIALOG_NET_INSPECTOR::onFilterChange ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1580 of file dialog_net_inspector.cpp.

1581 {
1582  wxStringTokenizer filters( m_textCtrlFilter->GetValue().Upper(), "," );
1583  m_netFilter.clear();
1584 
1585  while( filters.HasMoreTokens() )
1586  {
1587  wxString t = filters.GetNextToken();
1588  t.Trim( false );
1589  t.Trim( true );
1590 
1591  if( !t.IsEmpty() )
1592  {
1593  m_netFilter.emplace_back( std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
1594  m_netFilter.back()->SetPattern( t );
1595  }
1596  }
1597 
1598  wxStringTokenizer group_filters( m_groupByText->GetValue(), "," );
1599  m_groupFilter.clear();
1600 
1601  while( group_filters.HasMoreTokens() )
1602  {
1603  wxString t = group_filters.GetNextToken();
1604  t.Trim( false );
1605  t.Trim( true );
1606 
1607  if( !t.IsEmpty() )
1608  {
1609  if( m_groupByKind->GetSelection() == 0 || m_groupByKind->GetSelection() == 2 )
1610  {
1611  // type 2: wildcard match, use the matching substring as a group key.
1612  // the number of groups is determined dynamically by the number of
1613  // resulting matches in the whole set.
1614  m_groupFilter.emplace_back( std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
1615  m_groupFilter.back()->SetPattern( t );
1616  }
1617  else if( m_groupByKind->GetSelection() == 1 || m_groupByKind->GetSelection() == 3 )
1618  {
1619  // type 3: regex match, use the matching substring as a group key.
1620  // the number of groups is determined dynamically by the number of
1621  // resulting matches in the whole set.
1622  m_groupFilter.emplace_back( std::make_unique<EDA_PATTERN_MATCH_REGEX>() );
1623  m_groupFilter.back()->SetPattern( t );
1624  }
1625  }
1626  }
1627 
1629  buildNetsList();
1630 }
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_netFilter
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_groupFilter

References buildNetsList(), m_filter_change_no_rebuild, DIALOG_NET_INSPECTOR_BASE::m_groupByKind, DIALOG_NET_INSPECTOR_BASE::m_groupByText, m_groupFilter, m_netFilter, and DIALOG_NET_INSPECTOR_BASE::m_textCtrlFilter.

◆ onListSize()

void DIALOG_NET_INSPECTOR::onListSize ( wxSizeEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1768 of file dialog_net_inspector.cpp.

1769 {
1770  aEvent.Skip();
1772 }

References adjustListColumns().

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 380 of file dialog_shim.cpp.

381 {
382  if( m_firstPaintEvent )
383  {
385 
386  selectAllInTextCtrls( GetChildren() );
387 
390  else
391  KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
392 
393  m_firstPaintEvent = false;
394  }
395 
396  event.Skip();
397 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:209
bool m_firstPaintEvent
Definition: dialog_shim.h:208
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
static void selectAllInTextCtrls(wxWindowList &children)

References KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision(), KIPLATFORM::UI::ForceFocus(), DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ onParentWindowClosed()

void DIALOG_NET_INSPECTOR::onParentWindowClosed ( wxCommandEvent &  event)
private

Definition at line 965 of file dialog_net_inspector.cpp.

966 {
967  Close();
968  event.Skip();
969 }

Referenced by DIALOG_NET_INSPECTOR(), and ~DIALOG_NET_INSPECTOR().

◆ onRenameNet()

void DIALOG_NET_INSPECTOR::onRenameNet ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1811 of file dialog_net_inspector.cpp.

1812 {
1813  if( m_netsList->GetSelectedItemsCount() == 1 )
1814  {
1815  const LIST_ITEM* sel = static_cast<const LIST_ITEM*>( m_netsList->GetSelection().GetID() );
1816 
1817  if( sel->GetIsGroup() )
1818  return;
1819 
1820  NETINFO_ITEM* net = sel->GetNet();
1821  wxString fullNetName = net->GetNetname();
1822  wxString netPath;
1823  wxString shortNetName;
1824 
1825  if( fullNetName.Contains( "/" ) )
1826  {
1827  netPath = fullNetName.BeforeLast( '/' ) + '/';
1828  shortNetName = fullNetName.AfterLast( '/' );
1829  }
1830  else
1831  {
1832  shortNetName = fullNetName;
1833  }
1834 
1835  wxString unescapedShortName = UnescapeString( shortNetName );
1836 
1837  WX_TEXT_ENTRY_DIALOG dlg( this, _( "Net name:" ), _( "Rename Net" ), unescapedShortName );
1838  NETNAME_VALIDATOR validator( &unescapedShortName );
1839  dlg.SetTextValidator( validator );
1840 
1841  while( true )
1842  {
1843  if( dlg.ShowModal() != wxID_OK || dlg.GetValue() == unescapedShortName )
1844  return;
1845 
1846  unescapedShortName = dlg.GetValue();
1847 
1848  if( unescapedShortName.IsEmpty() )
1849  {
1850  DisplayError( this, wxString::Format( _( "Net name cannot be empty." ),
1851  unescapedShortName ) );
1852  continue;
1853  }
1854 
1855  shortNetName = EscapeString( unescapedShortName, CTX_NETNAME );
1856  fullNetName = netPath + shortNetName;
1857 
1858  if( m_brd->FindNet( shortNetName ) || m_brd->FindNet( fullNetName ) )
1859  {
1860  DisplayError( this, wxString::Format( _( "Net name '%s' is already in use." ),
1861  unescapedShortName ) );
1862  unescapedShortName = wxEmptyString;
1863  }
1864  else
1865  {
1866  break;
1867  }
1868  }
1869 
1870  // the changed name might require re-grouping. remove and re-insert
1871  // is easier.
1872  auto removed_item = m_data_model->deleteItem( m_data_model->findItem( net ) );
1873 
1874  m_brd->GetNetInfo().RemoveNet( net );
1875  net->SetNetname( fullNetName );
1876  m_brd->GetNetInfo().AppendNet( net );
1877  m_frame->OnModify();
1878 
1879  if( netFilterMatches( net ) )
1880  {
1881  std::unique_ptr<LIST_ITEM> new_item = std::make_unique<LIST_ITEM>( net );
1882  new_item->SetPadCount( removed_item->GetPadCount() );
1883  new_item->SetViaCount( removed_item->GetViaCount() );
1884  new_item->SetBoardWireLength( removed_item->GetBoardWireLength() );
1885  new_item->SetChipWireLength( removed_item->GetChipWireLength() );
1886 
1887  OPT<LIST_ITEM_ITER> added_row = m_data_model->addItem( std::move( new_item ) );
1888 
1889  wxDataViewItemArray new_sel;
1890  new_sel.Add( wxDataViewItem( &***added_row ) );
1891  m_netsList->SetSelections( new_sel );
1892  onSelChanged();
1893  }
1894 
1895  // Currently only tracks and pads have netname annotations and need to be redrawn,
1896  // but zones are likely to follow. Since we don't have a way to ask what is current,
1897  // just refresh all items.
1899  m_frame->GetCanvas()->Refresh();
1900  }
1901 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:279
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1325
void OnModify() override
Must be called after a board change to set the modified flag.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
A KICAD version of wxTextEntryDialog which supports the various improvements/work-arounds from DIALOG...
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
Definition: view.cpp:1424
const NETINFO_LIST & GetNetInfo() const
Definition: board.h:679
void AppendNet(NETINFO_ITEM *aNewElement)
Add aNewElement to the end of the net list.
void RemoveNet(NETINFO_ITEM *aNet)
Remove a net from the net list.
Item needs to be redrawn.
Definition: view_item.h:52
bool netFilterMatches(NETINFO_ITEM *aNet) const
const wxString & GetNetname() const
Definition: netinfo.h:121
#define _(s)
void SetNetname(const wxString &aNewName)
Set the long netname to aNetName, and the short netname to the last token in the long netname's path.
Definition: netinfo.h:132
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
wxString UnescapeString(const wxString &aSource)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
Handle the data for a net.
Definition: netinfo.h:66
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
boost::optional< T > OPT
Definition: optional.h:7
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
wxObjectDataPtr< DATA_MODEL > m_data_model

References _, NETINFO_LIST::AppendNet(), CTX_NETNAME, DisplayError(), EscapeString(), BOARD::FindNet(), Format(), PCB_BASE_FRAME::GetCanvas(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetIsGroup(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetNet(), BOARD::GetNetInfo(), NETINFO_ITEM::GetNetname(), WX_TEXT_ENTRY_DIALOG::GetValue(), PCB_DRAW_PANEL_GAL::GetView(), m_brd, m_data_model, m_frame, DIALOG_NET_INSPECTOR_BASE::m_netsList, netFilterMatches(), PCB_EDIT_FRAME::OnModify(), onSelChanged(), EDA_DRAW_PANEL_GAL::Refresh(), NETINFO_LIST::RemoveNet(), KIGFX::REPAINT, NETINFO_ITEM::SetNetname(), WX_TEXT_ENTRY_DIALOG::SetTextValidator(), UnescapeString(), and KIGFX::VIEW::UpdateAllItems().

◆ onReport()

void DIALOG_NET_INSPECTOR::onReport ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1967 of file dialog_net_inspector.cpp.

1968 {
1969  wxFileDialog dlg( this, _( "Report file" ), "", "",
1970  _( "Report file" ) + AddFileExtListToFilter( { "csv" } ),
1971  wxFD_SAVE );
1972 
1973  if( dlg.ShowModal() == wxID_CANCEL )
1974  return;
1975 
1976  wxTextFile f( dlg.GetPath() );
1977 
1978  f.Create();
1979 
1980  wxString txt;
1981 
1982  // Print Header:
1983  for( auto&& col : m_data_model->columnDesc() )
1984  txt += '"' + col.csv_name + "\";";
1985 
1986  f.AddLine( txt );
1987 
1988  // Print list of nets:
1989  const unsigned int num_rows = m_data_model->itemCount();
1990 
1991  for( unsigned int row = 0; row < num_rows; row++ )
1992  {
1993  auto& i = m_data_model->itemAt( row );
1994 
1995  if( i.GetIsGroup() || i.GetNetCode() == 0 )
1996  continue;
1997 
1998  txt = "";
1999 
2000  for( auto&& col : m_data_model->columnDesc() )
2001  {
2002  if( col.csv_flags & COLUMN_DESC::CSV_QUOTE )
2003  txt += '"' + m_data_model->valueAt( col.num, row ).GetString() + "\";";
2004  else
2005  txt += m_data_model->valueAt( col.num, row ).GetString() + ';';
2006  }
2007 
2008  f.AddLine( txt );
2009  }
2010 
2011  f.Write();
2012  f.Close();
2013 }
#define _(s)
wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
wxObjectDataPtr< DATA_MODEL > m_data_model

References _, AddFileExtListToFilter(), DIALOG_NET_INSPECTOR::COLUMN_DESC::CSV_QUOTE, and m_data_model.

◆ onSelChanged() [1/2]

void DIALOG_NET_INSPECTOR::onSelChanged ( wxDataViewEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1633 of file dialog_net_inspector.cpp.

1634 {
1635  onSelChanged();
1636 }

References onSelChanged().

◆ onSelChanged() [2/2]

void DIALOG_NET_INSPECTOR::onSelChanged ( )
private

Definition at line 1639 of file dialog_net_inspector.cpp.

1640 {
1641  // ignore selection changes while the whole list is being rebuilt.
1642  if( m_in_build_nets_list )
1643  return;
1644 
1646 
1647  bool enable_rename_button = false;
1648  bool enable_delete_button = false;
1649 
1650  if( m_netsList->HasSelection() )
1651  {
1652  wxDataViewItemArray sel;
1653  m_netsList->GetSelections( sel );
1654 
1655  ps->SetHighlight( false );
1656 
1657  enable_rename_button = sel.GetCount() == 1;
1658  enable_delete_button = true;
1659 
1660  for( unsigned int i = 0; i < sel.GetCount(); ++i )
1661  {
1662  const LIST_ITEM* ii = static_cast<const LIST_ITEM*>( sel.Item( i ).GetID() );
1663 
1664  if( ii->GetIsGroup() )
1665  {
1666  enable_rename_button = false;
1667 
1668  for( auto c = ii->ChildrenBegin(), end = ii->ChildrenEnd(); c != end; ++c )
1669  ps->SetHighlight( true, ( *c )->GetNetCode(), true );
1670  }
1671  else
1672  ps->SetHighlight( true, ii->GetNetCode(), true );
1673  }
1674  }
1675  else
1676  ps->SetHighlight( false );
1677 
1679  m_frame->GetCanvas()->Refresh();
1680 
1681  m_renameNet->Enable( enable_rename_button );
1682  m_deleteNet->Enable( enable_delete_button );
1683 }
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:208
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
Definition: view.cpp:766

References DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenBegin(), DIALOG_NET_INSPECTOR::LIST_ITEM::ChildrenEnd(), PCB_BASE_FRAME::GetCanvas(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetIsGroup(), DIALOG_NET_INSPECTOR::LIST_ITEM::GetNetCode(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PCB_DRAW_PANEL_GAL::GetView(), DIALOG_NET_INSPECTOR_BASE::m_deleteNet, m_frame, m_in_build_nets_list, DIALOG_NET_INSPECTOR_BASE::m_netsList, DIALOG_NET_INSPECTOR_BASE::m_renameNet, EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::RENDER_SETTINGS::SetHighlight(), and KIGFX::VIEW::UpdateAllLayersColor().

Referenced by onRenameNet(), and onSelChanged().

◆ onSortingChanged()

void DIALOG_NET_INSPECTOR::onSortingChanged ( wxDataViewEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_NET_INSPECTOR_BASE.

Definition at line 1686 of file dialog_net_inspector.cpp.

1687 {
1688  // FIXME: Whenever the sort criteria changes (sorting column)
1689  // the visible row-numers of the selection get preserved, not the actual
1690  // elements. Don't know at the moment how to preserve the selection,
1691  // so just clear it for now.
1692 
1693  m_netsList->UnselectAll();
1694 
1697  m_frame->GetCanvas()->Refresh();
1698 }
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:208
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
Definition: view.cpp:766

References PCB_BASE_FRAME::GetCanvas(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), PCB_DRAW_PANEL_GAL::GetView(), m_frame, DIALOG_NET_INSPECTOR_BASE::m_netsList, EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::RENDER_SETTINGS::SetHighlight(), and KIGFX::VIEW::UpdateAllLayersColor().

◆ onUnitsChanged()

void DIALOG_NET_INSPECTOR::onUnitsChanged ( wxCommandEvent &  event)
private

Definition at line 972 of file dialog_net_inspector.cpp.

973 {
974  this->m_units = m_frame->GetUserUnits();
975 
976  m_data_model->updateAllItems();
977 
978  event.Skip();
979 }
EDA_UNITS m_units
Definition: dialog_shim.h:198
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
wxObjectDataPtr< DATA_MODEL > m_data_model

References EDA_BASE_FRAME::GetUserUnits(), m_data_model, m_frame, and DIALOG_SHIM::m_units.

Referenced by DIALOG_NET_INSPECTOR(), and ~DIALOG_NET_INSPECTOR().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 36 of file kiway_holder.cpp.

37 {
38  return Kiway().Prj();
39 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:190

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), KICAD_MANAGER_FRAME::CloseProject(), DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doAutoSave(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), DIALOG_EXPORT_SVG::ExportSVGFile(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), DIALOG_PLOT_SCHEMATIC::getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::loadWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::OnPageChange(), DIALOG_BOARD_SETUP::OnPageChange(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_SPICE_MODEL::onSelectLibrary(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), DIALOG_PLOT::Plot(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), SIM_PLOT_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::saveSymbolAs(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectLibrary(), SYMBOL_EDIT_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SYMBOL_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), SYMBOL_VIEWER_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SYMBOL_LIBRARY_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), SCH_EDIT_FRAME::UpdateTitle(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ relevantConnectivityItems()

std::vector< CN_ITEM * > DIALOG_NET_INSPECTOR::relevantConnectivityItems ( ) const
private

Definition at line 1039 of file dialog_net_inspector.cpp.

1040 {
1041  // pre-filter the connectivity items and sort them by netcode.
1042  // this avoids quadratic runtime when building the whole net list and
1043  // calculating the total length for each net.
1044 
1045  const auto type_bits = std::bitset<MAX_STRUCT_TYPE_ID>()
1046  .set( PCB_TRACE_T )
1047  .set( PCB_ARC_T )
1048  .set( PCB_VIA_T )
1049  .set( PCB_PAD_T );
1050 
1051  std::vector<CN_ITEM*> cn_items;
1052  cn_items.reserve( 1024 );
1053 
1054  for( CN_ITEM* cn_item : m_brd->GetConnectivity()->GetConnectivityAlgo()->ItemList() )
1055  {
1056  if( cn_item->Valid() && type_bits[cn_item->Parent()->Type()] )
1057  cn_items.push_back( cn_item );
1058  }
1059 
1060  std::sort( cn_items.begin(), cn_items.end(), NETCODE_CMP_LESS() );
1061 
1062  return cn_items;
1063 }
class PCB_ARC, an arc track segment on a copper layer
Definition: typeinfo.h:97
class PAD, a pad in a footprint
Definition: typeinfo.h:89
class PCB_TRACK, a track segment (segment on a copper layer)
Definition: typeinfo.h:95
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:344
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96

References BOARD::GetConnectivity(), m_brd, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, and PCB_VIA_T.

Referenced by buildNetsList(), and updateNet().

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

This will cause the dialog size to be clear so the next time the dialog is shown the sizers will layout the dialog accordingly. This useful when there are dialog windows that size changes due to layout dependency hidden controls.

Definition at line 287 of file dialog_shim.cpp.

288 {
289  const char* hash_key;
290 
291  if( m_hash_key.size() )
292  {
293  // a special case like EDA_LIST_DIALOG, which has multiple uses.
294  hash_key = m_hash_key.c_str();
295  }
296  else
297  {
298  hash_key = typeid(*this).name();
299  }
300 
301  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
302 
303  if( it == class_map.end() )
304  return;
305 
306  wxRect rect = it->second;
307  rect.SetSize( wxSize( 0, 0 ) );
308  class_map[ hash_key ] = rect;
309 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.

Definition at line 97 of file dialog_shim.h.

98  {
99  m_initialFocusTarget = aWindow;
100  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:209

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), HK_PROMPT_DIALOG::HK_PROMPT_DIALOG(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::saveSymbolAs(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), and WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

It is only used for debugging, since "this" is not a wxWindow*.

"this" is a KIWAY_HOLDER mix-in.

Parameters
aDestis the recipient of aKiway pointer.
aKiwayis often from a parent window or from KIFACE::CreateWindow().

Definition at line 43 of file kiway_holder.cpp.

44 {
45 #if defined(DEBUG)
46  // offer a trap point for debugging most any window
47  wxASSERT( aDest );
48  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
49  {
50  int breakhere=1;
51  ignore_unused( breakhere );
52  }
53 #endif
54 
55  ignore_unused( aDest );
56 
57  m_kiway = aKiway;
58 }
KIWAY * m_kiway
Definition: kiway_holder.h:75
const char * name
Definition: DXF_plotter.cpp:56
void ignore_unused(const T &)
Definition: ignore.h:24

References ignore_unused(), KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetPosition()

void DIALOG_SHIM::SetPosition ( const wxPoint &  aNewPosition)
inherited

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 190 of file dialog_shim.cpp.

191 {
192  wxDialog::SetPosition( aNewPosition );
193 
194  // Now update the stored position:
195  const char* hash_key;
196 
197  if( m_hash_key.size() )
198  {
199  // a special case like EDA_LIST_DIALOG, which has multiple uses.
200  hash_key = m_hash_key.c_str();
201  }
202  else
203  {
204  hash_key = typeid(*this).name();
205  }
206 
207  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
208 
209  if( it == class_map.end() )
210  return;
211 
212  wxRect rect = it->second;
213  rect.SetPosition( aNewPosition );
214 
215  class_map[ hash_key ] = rect;
216 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)

References class_map, DIALOG_SHIM::m_hash_key, and PCAD2KICAD::SetPosition().

Referenced by PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

void DIALOG_SHIM::setSizeInDU ( int  x,
int  y 
)
protectedinherited

Set the dialog to the given dimensions in "dialog units".

These are units equivalent to 4* the average character width and 8* the average character height, allowing a dialog to be sized in a way that scales it with the system font.

Definition at line 162 of file dialog_shim.cpp.

163 {
164  wxSize sz( x, y );
165  SetSize( ConvertDialogToPixels( sz ) );
166 }

Referenced by DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

◆ Settings()

DIALOG_NET_INSPECTOR::SETTINGS DIALOG_NET_INSPECTOR::Settings ( ) const

Definition at line 942 of file dialog_net_inspector.cpp.

943 {
944  std::vector<int> column_order( m_data_model->columnCount() );
945 
946  for( unsigned int i = 0; i < column_order.size(); ++i )
947  column_order[i] = m_netsList->GetColumn( i )->GetModelColumn();
948 
949  wxDataViewColumn* sorting_column = m_netsList->GetSortingColumn();
950 
951  SETTINGS r;
952  r.filter_string = m_textCtrlFilter->GetValue();
953  r.show_zero_pad_nets = m_cbShowZeroPad->IsChecked();
954  r.group_by = m_groupBy->IsChecked();
955  r.group_by_kind = m_groupByKind->GetSelection();
956  r.group_by_text = m_groupByText->GetValue();
957  r.sorting_column = sorting_column ? static_cast<int>( sorting_column->GetModelColumn() ) : -1;
958  r.sort_order_asc = sorting_column ? sorting_column->IsSortOrderAscending() : true;
959  r.column_order = column_order;
960 
961  return r;
962 }
E_SERIE r
Definition: eserie.cpp:41
wxObjectDataPtr< DATA_MODEL > m_data_model

References DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, DIALOG_NET_INSPECTOR_BASE::m_groupBy, DIALOG_NET_INSPECTOR_BASE::m_groupByKind, DIALOG_NET_INSPECTOR_BASE::m_groupByText, DIALOG_NET_INSPECTOR_BASE::m_netsList, DIALOG_NET_INSPECTOR_BASE::m_textCtrlFilter, and r.

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 219 of file dialog_shim.cpp.

220 {
221  bool ret;
222  const char* hash_key;
223 
224  if( m_hash_key.size() )
225  {
226  // a special case like EDA_LIST_DIALOG, which has multiple uses.
227  hash_key = m_hash_key.c_str();
228  }
229  else
230  {
231  hash_key = typeid(*this).name();
232  }
233 
234  // Show or hide the window. If hiding, save current position and size.
235  // If showing, use previous position and size.
236  if( show )
237  {
238 #ifndef __WINDOWS__
239  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
240 #endif
241  ret = wxDialog::Show( show );
242 
243  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
244  wxRect savedDialogRect = class_map[ hash_key ];
245 
246  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
247  {
248  if( m_useCalculatedSize )
249  {
250  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
251  wxDialog::GetSize().x, wxDialog::GetSize().y, 0 );
252  }
253  else
254  {
255  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
256  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
257  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
258  0 );
259  }
260  }
261  else if( m_initialSize != wxDefaultSize )
262  SetSize( m_initialSize );
263 
264  // Be sure that the dialog appears in a visible area
265  // (the dialog position might have been stored at the time when it was
266  // shown on another display)
267  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
268  Centre();
269  }
270  else
271  {
272  // Save the dialog's position & size before hiding, using classname as key
273  class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
274 
275 #ifdef __WXMAC__
276  if ( m_eventLoop )
277  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
278 #endif
279 
280  ret = wxDialog::Show( show );
281  }
282 
283  return ret;
284 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map
bool m_useCalculatedSize
Definition: dialog_shim.h:203
wxSize m_initialSize
Definition: dialog_shim.h:221

References class_map, DIALOG_SHIM::m_hash_key, DIALOG_SHIM::m_initialSize, and DIALOG_SHIM::m_useCalculatedSize.

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), DRC_TOOL::CrossProbe(), DIALOG_SHIM::EndQuasiModal(), GROUP_TOOL::GroupProperties(), EE_INSPECTION_TOOL::NextMarker(), DRC_TOOL::NextMarker(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), EE_INSPECTION_TOOL::PrevMarker(), DRC_TOOL::PrevMarker(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), EDA_VIEW_SWITCHER::Show(), DIALOG_PAD_PROPERTIES::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 423 of file dialog_shim.cpp.

424 {
425  // This is an exception safe way to zero a pointer before returning.
426  // Yes, even though DismissModal() clears this first normally, this is
427  // here in case there's an exception before the dialog is dismissed.
428  struct NULLER
429  {
430  void*& m_what;
431  NULLER( void*& aPtr ) : m_what( aPtr ) {}
432  ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
433  } clear_this( (void*&) m_qmodal_loop );
434 
435  // release the mouse if it's currently captured as the window having it
436  // will be disabled when this dialog is shown -- but will still keep the
437  // capture making it impossible to do anything in the modal dialog itself
438  wxWindow* win = wxWindow::GetCapture();
439  if( win )
440  win->ReleaseMouse();
441 
442  // Get the optimal parent
443  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
444 
445  wxASSERT_MSG( !m_qmodal_parent_disabler,
446  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
447 
448  // quasi-modal: disable only my "optimal" parent
450 
451  // Apple in its infinite wisdom will raise a disabled window before even passing
452  // us the event, so we have no way to stop it. Instead, we must set an order on
453  // the windows so that the quasi-modal will be pushed in front of the disabled
454  // window when it is raised.
456 
457  Show( true );
458 
459  m_qmodal_showing = true;
460 
461  WX_EVENT_LOOP event_loop;
462 
463  m_qmodal_loop = &event_loop;
464 
465  event_loop.Run();
466 
467  m_qmodal_showing = false;
468 
469  return GetReturnCode();
470 }
bool m_qmodal_showing
Definition: dialog_shim.h:213
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:211
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:214
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:44
void ReparentQuasiModal(wxNonOwnedWindow *aWindow)
Move a window's parent to be the top-level window and force the window to be on top.
Definition: gtk/ui.cpp:65

References DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, KIPLATFORM::UI::ReparentQuasiModal(), DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), COMMON_CONTROL::ConfigurePaths(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowDimensionPropertiesDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), and PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog().

◆ updateDisplayedRowValues()

void DIALOG_NET_INSPECTOR::updateDisplayedRowValues ( const OPT< LIST_ITEM_ITER > &  aRow)
private

Definition at line 1066 of file dialog_net_inspector.cpp.

1067 {
1068  if( !aRow )
1069  return;
1070 
1071  wxDataViewItemArray sel;
1072  m_netsList->GetSelections( sel );
1073 
1074  m_data_model->updateItem( aRow );
1075 
1076  if( !sel.IsEmpty() )
1077  {
1078  m_netsList->SetSelections( sel );
1079  m_netsList->EnsureVisible( sel.Item( 0 ) );
1080  }
1081 }
wxObjectDataPtr< DATA_MODEL > m_data_model

References m_data_model, and DIALOG_NET_INSPECTOR_BASE::m_netsList.

Referenced by OnBoardItemAdded(), OnBoardItemRemoved(), and updateNet().

◆ updateNet()

void DIALOG_NET_INSPECTOR::updateNet ( NETINFO_ITEM aNet)
private

Definition at line 1318 of file dialog_net_inspector.cpp.

1319 {
1320  // something for the specified net has changed, update that row.
1321  // ignore nets that are not in our list because the filter doesn't match.
1322 
1323  if( !netFilterMatches( aNet ) )
1324  {
1325  m_data_model->deleteItem( m_data_model->findItem( aNet ) );
1326  return;
1327  }
1328 
1329  // if the net had no pads before, it might not be in the displayed list yet.
1330  // if it had pads and now doesn't anymore, we might need to remove it from the list.
1331 
1332  OPT<LIST_ITEM_ITER> cur_net_row = m_data_model->findItem( aNet );
1333 
1334  const unsigned int node_count = m_brd->GetNodesCount( aNet->GetNetCode() );
1335 
1336  if( node_count == 0 && !m_cbShowZeroPad->IsChecked() )
1337  {
1338  m_data_model->deleteItem( cur_net_row );
1339  return;
1340  }
1341 
1342  std::unique_ptr<LIST_ITEM> new_list_item = buildNewItem( aNet, node_count,
1344 
1345  if( !cur_net_row )
1346  {
1347  m_data_model->addItem( std::move( new_list_item ) );
1348  return;
1349  }
1350 
1351  const std::unique_ptr<LIST_ITEM>& cur_list_item = *cur_net_row.get();
1352 
1353  if( cur_list_item->GetNetName() != new_list_item->GetNetName() )
1354  {
1355  // if the name has changed, it might require re-grouping.
1356  // it's easier to remove and re-insert it
1357  m_data_model->deleteItem( cur_net_row );
1358  m_data_model->addItem( std::move( new_list_item ) );
1359  }
1360  else
1361  {
1362  // update fields only
1363  cur_list_item->SetPadCount( new_list_item->GetPadCount() );
1364  cur_list_item->SetViaCount( new_list_item->GetViaCount() );
1365  cur_list_item->SetBoardWireLength( new_list_item->GetBoardWireLength() );
1366  cur_list_item->SetChipWireLength( new_list_item->GetChipWireLength() );
1367 
1368  updateDisplayedRowValues( cur_net_row );
1369  }
1370 }
std::vector< CN_ITEM * > relevantConnectivityItems() const
unsigned GetNodesCount(int aNet=-1) const
Definition: board.cpp:1059
bool netFilterMatches(NETINFO_ITEM *aNet) const
void updateDisplayedRowValues(const OPT< LIST_ITEM_ITER > &aRow)
std::unique_ptr< LIST_ITEM > buildNewItem(NETINFO_ITEM *aNet, unsigned int aPadCount, const std::vector< CN_ITEM * > &aCNItems)
boost::optional< T > OPT
Definition: optional.h:7
wxObjectDataPtr< DATA_MODEL > m_data_model
int GetNetCode() const
Definition: netinfo.h:115

References buildNewItem(), NETINFO_ITEM::GetNetCode(), BOARD::GetNodesCount(), m_brd, DIALOG_NET_INSPECTOR_BASE::m_cbShowZeroPad, m_data_model, netFilterMatches(), relevantConnectivityItems(), and updateDisplayedRowValues().

Referenced by OnBoardItemAdded(), and OnBoardItemRemoved().

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

Convert an integer number of dialog units to pixels, vertically.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 176 of file dialog_shim.cpp.

177 {
178  wxSize sz( 0, y );
179  return ConvertDialogToPixels( sz ).y;
180 }

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

Member Data Documentation

◆ COLUMN_BOARD_LENGTH

◆ COLUMN_CHIP_LENGTH

◆ COLUMN_NAME

◆ COLUMN_NET

◆ COLUMN_PAD_COUNT

◆ COLUMN_TOTAL_LENGTH

◆ COLUMN_VIA_COUNT

◆ COLUMN_VIA_LENGTH

◆ m_addNet

wxBitmapButton* DIALOG_NET_INSPECTOR_BASE::m_addNet
protectedinherited

◆ m_brd

◆ m_cbShowZeroPad

◆ m_data_model

◆ m_deleteNet

wxBitmapButton* DIALOG_NET_INSPECTOR_BASE::m_deleteNet
protectedinherited

◆ m_filter_change_no_rebuild

bool DIALOG_NET_INSPECTOR::m_filter_change_no_rebuild = false
private

Definition at line 127 of file dialog_net_inspector.h.

Referenced by DIALOG_NET_INSPECTOR(), and onFilterChange().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 208 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_frame

◆ m_groupBy

◆ m_groupByKind

◆ m_groupByText

wxTextCtrl* DIALOG_NET_INSPECTOR_BASE::m_groupByText
protectedinherited

◆ m_groupFilter

std::vector<std::unique_ptr<EDA_PATTERN_MATCH> > DIALOG_NET_INSPECTOR::m_groupFilter
private

◆ m_hash_key

◆ m_in_build_nets_list

bool DIALOG_NET_INSPECTOR::m_in_build_nets_list = false
private

Definition at line 126 of file dialog_net_inspector.h.

Referenced by buildNetsList(), and onSelChanged().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 209 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint(), and DIALOG_SHIM::SetInitialFocus().

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 221 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_netFilter

std::vector<std::unique_ptr<EDA_PATTERN_MATCH> > DIALOG_NET_INSPECTOR::m_netFilter
private

Definition at line 121 of file dialog_net_inspector.h.

Referenced by netFilterMatches(), and onFilterChange().

◆ m_netsList

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 211 of file dialog_shim.h.

Referenced by DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 213 of file dialog_shim.h.

Referenced by DIALOG_SHIM::IsQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_renameNet

wxBitmapButton* DIALOG_NET_INSPECTOR_BASE::m_renameNet
protectedinherited

◆ m_ReportButt

wxButton* DIALOG_NET_INSPECTOR_BASE::m_ReportButt
protectedinherited

◆ m_sdbSizer

wxStdDialogButtonSizer* DIALOG_NET_INSPECTOR_BASE::m_sdbSizer
protectedinherited

◆ m_sdbSizerOK

wxButton* DIALOG_NET_INSPECTOR_BASE::m_sdbSizerOK
protectedinherited

◆ m_staticline1

wxStaticLine* DIALOG_NET_INSPECTOR_BASE::m_staticline1
protectedinherited

◆ m_staticTextFilter

wxStaticText* DIALOG_NET_INSPECTOR_BASE::m_staticTextFilter
protectedinherited

◆ m_tabOrder

◆ m_textCtrlFilter

wxTextCtrl* DIALOG_NET_INSPECTOR_BASE::m_textCtrlFilter
protectedinherited

◆ m_units

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

◆ m_zero_netitem

NETINFO_ITEM* DIALOG_NET_INSPECTOR::m_zero_netitem
private

Definition at line 119 of file dialog_net_inspector.h.

Referenced by buildNetsList().


The documentation for this class was generated from the following files: