36 m_parentTool( aParentTool )
55 m_sheetGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59 m_sheetGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
60 m_sheetGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
112 m_groupGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
116 m_groupGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
117 m_groupGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
128 int componentClassRowIdx = 0;
133 if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
135 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
136 componentClassRowIdx++;
137 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::GROUP_PLACEMENT )
141 if( sheetRowIdx > 0 )
144 if( componentClassRowIdx > 0 )
151 componentClassRowIdx = 0;
156 if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
160 m_sheetGrid->SetCellRenderer( sheetRowIdx, 0,
new wxGridCellBoolRenderer );
161 m_sheetGrid->SetCellEditor( sheetRowIdx, 0,
new wxGridCellBoolEditor );
166 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
171 new wxGridCellBoolRenderer );
173 new wxGridCellBoolEditor );
176 componentClassRowIdx++;
181 m_groupGrid->SetCellRenderer( groupIdx, 0,
new wxGridCellBoolRenderer );
182 m_groupGrid->SetCellEditor( groupIdx, 0,
new wxGridCellBoolEditor );
220 int componentClassRowIdx = 0;
223 for(
size_t i = 0; i < raData->
m_areas.size(); i++ )
227 if( raData->
m_areas[i].m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
229 enabled =
m_sheetGrid->GetCellValue( sheetRowIdx, 0 );
232 else if( raData->
m_areas[i].m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
235 componentClassRowIdx++;
239 enabled =
m_groupGrid->GetCellValue( groupIdx, 0 );
243 raData->
m_areas[i].m_generateEnabled = ( !enabled.CompareTo( wxT(
"1" ) ) ) ?
true :
false;
268 if( event.GetSelection() == 2 )
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 OnNotebookPageChanged(wxNotebookEvent &event) 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.
REPEAT_LAYOUT_OPTIONS m_options
std::vector< RULE_AREA > m_areas
PLACEMENT_SOURCE_T m_sourceType
wxString m_componentClass