KiCad PCB EDA Suite
dialog_fields_editor_global.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-2018 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_FIELDS_EDITOR_GLOBAL_H
26 #define DIALOG_FIELDS_EDITOR_GLOBAL_H
27 
28 
30 #include <sch_reference_list.h>
31 
32 
33 class SCH_EDIT_FRAME;
35 
36 
38 {
39 public:
42 
43  bool TransferDataFromWindow() override;
44 
45 private:
46  wxConfigBase* m_config;
50 
53 
54  void AddField( const wxString& aName, bool defaultShow, bool defaultSortBy );
55  void LoadFieldNames();
56 
57  void OnColSort( wxGridEvent& aEvent );
58 
59  void OnColumnItemToggled( wxDataViewEvent& event ) override;
60  void OnGroupComponentsToggled( wxCommandEvent& event ) override;
61  void OnRegroupComponents( wxCommandEvent& event ) override;
62  void OnTableValueChanged( wxGridEvent& event ) override;
63  void OnTableCellClick( wxGridEvent& event ) override;
64  void OnTableItemContextMenu( wxGridEvent& 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 };
71 
72 #endif /* DIALOG_FIELDS_EDITOR_GLOBAL_H */
void OnColumnItemToggled(wxDataViewEvent &event) override
void LoadFieldNames()
Constructs the rows of m_fieldsCtrl and the columns of m_dataModel from a union of all field names in...
void OnAddField(wxCommandEvent &event) override
Schematic editor (Eeschema) main window.
Class SCH_REFERENCE_LIST is used to create a flattened list of components because in a complex hierar...
DIALOG_FIELDS_EDITOR_GLOBAL(SCH_EDIT_FRAME *parent)
void OnCancel(wxCommandEvent &event) override
void OnSizeFieldList(wxSizeEvent &event) override
void OnClose(wxCloseEvent &event) override
void OnTableCellClick(wxGridEvent &event) override
void OnSaveAndContinue(wxCommandEvent &aEvent) override
void OnRegroupComponents(wxCommandEvent &event) override
FIELDS_EDITOR_GRID_DATA_MODEL * m_dataModel
Class DIALOG_FIELDS_EDITOR_GLOBAL_BASE.
void OnTableItemContextMenu(wxGridEvent &event) override
void OnTableValueChanged(wxGridEvent &event) override
void OnGroupComponentsToggled(wxCommandEvent &event) override
void AddField(const wxString &aName, bool defaultShow, bool defaultSortBy)