KiCad PCB EDA Suite
dialog_symbol_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) 2017 Oliver Walters
5  * Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef DIALOG_SYMBOL_FIELDS_TABLE_H
26 #define DIALOG_SYMBOL_FIELDS_TABLE_H
27 
28 
30 #include <sch_reference_list.h>
31 
32 
33 class SCH_EDIT_FRAME;
35 
36 
38 {
39 public:
42 
43  bool TransferDataToWindow() override;
44  bool TransferDataFromWindow() override;
45 
46 private:
47  void AddField( const wxString& displayName, const wxString& aCanonicalName, bool defaultShow,
48  bool defaultSortBy );
49 
54  void LoadFieldNames();
55 
56  void OnColSort( wxGridEvent& aEvent );
57 
58  void OnColumnItemToggled( wxDataViewEvent& event ) override;
59  void OnGroupSymbolsToggled( wxCommandEvent& event ) override;
60  void OnRegroupSymbols( wxCommandEvent& aEvent ) override;
61  void OnTableValueChanged( wxGridEvent& event ) override;
62  void OnTableCellClick( wxGridEvent& event ) override;
63  void OnTableItemContextMenu( wxGridEvent& event ) override;
64  void OnTableColSize( wxGridSizeEvent& event ) override;
65  void OnSizeFieldList( wxSizeEvent& event ) override;
66  void OnAddField( wxCommandEvent& event ) override;
67  void OnSaveAndContinue( wxCommandEvent& aEvent ) override;
68  void OnCancel( wxCommandEvent& event ) override;
69  void OnClose( wxCloseEvent& event ) override;
70 
74 
77 };
78 
79 #endif /* DIALOG_SYMBOL_FIELDS_TABLE_H */
void OnTableValueChanged(wxGridEvent &event) override
void OnSizeFieldList(wxSizeEvent &event) override
void OnClose(wxCloseEvent &event) override
Schematic editor (Eeschema) main window.
void OnColumnItemToggled(wxDataViewEvent &event) override
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
void AddField(const wxString &displayName, const wxString &aCanonicalName, bool defaultShow, bool defaultSortBy)
void OnAddField(wxCommandEvent &event) override
void OnTableCellClick(wxGridEvent &event) override
void OnRegroupSymbols(wxCommandEvent &aEvent) override
DIALOG_SYMBOL_FIELDS_TABLE(SCH_EDIT_FRAME *parent)
void OnGroupSymbolsToggled(wxCommandEvent &event) override
void OnSaveAndContinue(wxCommandEvent &aEvent) override
void OnTableItemContextMenu(wxGridEvent &event) override
Class DIALOG_SYMBOL_FIELDS_TABLE_BASE.
void OnCancel(wxCommandEvent &event) override
void OnTableColSize(wxGridSizeEvent &event) override
FIELDS_EDITOR_GRID_DATA_MODEL * m_dataModel
void LoadFieldNames()
Construct the rows of m_fieldsCtrl and the columns of m_dataModel from a union of all field names in ...