130 m_trackWidthFilter( aParent, nullptr, m_trackWidthFilterCtrl, m_trackWidthFilterUnits ),
131 m_viaSizeFilter( aParent, nullptr, m_viaSizeFilterCtrl, m_viaSizeFilterUnits )
192 m_parent->Unbind( EDA_EVT_UNITS_CHANGED,
229 wxArrayString netclassNames;
232 netclassNames.push_back( settings->m_DefaultNetClass->GetName() );
234 for(
const auto& [
name, netclass ] : settings->m_NetClasses )
235 netclassNames.push_back(
name );
260 auto setNetclassValue =
261 [
this](
int aRow,
int aCol,
int aVal )
267 [
this, &setNetclassValue](
int aRow,
const std::shared_ptr<NETCLASS>& aNc )
271 setNetclassValue( aRow,
GRID_VIASIZE, aNc->GetViaDiameter() );
273 setNetclassValue( aRow,
GRID_uVIASIZE, aNc->GetuViaDiameter() );
280 buildRow( row++, settings->m_DefaultNetClass );
282 m_netclassGrid->AppendRows( (
int) settings->m_NetClasses.size() );
284 for(
const auto& [
name, netclass ] : settings->m_NetClasses )
285 buildRow( row++, netclass );
364 if( ( isArc || isTrack )
370 if( trackWidthIndex >= 0 )
382 if( viaSizeIndex >= 0 )
392 if( aUndoList->
FindItem( aItem ) < 0 )
394 ITEM_PICKER picker(
nullptr, aItem, UNDO_REDO::CHANGED );
477 if( itemsListPicker.
GetCount() > 0 )
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
Container for design settings for a BOARD object.
std::shared_ptr< NET_SETTINGS > m_NetSettings
const wxString & GetCurrentNetClassName() const
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
unsigned GetTrackWidthIndex() const
unsigned GetViaSizeIndex() const
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
PCB_GROUP * GetParentGroup() const
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
const std::set< int > & GetHighLightNetCodes() const
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
void OnItemsChanged(std::vector< BOARD_ITEM * > &aItems)
Notify the board and its listeners that an item on the board has been modified in some way.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Class DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE.
wxCheckBox * m_filterByTrackWidth
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_netclassFilterOpt
wxRadioButton * m_setToSpecifiedValues
wxCheckBox * m_filterByViaSize
wxChoice * m_netclassFilter
wxChoice * m_trackWidthSelectBox
wxCheckBox * m_netFilterOpt
wxChoice * m_viaSizesSelectBox
PCB_LAYER_BOX_SELECTOR * m_layerBox
wxCheckBox * m_layerFilterOpt
wxCheckBox * m_selectedItemsFilter
NET_SELECTOR * m_netFilter
void OnTrackWidthText(wxCommandEvent &aEvent) override
void OnLayerFilterSelect(wxCommandEvent &event) override
void OnNetFilterSelect(wxCommandEvent &event)
void AdjustNetclassGridColumns(int aWidth)
PCB_EDIT_FRAME * m_parent
void onSpecifiedValuesUpdateUi(wxUpdateUIEvent &event) override
void buildNetclassesGrid()
void visitItem(PICKED_ITEMS_LIST *aUndoList, PCB_TRACK *aItem)
std::vector< BOARD_ITEM * > m_items_changed
void OnViaSizeText(wxCommandEvent &aEvent) override
void OnNetclassFilterSelect(wxCommandEvent &event) override
void OnSizeNetclassGrid(wxSizeEvent &event) override
UNIT_BINDER m_viaSizeFilter
void processItem(PICKED_ITEMS_LIST *aUndoList, PCB_TRACK *aItem)
void onUnitsChanged(wxCommandEvent &aEvent)
UNIT_BINDER m_trackWidthFilter
~DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS() override
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(PCB_EDIT_FRAME *aParent)
int * m_originalColWidths
bool TransferDataFromWindow() override
bool TransferDataToWindow() override
PCB_SELECTION m_selection
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void ForceRefresh()
Force a redraw.
KICAD_T Type() const
Returns the type of object.
void SetLink(EDA_ITEM *aItem)
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
int GetLayerSelection() const
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
const wxString GetName() const
void SetBoard(BOARD *aBoard)
void SetSelectedNetcode(int aNetcode)
void SetNetInfo(NETINFO_LIST *aNetInfoList)
void SetSelectedNet(const wxString &aNetname)
wxString GetSelectedNetname()
void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand) override
Create a new entry in undo list of commands.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
The main frame for Pcbnew.
void SetTrackSegmentWidth(PCB_TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Modify one track segment width or one via diameter (using DRC control).
void UpdateTrackWidthSelectBox(wxChoice *aTrackWidthSelectBox, bool aEdit=true)
void OnModify() override
Must be called after a board change to set the modified flag.
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aEdit=true)
A set of BOARD_ITEMs (i.e., without duplicates).
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void SetNotAllowedLayerSet(LSET aMask)
void SetUndefinedLayerName(const wxString &aName)
virtual EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
A holder to handle information on schematic or board items.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
int FindItem(const EDA_ITEM *aItem) const
unsigned GetCount() const
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Converts aValue in internal units into a united string.
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID GetFirstLayer() const
static bool g_filterByNet
static wxString g_netclassFilter
static bool g_filterByNetclass
static int g_trackWidthFilter
static bool g_filterSelected
static int g_viaSizeFilter
static bool g_filterByViaSize
static wxString g_netFilter
static bool g_modifyTracks
static bool g_filterByTrackWidth
static bool g_filterByLayer
PCB_LAYER_ID ToLAYER_ID(int aLayer)
wxFont GetInfoFont(wxWindow *aWindow)
Class to handle a set of BOARD_ITEMs.
std::vector< FAB_LAYER_COLOR > dummy
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
#define INDETERMINATE_ACTION