KiCad PCB EDA Suite
panel_setup_tracks_and_vias.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 KiCad Developers, see change_log.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 
24 
25 #ifndef PANEL_SETUP_TRACKS_AND_VIAS_H
26 #define PANEL_SETUP_TRACKS_AND_VIAS_H
27 
28 #include <class_board.h>
29 #include <widgets/unit_binder.h>
30 #include <widgets/paged_dialog.h>
31 
34 
35 class PCB_EDIT_FRAME;
37 
38 
40 {
41 private:
46 
47  // We must validate against the current m_BrdSettings as they may have been
48  // changed but not yet committed. Fetch them from the constraints panel.
50 
51  bool validateData();
52 
53 protected:
54  void OnAddTrackWidthsClick( wxCommandEvent& event ) override;
55  void OnRemoveTrackWidthsClick( wxCommandEvent& event ) override;
56  void OnAddViaSizesClick( wxCommandEvent& event ) override;
57  void OnRemoveViaSizesClick( wxCommandEvent& event ) override;
58  void OnAddDiffPairsClick( wxCommandEvent& event ) override;
59  void OnRemoveDiffPairsClick( wxCommandEvent& event ) override;
60 
61  void AppendTrackWidth( const int aWidth );
62  void AppendViaSize( const int aSize, const int aDrill );
63  void AppendDiffPairs( const int aWidth, const int aGap, const int aViaGap );
64 
65 public:
67  PANEL_SETUP_FEATURE_CONSTRAINTS* aConstraintsPanel );
69 
70  bool TransferDataToWindow() override;
71  bool TransferDataFromWindow() override;
72 
73  void ImportSettingsFrom( BOARD* aBoard );
74 };
75 
76 #endif //PANEL_SETUP_TRACKS_AND_VIAS_H
void OnRemoveViaSizesClick(wxCommandEvent &event) override
Class BOARD to handle a board.
PANEL_SETUP_FEATURE_CONSTRAINTS * m_ConstraintsPanel
void OnAddDiffPairsClick(wxCommandEvent &event) override
void OnRemoveDiffPairsClick(wxCommandEvent &event) override
void OnAddViaSizesClick(wxCommandEvent &event) override
void AppendViaSize(const int aSize, const int aDrill)
PANEL_SETUP_TRACKS_AND_VIAS(PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame, PANEL_SETUP_FEATURE_CONSTRAINTS *aConstraintsPanel)
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
void OnAddTrackWidthsClick(wxCommandEvent &event) override
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
Class PANEL_SETUP_TRACKS_AND_VIAS_BASE.
void OnRemoveTrackWidthsClick(wxCommandEvent &event) override
void AppendDiffPairs(const int aWidth, const int aGap, const int aViaGap)
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.