70 wxString doCopy =
m_raGrid->GetCellValue( i, 0 );
72 data->m_compatMap[
m_targetRAs[i].m_targetRA].m_doCopy = !doCopy.CompareTo( wxT(
"1" ) ) ? true :
false;
84 data->m_options.m_anchorFp =
nullptr;
91 data->m_options.m_anchorFp = fp;
103 for(
const auto& [ruleArea, ruleAreaData] : data->
m_compatMap )
108 ent.
m_errMsg = ruleAreaData.m_errorMsg;
109 ent.
m_isOK = ruleAreaData.m_isOk;
110 ent.
m_raName = ruleArea->m_ruleName;
120 if ( !a.m_isOK && b.m_isOK )
122 else if ( a.m_isOK && !b.m_isOK )
125 return a.m_raName < b.m_raName;
135 m_raGrid->SetCellValue( i, 1, entry.m_raName );
136 m_raGrid->SetCellValue( i, 2, entry.m_isOK ?
_(
"OK" ) : entry.m_errMsg );
137 m_raGrid->SetCellValue( i, 3, wxString() );
138 m_raGrid->SetCellRenderer( i, 0,
new wxGridCellBoolRenderer);
139 m_raGrid->SetCellEditor( i, 0,
new wxGridCellBoolEditor);
140 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1" ) : wxT(
"" ) );
142 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
144 wxGridCellAttr* attr =
new wxGridCellAttr;
148 m_raGrid->SetCellValue( i, 3, wxString() );
158 wxArrayString refFpNames;
159 refFpNames.push_back(
"" );
181 int row = aEvent.GetRow();
182 int col = aEvent.GetCol();
184 if( col == 3 && row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
190 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