48 m_raGrid->SetColLabelValue( 0, wxT(
"Copy" ) );
49 m_raGrid->SetColLabelValue( 1, wxT(
"Target Rule Area" ) );
50 m_raGrid->SetColLabelValue( 2, wxT(
"Status" ) );
51 m_raGrid->SetColLabelValue( 3, wxT(
"Details" ) );
57 m_raGrid->SetMaxSize( wxSize( -1, 400 ) );
77 wxString doCopy =
m_raGrid->GetCellValue( i, 0 );
79 data->m_compatMap[
m_targetRAs[i].m_targetRA].m_doCopy = !doCopy.CompareTo( wxT(
"1" ) ) ? true :
false;
91 data->m_options.m_anchorFp =
nullptr;
98 data->m_options.m_anchorFp = fp;
110 for(
const auto& [ruleArea, ruleAreaData] : data->
m_compatMap )
115 ent.
m_errMsg = ruleAreaData.m_errorMsg;
116 ent.
m_isOK = ruleAreaData.m_isOk;
117 ent.
m_raName = ruleArea->m_ruleName;
127 if ( !a.m_isOK && b.m_isOK )
129 else if ( a.m_isOK && !b.m_isOK )
132 return a.m_raName < b.m_raName;
139 m_raGrid->SetCellValue( i, 1, entry.m_raName );
140 m_raGrid->SetCellValue( i, 2, entry.m_isOK ?
_(
"OK" ) : entry.m_errMsg );
141 m_raGrid->SetCellValue( i, 3, wxString() );
142 m_raGrid->SetCellRenderer( i, 0,
new wxGridCellBoolRenderer);
143 m_raGrid->SetCellEditor( i, 0,
new wxGridCellBoolEditor);
144 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1" ) : wxT(
"" ) );
146 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
148 wxGridCellAttr* attr =
new wxGridCellAttr;
152 m_raGrid->SetCellValue( i, 3, wxString() );
160 wxArrayString refFpNames;
161 refFpNames.push_back(
"" );
183 int row = aEvent.GetRow();
184 int col = aEvent.GetCol();
186 if( col == 3 && row >= 0 && row <
static_cast<int>(
m_targetRAs.size() ) )
192 wxString summary = wxString::Format(
_(
"Rule area topologies do not match: %s" ), entry.
m_errMsg );
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
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
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