51 m_raGrid->Bind( wxEVT_GRID_SELECT_CELL,
52 [
this]( wxGridEvent& aEvent )
54 int row = aEvent.GetRow();
56 if( row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
67 [
this]( wxCommandEvent& )
74 [
this]( wxCommandEvent& )
82 Bind( wxEVT_BUTTON, [
this]( wxCommandEvent& ) { Close(); }, wxID_CANCEL );
158 for(
const auto& [ruleArea, ruleAreaData] : data->
m_compatMap )
161 bool linked = linkSet !=
niluuid && ruleArea->m_zone->GetLinkSet() == linkSet;
163 ent.
m_doCopy = ruleAreaData.m_doCopy;
164 ent.
m_errMsg = linked && ruleAreaData.m_isOk ?
_(
"OK (linked)" ) : ruleAreaData.m_errorMsg;
165 ent.
m_isOK = ruleAreaData.m_isOk;
166 ent.
m_raName = ruleArea->m_ruleName;
180 if ( !a.m_isOK && b.m_isOK )
182 else if ( a.m_isOK && !b.m_isOK )
185 return a.m_raName < b.m_raName;
195 m_raGrid->SetCellValue( i, 1, entry.m_raName );
196 m_raGrid->SetCellValue( i, 2, entry.m_errMsg );
197 m_raGrid->SetCellValue( i, 3, wxString() );
198 m_raGrid->SetCellRenderer( i, 0,
new wxGridCellBoolRenderer);
199 m_raGrid->SetCellEditor( i, 0,
new wxGridCellBoolEditor);
200 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1" ) : wxT(
"" ) );
202 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
204 wxGridCellAttr* attr =
new wxGridCellAttr;
208 m_raGrid->SetCellValue( i, 3, wxString() );
215 ? wxString::Format(
_(
"%d selected footprints" ),
219 wxArrayString refFpNames;
220 refFpNames.push_back(
"" );
253 int row = aEvent.GetRow();
254 int col = aEvent.GetCol();
256 if( col == 3 && row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
262 wxString summary = wxString::Format(
_(
"Rule area topologies do not match: %s" ), entry.
m_errMsg );
wxBitmapBundle KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Construct and return a bitmap bundle for the given icon ID, with the default bitmap size being aDefHe...
wxStaticText * m_refRAName
wxCheckBox * m_cbCopyOnlyConnectedRouting
DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Repeat Multichannel Layout"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_cbCopyRouting
wxCheckBox * m_cbGroupItems
wxCheckBox * m_cbLooseMatching
wxCheckBox * m_cbCopyPlacement
wxCheckBox * m_cbCopyOtherItems
wxCheckBox * m_cbIncludeLockedComponents
wxCheckBox * m_cbLinkAreas
wxBitmapBundle m_detailsIcon
bool TransferDataFromWindow() override
~DIALOG_MULTICHANNEL_REPEAT_LAYOUT()
std::vector< TABLE_ENTRY > m_targetRAs
MULTICHANNEL_TOOL * m_parentTool
void OnGridCellLeftClick(wxGridEvent &aEvent)
DIALOG_MULTICHANNEL_REPEAT_LAYOUT(PCB_BASE_FRAME *aFrame, MULTICHANNEL_TOOL *aParentTool)
bool TransferDataToWindow() override
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...
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
const wxString & GetZoneName() const
const KIID & GetLinkSet() const
The set of placement rule areas that share one layout, or niluuid when this one is not linked.
std::vector< wxString > m_mismatchReasons
bool m_connectedRoutingOnly
KIID m_anchor
This area's own anchor footprint, or niluuid for the area center.
bool m_includeLockedItems
std::unordered_map< RULE_AREA *, RULE_AREA_COMPAT_DATA > m_compatMap
REPEAT_LAYOUT_OPTIONS m_options
bool m_linkAreas
Link the ticked targets to the reference.
bool FromSelection() const
A plain selection is the reference, and its channels are created only when applied.
std::set< FOOTPRINT * > m_selectedFootprints
std::set< FOOTPRINT * > m_components