35 m_parentTool( aParentTool )
54 m_sheetGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
58 m_sheetGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59 m_sheetGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
111 m_groupGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
115 m_groupGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
116 m_groupGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
127 int componentClassRowIdx = 0;
132 if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
134 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
135 componentClassRowIdx++;
136 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::GROUP_PLACEMENT )
140 if( sheetRowIdx > 0 )
143 if( componentClassRowIdx > 0 )
150 componentClassRowIdx = 0;
155 if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
159 m_sheetGrid->SetCellRenderer( sheetRowIdx, 0,
new wxGridCellBoolRenderer );
160 m_sheetGrid->SetCellEditor( sheetRowIdx, 0,
new wxGridCellBoolEditor );
164 else if( ruleArea.
m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
171 componentClassRowIdx++;
176 m_groupGrid->SetCellRenderer( groupIdx, 0,
new wxGridCellBoolRenderer );
177 m_groupGrid->SetCellEditor( groupIdx, 0,
new wxGridCellBoolEditor );
215 int componentClassRowIdx = 0;
218 for(
size_t i = 0; i < raData->
m_areas.size(); i++ )
222 if( raData->
m_areas[i].m_sourceType == PLACEMENT_SOURCE_T::SHEETNAME )
224 enabled =
m_sheetGrid->GetCellValue( sheetRowIdx, 0 );
227 else if( raData->
m_areas[i].m_sourceType == PLACEMENT_SOURCE_T::COMPONENT_CLASS )
230 componentClassRowIdx++;
234 enabled =
m_groupGrid->GetCellValue( groupIdx, 0 );
238 raData->
m_areas[i].m_generateEnabled = ( !enabled.CompareTo( wxT(
"1" ) ) ) ?
true :
false;
263 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