KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_lib_footprint_fields_table.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2026 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <memory>
23#include <vector>
24
27
29
30
32{
33public:
37
38 bool TransferDataToWindow() override;
39 bool TransferDataFromWindow() override;
40
41private:
42 void loadFootprints();
43
44 wxGridCellEditor* createDatasheetEditor() override;
45
46 // Don't mark the frame modified for lib tables, we're not modifying the library,
47 // just the application settings for the library editor.
48 void onBomSettingsChanged() override {}
49
51
56 void LoadFieldNames();
57
58 void OnTableSelectionChanged( const std::set<int>& aRows ) override {}
59
60 void OnScope( wxCommandEvent& aEvent ) override;
61 void OnMenu( wxCommandEvent& aEvent ) override;
62
63 void OnSaveAndContinue( wxCommandEvent& aEvent ) override;
64 void OnCancel( wxCommandEvent& aEvent ) override;
65 void OnOk( wxCommandEvent& aEvent ) override;
66 void OnClose( wxCloseEvent& aEvent ) override;
67
69
70private:
71 std::vector<BOM_PRESET> getBuiltInBomPresets() const override;
72
73 wxString resolveVariant() const override;
74 bool resolveTextVar( wxString* aToken ) const override;
75
76private:
78 std::vector<std::unique_ptr<FOOTPRINT>> m_loadedFootprints;
79 std::vector<FOOTPRINT_REF> m_footprintsList;
81};
DIALOG_FIELDS_TABLE(wxWindow *aParent, FIELDS_TABLE_SETTINGS &aPanelSettings, FIELDS_TABLE_BOM_SETTINGS &aBomSettings, JOB_EXPORT_BOM *aJob)
std::vector< std::unique_ptr< FOOTPRINT > > m_loadedFootprints
FIELDS_TABLE_DATA_MODEL_BASE * getDataModel() const override
void OnSaveAndContinue(wxCommandEvent &aEvent) override
void LoadFieldNames()
Construct the rows of m_fieldsCtrl and the columns of m_dataModel from a union of all field names in ...
LIB_FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL * m_dataModel
void OnScope(wxCommandEvent &aEvent) override
std::vector< BOM_PRESET > getBuiltInBomPresets() const override
void OnCancel(wxCommandEvent &aEvent) override
void OnMenu(wxCommandEvent &aEvent) override
void setScope(FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE aScope)
bool resolveTextVar(wxString *aToken) const override
void OnTableSelectionChanged(const std::set< int > &aRows) override
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE(FOOTPRINT_EDIT_FRAME *aParent, FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE aScope)
Contains everything completly generic to fields tables data models, as well as column functionality t...