36 m_parentTool( aParentTool )
52 m_sheetGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
56 m_sheetGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
57 m_sheetGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
60 m_sheetGrid->SetColLabelValue( 0, wxT(
"Generate" ) );
61 m_sheetGrid->SetColLabelValue( 1, wxT(
"Sheet Path" ) );
62 m_sheetGrid->SetColLabelValue( 2, wxT(
"Sheet Name" ) );
95 int componentClassRowIdx = 0;
99 if( ruleArea.
m_sourceType == RULE_AREA_PLACEMENT_SOURCE_TYPE::SHEETNAME )
102 componentClassRowIdx++;
105 if( sheetRowIdx > 0 )
108 if( componentClassRowIdx > 0 )
112 componentClassRowIdx = 0;
116 if( ruleArea.
m_sourceType == RULE_AREA_PLACEMENT_SOURCE_TYPE::SHEETNAME )
120 m_sheetGrid->SetCellRenderer( sheetRowIdx, 0,
new wxGridCellBoolRenderer );
121 m_sheetGrid->SetCellEditor( sheetRowIdx, 0,
new wxGridCellBoolEditor );
131 new wxGridCellBoolRenderer );
133 new wxGridCellBoolEditor );
136 componentClassRowIdx++;
168 int componentClassRowIdx = 0;
170 for(
size_t i = 0; i < raData->
m_areas.size(); i++ )
174 if( raData->
m_areas[i].m_sourceType == RULE_AREA_PLACEMENT_SOURCE_TYPE::SHEETNAME )
176 enabled =
m_sheetGrid->GetCellValue( sheetRowIdx, 0 );
182 componentClassRowIdx++;
185 raData->
m_areas[i].m_generateEnabled = ( !enabled.CompareTo( wxT(
"1" ) ) ) ?
true :
false;
Class DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE.
wxNotebook * m_sourceNotebook
wxCheckBox * m_cbGroupItems
wxCheckBox * m_cbReplaceExisting
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS(PCB_BASE_FRAME *aFrame, MULTICHANNEL_TOOL *aParentTool)
MULTICHANNEL_TOOL * m_parentTool
bool TransferDataFromWindow() override
bool TransferDataToWindow() override
wxGrid * m_componentClassGrid
~DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS()
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.
REPEAT_LAYOUT_OPTIONS m_options
std::vector< RULE_AREA > m_areas
RULE_AREA_PLACEMENT_SOURCE_TYPE m_sourceType
wxString m_componentClass