38class wxGridCellEditor;
53 void showPopupMenu( wxMenu& aMenu, wxGridEvent& aEvent )
override;
113 void AddField(
const wxString& aFieldName,
const wxString& aLabelValue,
bool aShow,
bool aGroupBy,
114 bool aAddedByUser =
false );
147 void OnAddField( wxCommandEvent& aEvent )
override;
164 void OnExport( wxCommandEvent& aEvent )
override;
DIALOG_FIELDS_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Fields Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER)
std::map< wxString, BOM_PRESET > m_bomPresets
BOM_PRESET * m_lastSelectedBomPreset
void saveJobSettings(JOB_EXPORT_BOM &aJob)
virtual wxGridCellEditor * createReferenceEditor()
void SetUserBomFmtPresets(std::vector< BOM_FMT_PRESET > &aPresetList)
wxSize GetDefaultDialogSize() const
virtual wxGridCellEditor * createDatasheetEditor()=0
virtual bool resolveTextVar(wxString *aToken) const =0
BOM_FMT_PRESET * m_lastSelectedBomFmtPreset
void syncBomFmtPresetSelection()
void OnTableCellClick(wxGridEvent &event) override
void OnColMove(wxGridEvent &aEvent)
void EnableSelectionEvents()
void DisableSelectionEvents()
int presetDashDashDashIndex(int aPresetCount) const
void OnColSort(wxGridEvent &aEvent)
BOM_PRESET * m_currentBomPreset
void OnGridMouseMove(wxMouseEvent &aEvent)
bool savePresets(bool aSaveCurrentSettings)
wxArrayString m_bomFmtPresetMRU
void OnSizeViewControlsGrid(wxSizeEvent &event) override
void OnViewControlsCellChanged(wxGridEvent &aEvent) override
BOM_FMT_PRESET * m_currentBomFmtPreset
int presetDeletePresetIndex(int aPresetCount) const
void OnTableRangeSelectionChanged(wxGridRangeSelectEvent &aEvent)
wxString getSelectedVariant() const
void doApplyBomFmtPreset(const BOM_FMT_PRESET &aPreset)
void OnFilterText(wxCommandEvent &aEvent) override
void doApplyBomPreset(const BOM_PRESET &aPreset)
void OnPageChanged(wxNotebookEvent &aEvent) override
void ShowHideColumn(int aCol, bool aShow)
void OnExport(wxCommandEvent &aEvent) override
virtual void OnTableSelectionChanged(const std::set< int > &aRows)=0
void updateBomPresetSelection(const wxString &aName)
void OnFilterScope(wxCommandEvent &aEvent) override
BOM_FMT_PRESET GetCurrentBomFmtSettings()
Returns a formatting configuration corresponding to the values in the UI controls of the dialog.
void RestorePanelLayout()
void RestoreGridSelection(const std::set< KIID_PATH > &aItemKeys)
Restore a selection previously returned by SaveGridSelection().
std::map< FIELD_T, int > m_mandatoryFieldListIndexes
virtual wxGridCellEditor * createFootprintEditor()
void onBomFmtPresetChanged(wxCommandEvent &aEvent)
int presetSavePresetIndex(int aPresetCount) const
void OnRenameField(wxCommandEvent &aEvent) override
void OnGroupSymbolsToggled(wxCommandEvent &aEvent) override
void OnPreviewRefresh(wxCommandEvent &aEvent) override
virtual std::vector< BOM_PRESET > getBuiltInBomPresets() const
void updateBomFmtPresetSelection(const wxString &aName)
void OnTableColSize(wxGridSizeEvent &event) override
void SetUserBomPresets(std::vector< BOM_PRESET > &aPresetList)
void ApplyBomFmtPreset(const wxString &aPresetName)
DIALOG_FIELDS_TABLE(wxWindow *aParent, FIELDS_TABLE_SETTINGS &aPanelSettings, FIELDS_TABLE_BOM_SETTINGS &aBomSettings, JOB_EXPORT_BOM *aJob)
~DIALOG_FIELDS_TABLE() override
void SetupColumnProperties(int aCol)
FIELDS_TABLE_BOM_SETTINGS & m_cfgBomSettings
void loadDefaultBomPresets()
static void loadJobBomFmtPreset(const JOB_EXPORT_BOM &aJob, BOM_FMT_PRESET &aPreset)
FIELDS_TABLE_SETTINGS & m_cfgDialogSettings
std::map< wxString, BOM_FMT_PRESET > m_bomFmtPresets
static void loadJobBomPreset(const JOB_EXPORT_BOM &aJob, BOM_PRESET &aPreset)
BOM_PRESET getDataModelBomPreset()
virtual wxString resolveVariant() const =0
std::set< int > GetSelectedGridRows() const
Return the explicitly selected grid rows, or the cursor row if the selection is empty.
wxArrayString m_bomPresetMRU
void OnGridMouseWheel(wxMouseEvent &aEvent)
void OnSidebarToggle(wxCommandEvent &event) override
void rebuildBomPresetsWidget()
void OnAddField(wxCommandEvent &aEvent) override
std::vector< BOM_PRESET > GetUserBomPresets() const
void onBomPresetChanged(wxCommandEvent &aEvent)
virtual void onBomSettingsChanged()
void SetReadOnly(bool aReadOnly)
std::set< KIID_PATH > SaveGridSelection()
Save the grid selection by stable item identity so it can survive a row rebuild.
void ApplyBomPreset(const wxString &aPresetName)
void OnFilterMouseMoved(wxMouseEvent &event) override
void OnRegroupSymbols(wxCommandEvent &aEvent) override
void OnOutputFileBrowseClicked(wxCommandEvent &aEvent) override
void OnTableValueChanged(wxGridEvent &event) override
void syncBomPresetSelection()
virtual FIELDS_TABLE_DATA_MODEL_BASE * getDataModel() const =0
VIEW_CONTROLS_GRID_DATA_MODEL * m_viewControlsDataModel
static wxString GetDefaultBomFileName(const wxString &aInputFileName)
Derive the default BOM output file name from the input file name by swapping the extension to CSV.
std::vector< BOM_FMT_PRESET > GetUserBomFmtPresets() const
void rebuildBomFmtPresetsWidget()
void setSideBarButtonLook(bool aIsLeftPanelCollapsed)
void AddField(const wxString &aFieldName, const wxString &aLabelValue, bool aShow, bool aGroupBy, bool aAddedByUser=false)
void loadDefaultBomFmtPresets()
void OnRemoveField(wxCommandEvent &aEvent) override
void SetupAllColumnProperties()
Contains everything completly generic to fields tables data models, as well as column functionality t...
DIALOG_FIELDS_TABLE * m_dialog
FIELDS_TABLE_GRID_TRICKS(DIALOG_FIELDS_TABLE *aDialog, WX_GRID *aGrid, FIELDS_TABLE_DATA_MODEL_BASE *aDataModel)
virtual void showFieldsTablePopupMenu(wxMenu &aMenu, wxGridEvent &aEvent)
static constexpr int FIRST_CLIENT_ID
FIELDS_TABLE_DATA_MODEL_BASE * m_dataModel
void doPopupSelection(wxCommandEvent &aEvent) override
void showPopupMenu(wxMenu &aMenu, wxGridEvent &aEvent) override
virtual void doFieldsTablePopupSelection(wxCommandEvent &aEvent)
GRID_TRICKS(WX_GRID *aGrid)
@ GRIDTRICKS_FIRST_CLIENT_ID
Dialog settings for the lib/symbol/footprint table editors across the various editors.
FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...