69 wxString doCopy =
m_raGrid->GetCellValue( i, 0 );
71 data->m_compatMap[
m_targetRAs[i].m_targetRA].m_doCopy = !doCopy.CompareTo( wxT(
"1" ) ) ? true :
false;
83 data->m_options.m_anchorFp =
nullptr;
90 data->m_options.m_anchorFp = fp;
102 for(
const auto& [ruleArea, ruleAreaData] : data->
m_compatMap )
107 ent.
m_errMsg = ruleAreaData.m_errorMsg;
108 ent.
m_isOK = ruleAreaData.m_isOk;
109 ent.
m_raName = ruleArea->m_ruleName;
119 if ( !a.m_isOK && b.m_isOK )
121 else if ( a.m_isOK && !b.m_isOK )
124 return a.m_raName < b.m_raName;
134 m_raGrid->SetCellValue( i, 1, entry.m_raName );
135 m_raGrid->SetCellValue( i, 2, entry.m_isOK ?
_(
"OK" ) : entry.m_errMsg );
136 m_raGrid->SetCellValue( i, 3, wxString() );
137 m_raGrid->SetCellRenderer( i, 0,
new wxGridCellBoolRenderer);
138 m_raGrid->SetCellEditor( i, 0,
new wxGridCellBoolEditor);
139 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1" ) : wxT(
"" ) );
141 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
143 wxGridCellAttr* attr =
new wxGridCellAttr;
147 m_raGrid->SetCellValue( i, 3, wxString() );
157 wxArrayString refFpNames;
158 refFpNames.push_back(
"" );
180 int row = aEvent.GetRow();
181 int col = aEvent.GetCol();
183 if( col == 3 && row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
189 wxString summary = wxString::Format(
_(
"Rule area topologies do not match: %s" ), entry.
m_errMsg );
wxBitmapBundle KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Constructs and returns a bitmap bundle for the given icon ID, with the default bitmap size being aDef...
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_cbCopyPlacement
wxCheckBox * m_cbCopyOtherItems
wxCheckBox * m_cbIncludeLockedComponents
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
std::vector< wxString > m_mismatchReasons
bool m_connectedRoutingOnly
bool m_includeLockedItems
std::unordered_map< RULE_AREA *, RULE_AREA_COMPAT_DATA > m_compatMap
REPEAT_LAYOUT_OPTIONS m_options
std::set< FOOTPRINT * > m_components