KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_generators.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) 2023 Alex Shvartzkop <[email protected]>
5 * Copyright (C) 2023 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_GENERATORS_H_
26#define DIALOG_GENERATORS_H_
27
30#include <board.h>
31
32class PCB_EDIT_FRAME;
33
34#define DIALOG_GENERATORS_WINDOW_NAME wxT( "DialogGeneratorsWindowName" )
35
36
38{
39public:
40 DIALOG_GENERATORS( PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent );
42
43 void RebuildModels();
44
45private:
46 void OnItemSelected( wxDataViewEvent& aEvent );
47
48 void OnRebuildSelectedClick( wxCommandEvent& event ) override;
49 void OnRebuildTypeClick( wxCommandEvent& event ) override;
50 void OnRebuildAllClick( wxCommandEvent& event ) override;
51
52 void OnCancelClick( wxCommandEvent& aEvent ) override;
53
54 wxDataViewListStore* getCurrentModel();
55 void clearModels();
56
57 void clearModel( const wxString& aName );
58
59 void deleteModel( const wxString& aName );
60
61 wxDataViewCtrl* addPage( const wxString& aName, const wxString& aTitle );
62
63 void onUnitsChanged( wxCommandEvent& event );
64 void onBoardChanged( wxCommandEvent& event );
65
66 virtual void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override;
67 virtual void OnBoardItemsAdded( BOARD& aBoard, std::vector<BOARD_ITEM*>& aBoardItems ) override;
68 virtual void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override;
69 virtual void OnBoardItemsRemoved( BOARD& aBoard,
70 std::vector<BOARD_ITEM*>& aBoardItems ) override;
71 virtual void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override;
72 virtual void OnBoardItemsChanged( BOARD& aBoard,
73 std::vector<BOARD_ITEM*>& aBoardItems ) override;
74 virtual void OnBoardCompositeUpdate( BOARD& aBoard, std::vector<BOARD_ITEM*>& aAddedItems,
75 std::vector<BOARD_ITEM*>& aRemovedItems,
76 std::vector<BOARD_ITEM*>& aDeletedItems ) override;
77
78 std::map<wxString, std::vector<std::pair<wxString, wxString>>> m_columnNameTypes;
79 std::map<wxString, wxDataViewListStore*> m_dataModels;
80 std::map<wxString, wxDataViewCtrl*> m_dataViews;
81
84};
85
86
87#endif // DIALOG_GENERATORS_H_
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:77
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:282
Class DIALOG_GENERATORS_BASE.
PCB_EDIT_FRAME * m_frame
void OnRebuildTypeClick(wxCommandEvent &event) override
virtual void OnBoardItemsChanged(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
void OnRebuildSelectedClick(wxCommandEvent &event) override
wxDataViewCtrl * addPage(const wxString &aName, const wxString &aTitle)
void OnItemSelected(wxDataViewEvent &aEvent)
void deleteModel(const wxString &aName)
std::map< wxString, wxDataViewListStore * > m_dataModels
void OnCancelClick(wxCommandEvent &aEvent) override
void clearModel(const wxString &aName)
void OnRebuildAllClick(wxCommandEvent &event) override
virtual void OnBoardCompositeUpdate(BOARD &aBoard, std::vector< BOARD_ITEM * > &aAddedItems, std::vector< BOARD_ITEM * > &aRemovedItems, std::vector< BOARD_ITEM * > &aDeletedItems) override
virtual void OnBoardItemRemoved(BOARD &aBoard, BOARD_ITEM *aBoardItem) override
virtual void OnBoardItemAdded(BOARD &aBoard, BOARD_ITEM *aBoardItem) override
wxDataViewListStore * getCurrentModel()
std::map< wxString, wxDataViewCtrl * > m_dataViews
void onUnitsChanged(wxCommandEvent &event)
std::map< wxString, std::vector< std::pair< wxString, wxString > > > m_columnNameTypes
virtual void OnBoardItemsAdded(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
virtual void OnBoardItemsRemoved(BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItems) override
virtual void OnBoardItemChanged(BOARD &aBoard, BOARD_ITEM *aBoardItem) override
void onBoardChanged(wxCommandEvent &event)
The main frame for Pcbnew.