KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_via_stacks.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 The 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, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef PANEL_SETUP_VIA_STACKS_H
21#define PANEL_SETUP_VIA_STACKS_H
22
23#include <vector>
24
27
28class BOARD;
29class PCB_EDIT_FRAME;
30
31
33{
34public:
35 PANEL_SETUP_VIA_STACKS( wxWindow* aParentWindow, PCB_EDIT_FRAME* aFrame );
36
37 bool TransferDataToWindow() override;
38 bool TransferDataFromWindow() override;
39
40 void ImportSettingsFrom( BOARD* aBoard );
41
42private:
43 void loadFrom( BOARD_DESIGN_SETTINGS& aBds );
44
45 bool nameIsFree( const wxString& aName, int aIgnoreRow ) const;
46
47 void onCellChanged( wxGridEvent& aEvent );
48 void onAdd( wxCommandEvent& aEvent );
49 void onEdit( wxCommandEvent& aEvent );
50 void onRemove( wxCommandEvent& aEvent );
51
52 void rebuildGrid();
53 bool editPreset( VIA_STACK_PRESET& aPreset );
54
56 std::vector<VIA_STACK_PRESET> m_presets;
58};
59
60#endif // PANEL_SETUP_VIA_STACKS_H
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
PANEL_SETUP_VIA_STACKS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
PANEL_SETUP_VIA_STACKS(wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame)
void onRemove(wxCommandEvent &aEvent)
bool editPreset(VIA_STACK_PRESET &aPreset)
bool nameIsFree(const wxString &aName, int aIgnoreRow) const
void loadFrom(BOARD_DESIGN_SETTINGS &aBds)
void ImportSettingsFrom(BOARD *aBoard)
void onEdit(wxCommandEvent &aEvent)
std::vector< VIA_STACK_PRESET > m_presets
void onAdd(wxCommandEvent &aEvent)
void onCellChanged(wxGridEvent &aEvent)
The main frame for Pcbnew.
A named microvia stack definition, chosen while routing instead of entering the values each time.