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
25
#include <
dialogs/dialog_fields_table.h
>
26
#include <
footprint_fields_data_model.h
>
27
28
class
FOOTPRINT_EDIT_FRAME
;
29
30
31
class
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE
:
public
DIALOG_FIELDS_TABLE
32
{
33
public
:
34
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE
(
FOOTPRINT_EDIT_FRAME
* aParent,
35
FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE
aScope );
36
~DIALOG_LIB_FOOTPRINT_FIELDS_TABLE
()
override
;
37
38
bool
TransferDataToWindow
()
override
;
39
bool
TransferDataFromWindow
()
override
;
40
41
private
:
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
50
void
setScope
(
FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE
aScope );
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
68
FIELDS_TABLE_DATA_MODEL_BASE
*
getDataModel
()
const override
{
return
m_dataModel
; }
69
70
private
:
71
std::vector<BOM_PRESET>
getBuiltInBomPresets
()
const override
;
72
73
wxString
resolveVariant
()
const override
;
74
bool
resolveTextVar
( wxString* aToken )
const override
;
75
76
private
:
77
FOOTPRINT_EDIT_FRAME
*
m_parent
;
78
std::vector<std::unique_ptr<FOOTPRINT>>
m_loadedFootprints
;
79
std::vector<FOOTPRINT_REF>
m_footprintsList
;
80
LIB_FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL
*
m_dataModel
=
nullptr
;
81
};
DIALOG_FIELDS_TABLE::DIALOG_FIELDS_TABLE
DIALOG_FIELDS_TABLE(wxWindow *aParent, FIELDS_TABLE_SETTINGS &aPanelSettings, FIELDS_TABLE_BOM_SETTINGS &aBomSettings, JOB_EXPORT_BOM *aJob)
Definition
dialog_fields_table.cpp:173
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::m_loadedFootprints
std::vector< std::unique_ptr< FOOTPRINT > > m_loadedFootprints
Definition
dialog_lib_footprint_fields_table.h:78
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::getDataModel
FIELDS_TABLE_DATA_MODEL_BASE * getDataModel() const override
Definition
dialog_lib_footprint_fields_table.h:68
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::resolveVariant
wxString resolveVariant() const override
Definition
dialog_lib_footprint_fields_table.cpp:580
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnSaveAndContinue
void OnSaveAndContinue(wxCommandEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:477
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::onBomSettingsChanged
void onBomSettingsChanged() override
Definition
dialog_lib_footprint_fields_table.h:48
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::LoadFieldNames
void LoadFieldNames()
Construct the rows of m_fieldsCtrl and the columns of m_dataModel from a union of all field names in ...
Definition
dialog_lib_footprint_fields_table.cpp:369
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::~DIALOG_LIB_FOOTPRINT_FIELDS_TABLE
~DIALOG_LIB_FOOTPRINT_FIELDS_TABLE() override
Definition
dialog_lib_footprint_fields_table.cpp:267
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition
dialog_lib_footprint_fields_table.cpp:330
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::TransferDataToWindow
bool TransferDataToWindow() override
Definition
dialog_lib_footprint_fields_table.cpp:298
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::m_dataModel
LIB_FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL * m_dataModel
Definition
dialog_lib_footprint_fields_table.h:80
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnScope
void OnScope(wxCommandEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:429
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::getBuiltInBomPresets
std::vector< BOM_PRESET > getBuiltInBomPresets() const override
Definition
dialog_lib_footprint_fields_table.cpp:538
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnClose
void OnClose(wxCloseEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:517
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::m_parent
FOOTPRINT_EDIT_FRAME * m_parent
Definition
dialog_lib_footprint_fields_table.h:77
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::m_footprintsList
std::vector< FOOTPRINT_REF > m_footprintsList
Definition
dialog_lib_footprint_fields_table.h:79
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::loadFootprints
void loadFootprints()
Definition
dialog_lib_footprint_fields_table.cpp:226
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::createDatasheetEditor
wxGridCellEditor * createDatasheetEditor() override
Definition
dialog_lib_footprint_fields_table.cpp:287
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnCancel
void OnCancel(wxCommandEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:487
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnMenu
void OnMenu(wxCommandEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:438
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::setScope
void setScope(FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE aScope)
Definition
dialog_lib_footprint_fields_table.cpp:422
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::resolveTextVar
bool resolveTextVar(wxString *aToken) const override
Definition
dialog_lib_footprint_fields_table.cpp:586
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnOk
void OnOk(wxCommandEvent &aEvent) override
Definition
dialog_lib_footprint_fields_table.cpp:507
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::OnTableSelectionChanged
void OnTableSelectionChanged(const std::set< int > &aRows) override
Definition
dialog_lib_footprint_fields_table.h:58
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE::DIALOG_LIB_FOOTPRINT_FIELDS_TABLE
DIALOG_LIB_FOOTPRINT_FIELDS_TABLE(FOOTPRINT_EDIT_FRAME *aParent, FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE aScope)
Definition
dialog_lib_footprint_fields_table.cpp:155
FIELDS_TABLE_DATA_MODEL_BASE
Contains everything completly generic to fields tables data models, as well as column functionality t...
Definition
fields_table_data_model.h:122
FOOTPRINT_EDIT_FRAME
Definition
footprint_edit_frame.h:52
FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE
SCOPE
Definition
footprint_fields_data_model.h:60
LIB_FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL
Definition
footprint_fields_data_model.h:163
dialog_fields_table.h
footprint_fields_data_model.h
src
pcbnew
dialogs
dialog_lib_footprint_fields_table.h
Generated on Thu Sep 17 2026 00:06:18 for KiCad PCB EDA Suite by
1.13.2