KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_buses.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) 2018 CERN
5 * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Jon Evans <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef PANEL_SETUP_BUSES_H
23#define PANEL_SETUP_BUSES_H
24
25#include <map>
27#include <bus_alias.h>
28
29class SCH_EDIT_FRAME;
30class SCH_SCREEN;
31class BUS_ALIAS;
32
34{
35public:
36 PANEL_SETUP_BUSES( wxWindow* aWindow, SCH_EDIT_FRAME* aFrame );
37
39
40 bool TransferDataFromWindow() override;
41 bool TransferDataToWindow() override;
42
43protected:
44 void OnAddAlias( wxCommandEvent& aEvent ) override;
45 void OnDeleteAlias( wxCommandEvent& aEvent ) override;
46 void OnAddMember( wxCommandEvent& aEvent ) override;
47 void OnRemoveMember( wxCommandEvent& aEvent ) override;
48 void OnAliasesGridCellChanging( wxGridEvent& event );
49 void OnMemberGridCellChanging( wxGridEvent& event );
50 void OnSizeGrid( wxSizeEvent& event ) override;
51 void OnUpdateUI( wxUpdateUIEvent& event ) override;
52
53 void reloadMembersGridOnIdle( wxIdleEvent& aEvent );
54
56
57private:
60
61 std::vector< std::shared_ptr<BUS_ALIAS> > m_aliases;
65
66 wxString m_errorMsg;
69};
70
71
72#endif // PANEL_SETUP_BUSES_H
Class PANEL_SETUP_BUSES_BASE.
void OnAliasesGridCellChanging(wxGridEvent &event)
std::vector< std::shared_ptr< BUS_ALIAS > > m_aliases
void reloadMembersGridOnIdle(wxIdleEvent &aEvent)
void OnDeleteAlias(wxCommandEvent &aEvent) override
void OnUpdateUI(wxUpdateUIEvent &event) override
SCH_EDIT_FRAME * m_frame
void OnSizeGrid(wxSizeEvent &event) override
bool TransferDataToWindow() override
wxString m_membersLabelTemplate
void OnRemoveMember(wxCommandEvent &aEvent) override
void OnMemberGridCellChanging(wxGridEvent &event)
bool TransferDataFromWindow() override
void OnAddMember(wxCommandEvent &aEvent) override
void OnAddAlias(wxCommandEvent &aEvent) override
Schematic editor (Eeschema) main window.