KiCad PCB EDA Suite
dialog_lib_edit_pin_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) 2019 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU 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, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
25 
26 #include <lib_item.h>
27 #include <class_library.h>
28 
30 {
41 
42  COL_COUNT // keep as last
43 };
44 
45 
47 class LIB_EDIT_FRAME;
48 
49 
51 {
52 public:
54  ~DIALOG_LIB_EDIT_PIN_TABLE() override;
55 
56  bool TransferDataToWindow() override;
57  bool TransferDataFromWindow() override;
58 
59  void OnColSort( wxGridEvent& aEvent );
60  void OnAddRow( wxCommandEvent& event ) override;
61  void OnDeleteRow( wxCommandEvent& event ) override;
62  void OnSize( wxSizeEvent& event ) override;
63  void OnCellEdited( wxGridEvent& event ) override;
64  void OnRebuildRows( wxCommandEvent& event ) override;
65  void OnUpdateUI( wxUpdateUIEvent& event ) override;
66  void OnCancel( wxCommandEvent& event ) override;
67  void OnClose( wxCloseEvent& event ) override;
68 
69 protected:
70 
71  void updateSummary();
72  void adjustGridColumns( int aWidth );
73 
75  bool m_initialized = false;
77  wxString m_columnsShown;
79  LIB_PINS m_pins; // a copy of the pins owned by me
80  bool m_modified;
81 
82  int m_width;
83 
85 };
void OnClose(wxCloseEvent &event) override
void OnSize(wxSizeEvent &event) override
DIALOG_LIB_EDIT_PIN_TABLE(LIB_EDIT_FRAME *parent, LIB_PART *aPart)
std::vector< LIB_PIN * > LIB_PINS
Helper for defining a list of pin object pointers.
Definition: lib_item.h:55
void OnAddRow(wxCommandEvent &event) override
void OnCellEdited(wxGridEvent &event) override
bool m_modified
true when there are unsaved changes
void OnRebuildRows(wxCommandEvent &event) override
void OnUpdateUI(wxUpdateUIEvent &event) override
Define a library symbol object.
PIN_TABLE_DATA_MODEL * m_dataModel
Class DIALOG_LIB_EDIT_PIN_TABLE_BASE.
The symbol library editor main window.
void OnDeleteRow(wxCommandEvent &event) override
void OnColSort(wxGridEvent &aEvent)
Definition for part library class.
void OnCancel(wxCommandEvent &event) override