66 wxString doCopy =
m_raGrid->GetCellValue( i, 0 );
68 data->m_compatMap[
m_targetRAs[i].m_targetRA].m_doCopy = !doCopy.CompareTo( wxT(
"1" ) ) ? true :
false;
80 data->m_options.m_anchorFp =
nullptr;
87 data->m_options.m_anchorFp = fp;
99 for(
const auto& [ruleArea, ruleAreaData] : data->
m_compatMap )
104 ent.
m_errMsg = ruleAreaData.m_errorMsg;
105 ent.
m_isOK = ruleAreaData.m_isOk;
106 ent.
m_raName = ruleArea->m_ruleName;
116 if ( !a.m_isOK && b.m_isOK )
118 else if ( a.m_isOK && !b.m_isOK )
121 return a.m_raName < b.m_raName;
131 m_raGrid->SetCellValue( i, 1, entry.m_raName );
132 m_raGrid->SetCellValue( i, 2, entry.m_isOK ?
_(
"OK" ) : entry.m_errMsg );
133 m_raGrid->SetCellValue( i, 3, wxString() );
134 m_raGrid->SetCellRenderer( i, 0,
new wxGridCellBoolRenderer);
135 m_raGrid->SetCellEditor( i, 0,
new wxGridCellBoolEditor);
136 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1" ) : wxT(
"" ) );
138 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
140 wxGridCellAttr* attr =
new wxGridCellAttr;
144 m_raGrid->SetCellValue( i, 3, wxString() );
154 wxArrayString refFpNames;
155 refFpNames.push_back(
"" );
177 int row = aEvent.GetRow();
178 int col = aEvent.GetCol();
180 if( col == 3 && row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
186 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