|
KiCad PCB EDA Suite
|
This abstract base class mixes any object derived from #LIB_TABLE into wxGridTableBase so the result can be used as any type of library table within wxGrid. More...
#include <lib_table_grid_data_model.h>
Public Member Functions | |
| LIB_TABLE_GRID_DATA_MODEL (DIALOG_SHIM *aParent, WX_GRID *aGrid, const LIBRARY_TABLE &aTableToEdit, LIBRARY_MANAGER_ADAPTER *aAdapter, const wxArrayString &aPluginChoices, wxString *aMRUDirectory, const wxString &aProjectPath) | |
| ~LIB_TABLE_GRID_DATA_MODEL () override | |
| int | GetNumberRows () override |
| int | GetNumberCols () override |
| wxString | GetValue (int aRow, int aCol) override |
| wxGridCellAttr * | GetAttr (int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override |
| bool | CanGetValueAs (int aRow, int aCol, const wxString &aTypeName) override |
| bool | GetValueAsBool (int aRow, int aCol) override |
| void | SetValue (int aRow, int aCol, const wxString &aValue) override |
| void | SetValueAsBool (int aRow, int aCol, bool aValue) override |
| bool | IsEmptyCell (int aRow, int aCol) override |
| bool | InsertRows (size_t aPos=0, size_t aNumRows=1) override |
| bool | AppendRows (size_t aNumRows=1) override |
| bool | DeleteRows (size_t aPos, size_t aNumRows) override |
| wxString | GetColLabelValue (int aCol) override |
| bool | ContainsNickname (const wxString &aNickname) |
| LIBRARY_TABLE_ROW & | At (size_t aIndex) |
| LIBRARY_TABLE & | Table () |
| LIBRARY_MANAGER_ADAPTER * | Adapter () const |
| void | SetColAttr (wxGridCellAttr *aAttr, int aCol) override |
| virtual bool | IsExpanderColumn (int aCol) const |
| virtual GROUP_TYPE | GetGroupType (int aRow) const |
Protected Member Functions | |
| virtual wxString | getFileTypes (WX_GRID *aGrid, int aRow)=0 |
| virtual LIBRARY_TABLE_ROW & | at (size_t aIndex) |
| virtual size_t | size () const |
| virtual LIBRARY_TABLE_ROW | makeNewRow () |
| virtual LIBRARY_TABLE_ROWS_ITER | begin () |
| virtual LIBRARY_TABLE_ROWS_ITER | insert (LIBRARY_TABLE_ROWS_ITER aIterator, const LIBRARY_TABLE_ROW &aRow) |
| virtual void | push_back (const LIBRARY_TABLE_ROW &aRow) |
| virtual LIBRARY_TABLE_ROWS_ITER | erase (LIBRARY_TABLE_ROWS_ITER aFirst, LIBRARY_TABLE_ROWS_ITER aLast) |
| wxGridCellAttr * | enhanceAttr (wxGridCellAttr *aInputAttr, int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) |
Protected Attributes | |
| LIBRARY_TABLE | m_table |
| Working copy of a table. | |
| wxGridCellAttr * | m_uriEditor |
| wxGridCellAttr * | m_typesEditor |
| wxGridCellAttr * | m_boolAttr |
| wxGridCellAttr * | m_warningAttr |
| wxGridCellAttr * | m_editSettingsAttr |
| wxGridCellAttr * | m_openTableAttr |
| LIBRARY_MANAGER_ADAPTER * | m_adapter |
| Handle to the adapter for the type of table this grid represents (may be null) | |
| std::map< int, wxGridCellAttr * > | m_colAttrs |
Friends | |
| class | LIB_TABLE_GRID_TRICKS |
This abstract base class mixes any object derived from #LIB_TABLE into wxGridTableBase so the result can be used as any type of library table within wxGrid.
Definition at line 48 of file lib_table_grid_data_model.h.
| LIB_TABLE_GRID_DATA_MODEL::LIB_TABLE_GRID_DATA_MODEL | ( | DIALOG_SHIM * | aParent, |
| WX_GRID * | aGrid, | ||
| const LIBRARY_TABLE & | aTableToEdit, | ||
| LIBRARY_MANAGER_ADAPTER * | aAdapter, | ||
| const wxArrayString & | aPluginChoices, | ||
| wxString * | aMRUDirectory, | ||
| const wxString & | aProjectPath ) |
Definition at line 28 of file lib_table_grid_data_model.cpp.
References config, KiBitmapBundle(), m_adapter, m_boolAttr, m_editSettingsAttr, m_openTableAttr, m_table, m_typesEditor, m_uriEditor, m_warningAttr, small_new_window, and small_warning.
Referenced by DESIGN_BLOCK_LIB_TABLE_GRID_DATA_MODEL::DESIGN_BLOCK_LIB_TABLE_GRID_DATA_MODEL(), FP_LIB_TABLE_GRID_DATA_MODEL::FP_LIB_TABLE_GRID_DATA_MODEL(), SYMBOL_LIB_TABLE_GRID_DATA_MODEL::getFileTypes(), and SYMBOL_LIB_TABLE_GRID_DATA_MODEL::SYMBOL_LIB_TABLE_GRID_DATA_MODEL().
|
override |
Definition at line 69 of file lib_table_grid_data_model.cpp.
References m_boolAttr, m_editSettingsAttr, m_openTableAttr, m_typesEditor, m_uriEditor, and m_warningAttr.
|
inline |
Definition at line 97 of file lib_table_grid_data_model.h.
References m_adapter.
Referenced by LIB_TABLE_GRID_TRICKS::showPopupMenu().
|
override |
Definition at line 265 of file lib_table_grid_data_model.cpp.
References makeNewRow(), and push_back().
|
inline |
Definition at line 90 of file lib_table_grid_data_model.h.
References at().
Referenced by LIB_TABLE_GRID_TRICKS::doPopupSelection(), DESIGN_BLOCK_GRID_TRICKS::optionsEditor(), FP_GRID_TRICKS::optionsEditor(), and SYMBOL_GRID_TRICKS::optionsEditor().
|
protectedvirtual |
Definition at line 336 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by At(), ContainsNickname(), GetAttr(), GetValue(), GetValueAsBool(), DESIGN_BLOCK_LIB_TABLE_GRID_DATA_MODEL::SetValue(), FP_LIB_TABLE_GRID_DATA_MODEL::SetValue(), SetValue(), SYMBOL_LIB_TABLE_GRID_DATA_MODEL::SetValue(), and SetValueAsBool().
|
protectedvirtual |
Definition at line 354 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by DeleteRows(), and InsertRows().
|
override |
Definition at line 176 of file lib_table_grid_data_model.cpp.
References COL_ENABLED, COL_VISIBLE, and size().
| bool LIB_TABLE_GRID_DATA_MODEL::ContainsNickname | ( | const wxString & | aNickname | ) |
Definition at line 323 of file lib_table_grid_data_model.cpp.
References at(), LIBRARY_TABLE_ROW::Nickname(), and size().
|
override |
Definition at line 281 of file lib_table_grid_data_model.cpp.
References begin(), erase(), and size().
Referenced by LIB_TABLE_GRID_TRICKS::VerifyTable().
|
protectedinherited |
Definition at line 46 of file wx_grid.cpp.
Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), FIELDS_GRID_TABLE::GetAttr(), LAYERS_GRID_TABLE::GetAttr(), LIB_TABLE_GRID_DATA_MODEL::GetAttr(), PCB_FIELDS_GRID_TABLE::GetAttr(), SCH_PIN_TABLE_DATA_MODEL::GetAttr(), and GetAttr().
|
protectedvirtual |
Definition at line 372 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by DeleteRows().
|
override |
Definition at line 122 of file lib_table_grid_data_model.cpp.
References at(), COL_DESCR, COL_ENABLED, COL_NICKNAME, COL_OPTIONS, COL_STATUS, COL_TYPE, COL_URI, COL_VISIBLE, WX_GRID_TABLE_BASE::enhanceAttr(), LIBRARY_TABLE_ROW::IsOk(), m_adapter, m_boolAttr, m_editSettingsAttr, m_openTableAttr, m_typesEditor, m_uriEditor, m_warningAttr, LIBRARY_TABLE_ROW::Nickname(), LIBRARY_TABLE_ROW::TABLE_TYPE_NAME, and LIBRARY_TABLE_ROW::Type().
|
override |
Definition at line 303 of file lib_table_grid_data_model.cpp.
References _, COL_DESCR, COL_ENABLED, COL_NICKNAME, COL_OPTIONS, COL_STATUS, COL_TYPE, COL_URI, and COL_VISIBLE.
|
protectedpure virtual |
|
inlinevirtualinherited |
Reimplemented in FIELDS_EDITOR_GRID_DATA_MODEL, and LIB_FIELDS_EDITOR_GRID_DATA_MODEL.
Definition at line 80 of file wx_grid.h.
References GROUP_SINGLETON, and GROUP_TYPE.
|
inlineoverride |
Definition at line 62 of file lib_table_grid_data_model.h.
References COL_COUNT.
|
inlineoverride |
Definition at line 61 of file lib_table_grid_data_model.h.
References size().
Referenced by DESIGN_BLOCK_GRID_TRICKS::optionsEditor(), FP_GRID_TRICKS::optionsEditor(), SYMBOL_GRID_TRICKS::optionsEditor(), PANEL_DESIGN_BLOCK_LIB_TABLE::populateEnvironReadOnlyTable(), PANEL_FP_LIB_TABLE::populateEnvironReadOnlyTable(), PANEL_SYM_LIB_TABLE::populateEnvironReadOnlyTable(), and LIB_TABLE_GRID_TRICKS::VerifyTable().
|
override |
Definition at line 80 of file lib_table_grid_data_model.cpp.
References _, at(), COL_DESCR, COL_ENABLED, COL_NICKNAME, COL_OPTIONS, COL_STATUS, COL_TYPE, COL_URI, COL_VISIBLE, LIBRARY_TABLE_ROW::Description(), LIBRARY_TABLE_ROW::Disabled(), LIBRARY_TABLE_ROW::ErrorDescription(), LIBRARY_TABLE_ROW::Hidden(), LIBRARY_TABLE_ROW::IsOk(), m_adapter, LIBRARY_TABLE_ROW::Nickname(), LIBRARY_TABLE_ROW::Options(), size(), LIBRARY_TABLE_ROW::TABLE_TYPE_NAME, LIBRARY_TABLE_ROW::Type(), UnescapeString(), and LIBRARY_TABLE_ROW::URI().
Referenced by IsEmptyCell(), PANEL_DESIGN_BLOCK_LIB_TABLE::populateEnvironReadOnlyTable(), PANEL_FP_LIB_TABLE::populateEnvironReadOnlyTable(), PANEL_SYM_LIB_TABLE::populateEnvironReadOnlyTable(), LIB_TABLE_GRID_TRICKS::showPopupMenu(), and LIB_TABLE_GRID_TRICKS::VerifyTable().
|
override |
Definition at line 195 of file lib_table_grid_data_model.cpp.
References at(), COL_ENABLED, COL_VISIBLE, LIBRARY_TABLE_ROW::Disabled(), LIBRARY_TABLE_ROW::Hidden(), and size().
Referenced by LIB_TABLE_GRID_TRICKS::showPopupMenu().
|
protectedvirtual |
Definition at line 360 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by InsertRows().
|
override |
Definition at line 244 of file lib_table_grid_data_model.cpp.
References begin(), insert(), makeNewRow(), and size().
|
inlineoverride |
Definition at line 75 of file lib_table_grid_data_model.h.
References GetValue().
|
inlinevirtualinherited |
Reimplemented in FIELDS_EDITOR_GRID_DATA_MODEL, and LIB_FIELDS_EDITOR_GRID_DATA_MODEL.
|
protectedvirtual |
Definition at line 348 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by AppendRows(), and InsertRows().
|
protectedvirtual |
Definition at line 366 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by AppendRows().
|
inlineoverrideinherited |
Definition at line 62 of file wx_grid.h.
References m_colAttrs.
|
override |
Definition at line 209 of file lib_table_grid_data_model.cpp.
References at(), COL_DESCR, COL_ENABLED, COL_NICKNAME, COL_OPTIONS, COL_STATUS, COL_TYPE, COL_URI, COL_VISIBLE, CTX_LIBID, EscapeString(), LIBRARY_TABLE_ROW::SetDescription(), LIBRARY_TABLE_ROW::SetDisabled(), LIBRARY_TABLE_ROW::SetHidden(), LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetOptions(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), and size().
Referenced by DESIGN_BLOCK_LIB_TABLE_GRID_DATA_MODEL::SetValue(), FP_LIB_TABLE_GRID_DATA_MODEL::SetValue(), SYMBOL_LIB_TABLE_GRID_DATA_MODEL::SetValue(), and LIB_TABLE_GRID_TRICKS::VerifyTable().
|
override |
Definition at line 232 of file lib_table_grid_data_model.cpp.
References at(), COL_ENABLED, COL_VISIBLE, LIBRARY_TABLE_ROW::SetDisabled(), LIBRARY_TABLE_ROW::SetHidden(), and size().
Referenced by LIB_TABLE_GRID_TRICKS::doPopupSelection().
|
protectedvirtual |
Definition at line 342 of file lib_table_grid_data_model.cpp.
References m_table.
Referenced by CanGetValueAs(), ContainsNickname(), DeleteRows(), GetNumberRows(), GetValue(), GetValueAsBool(), InsertRows(), DESIGN_BLOCK_LIB_TABLE_GRID_DATA_MODEL::SetValue(), FP_LIB_TABLE_GRID_DATA_MODEL::SetValue(), SetValue(), SYMBOL_LIB_TABLE_GRID_DATA_MODEL::SetValue(), and SetValueAsBool().
|
inline |
Definition at line 95 of file lib_table_grid_data_model.h.
References m_table.
Referenced by LIB_TABLE_GRID_TRICKS::MoveDownHandler(), LIB_TABLE_GRID_TRICKS::MoveUpHandler(), LIB_TABLE_GRID_TRICKS::paste_text(), LIB_TABLE_NOTEBOOK_PANEL::SaveTable(), LIB_TABLE_NOTEBOOK_PANEL::TableModified(), PANEL_DESIGN_BLOCK_LIB_TABLE::TransferDataFromWindow(), PANEL_FP_LIB_TABLE::TransferDataFromWindow(), and PANEL_SYM_LIB_TABLE::TransferDataFromWindow().
|
friend |
Definition at line 50 of file lib_table_grid_data_model.h.
References LIB_TABLE_GRID_TRICKS.
Referenced by LIB_TABLE_GRID_TRICKS.
|
protected |
Handle to the adapter for the type of table this grid represents (may be null)
Definition at line 128 of file lib_table_grid_data_model.h.
Referenced by Adapter(), GetAttr(), GetValue(), and LIB_TABLE_GRID_DATA_MODEL().
|
protected |
Definition at line 122 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().
|
protectedinherited |
Definition at line 87 of file wx_grid.h.
Referenced by LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetAttr(), GetAttr(), SetColAttr(), and ~WX_GRID_TABLE_BASE().
|
protected |
Definition at line 124 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().
|
protected |
Definition at line 125 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().
|
protected |
Working copy of a table.
Definition at line 118 of file lib_table_grid_data_model.h.
Referenced by at(), begin(), erase(), insert(), LIB_TABLE_GRID_DATA_MODEL(), makeNewRow(), push_back(), size(), and Table().
|
protected |
Definition at line 121 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().
|
protected |
Definition at line 120 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().
|
protected |
Definition at line 123 of file lib_table_grid_data_model.h.
Referenced by GetAttr(), LIB_TABLE_GRID_DATA_MODEL(), and ~LIB_TABLE_GRID_DATA_MODEL().