KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_layers.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, 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_LAYERS_H
26#define PANEL_SETUP_LAYERS_H
27
28#include <widgets/unit_binder.h>
31
32class PCB_EDIT_FRAME;
33class BOARD;
36
37
42{
43 PANEL_SETUP_LAYERS_CTLs() : name( nullptr ), checkbox( nullptr ), choice( nullptr ) {}
44 PANEL_SETUP_LAYERS_CTLs( wxTextCtrl* aName, wxCheckBox* aCheckBox, wxControl* aChoiceOrDesc )
45 {
46 name = aName;
47 checkbox = aCheckBox;
48 choice = aChoiceOrDesc;
49 }
50
51 wxTextCtrl* name;
52 wxCheckBox* checkbox;
53 wxControl* choice;
54};
55
56
58{
59public:
60 PANEL_SETUP_LAYERS( wxWindow* aParentWindow, PCB_EDIT_FRAME* aFrame );
61
62 void ImportSettingsFrom( BOARD* aBoard );
63
75 bool CheckCopperLayerCount( BOARD* aWorkingBoard, BOARD* aImportedBoard );
76
79
85 void SyncCopperLayers( int aNumCopperLayers );
86
88 {
89 m_physicalStackup = aPanel;
90 }
91
92 bool IsInitialized() const { return m_initialized; }
93
94private:
95 void setLayerCheckBox( PCB_LAYER_ID layer, bool isChecked );
96 void setCopperLayerCheckBoxes( int copperCount );
98
100 void showSelectedLayerCheckBoxes( LSET enableLayerMask );
101 void showLayerTypes();
102
103 bool TransferDataToWindow() override;
104 bool TransferDataFromWindow() override;
105 virtual void addUserDefinedLayer( wxCommandEvent& aEvent ) override;
106
107 bool testLayerNames();
108
114
119
120 wxTextCtrl* getName( PCB_LAYER_ID aLayer );
121 wxCheckBox* getCheckBox( PCB_LAYER_ID aLayer );
122 wxChoice* getChoice( PCB_LAYER_ID aLayer );
123
127
128 void append_user_layer( PCB_LAYER_ID aLayer );
129
130private:
136
137 std::map<PCB_LAYER_ID, PANEL_SETUP_LAYERS_CTLs> m_layersControls;
138
139
141 wxTextCtrl* m_CrtYdFrontName;
143
145 wxTextCtrl* m_FabFrontName;
146 wxStaticText* m_FabFrontStaticText;
147
149 wxTextCtrl* m_AdhesFrontName;
151
153 wxTextCtrl* m_SoldPFrontName;
155
157 wxTextCtrl* m_SilkSFrontName;
159
161 wxTextCtrl* m_MaskFrontName;
163
165 wxTextCtrl* m_MaskBackName;
166 wxStaticText* m_MaskBackStaticText;
167
169 wxTextCtrl* m_SilkSBackName;
171
173 wxTextCtrl* m_SoldPBackName;
175
177 wxTextCtrl* m_AdhesBackName;
179
180 wxCheckBox* m_FabBackCheckBox;
181 wxTextCtrl* m_FabBackName;
182 wxStaticText* m_FabBackStaticText;
183
185 wxTextCtrl* m_CrtYdBackName;
187
189 wxTextCtrl* m_PCBEdgesName;
190 wxStaticText* m_PCBEdgesStaticText;
191
192 wxCheckBox* m_MarginCheckBox;
193 wxTextCtrl* m_MarginName;
194 wxStaticText* m_MarginStaticText;
195
196 wxCheckBox* m_Eco1CheckBox;
197 wxTextCtrl* m_Eco1Name;
198 wxStaticText* m_Eco1StaticText;
199
200 wxCheckBox* m_Eco2CheckBox;
201 wxTextCtrl* m_Eco2Name;
202 wxStaticText* m_Eco2StaticText;
203
205 wxTextCtrl* m_CommentsName;
206 wxStaticText* m_CommentsStaticText;
207
209 wxTextCtrl* m_DrawingsName;
210 wxStaticText* m_DrawingsStaticText;
211};
212
213
214
215#endif //PANEL_SETUP_LAYERS_H
216
217
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:295
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: lseq.h:47
LSET is a set of PCB_LAYER_IDs.
Definition: lset.h:37
Class PANEL_SETUP_LAYERS_BASE.
wxStaticText * m_CrtYdBackStaticText
wxStaticText * m_CrtYdFrontStaticText
wxCheckBox * m_SoldPBackCheckBox
wxStaticText * m_PCBEdgesStaticText
wxTextCtrl * m_FabBackName
void showSelectedLayerCheckBoxes(LSET enableLayerMask)
wxStaticText * m_FabBackStaticText
wxTextCtrl * m_PCBEdgesName
wxTextCtrl * m_DrawingsName
wxStaticText * m_MarginStaticText
bool IsInitialized() const
void append_user_layer(PCB_LAYER_ID aLayer)
wxCheckBox * m_AdhesBackCheckBox
wxTextCtrl * getName(PCB_LAYER_ID aLayer)
wxStaticText * m_Eco2StaticText
bool CheckCopperLayerCount(BOARD *aWorkingBoard, BOARD *aImportedBoard)
Check and warn if inner copper layers will be deleted.
wxTextCtrl * m_CrtYdBackName
wxStaticText * m_AdhesFrontStaticText
wxTextCtrl * m_MaskFrontName
wxCheckBox * m_Eco1CheckBox
wxCheckBox * m_CrtYdFrontCheckBox
wxCheckBox * m_FabFrontCheckBox
bool TransferDataToWindow() override
wxTextCtrl * m_AdhesFrontName
void SetPhysicalStackupPanel(PANEL_SETUP_BOARD_STACKUP *aPanel)
wxCheckBox * getCheckBox(PCB_LAYER_ID aLayer)
wxCheckBox * m_MaskFrontCheckBox
void setLayerCheckBox(PCB_LAYER_ID layer, bool isChecked)
virtual void addUserDefinedLayer(wxCommandEvent &aEvent) override
wxCheckBox * m_SilkSBackCheckBox
void SyncCopperLayers(int aNumCopperLayers)
Called when switching to this tab to make sure that any changes to the copper layer count made on the...
wxStaticText * m_AdhesBackStaticText
wxTextCtrl * m_CrtYdFrontName
std::map< PCB_LAYER_ID, PANEL_SETUP_LAYERS_CTLs > m_layersControls
wxTextCtrl * m_MaskBackName
wxStaticText * m_Eco1StaticText
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
wxTextCtrl * m_AdhesBackName
wxCheckBox * m_MaskBackCheckBox
wxCheckBox * m_SoldPFrontCheckBox
wxStaticText * m_CommentsStaticText
PCB_EDIT_FRAME * m_frame
wxCheckBox * m_PCBEdgesCheckBox
wxStaticText * m_FabFrontStaticText
wxStaticText * m_MaskFrontStaticText
LSEQ getNonRemovableLayers()
Return a list of layers in use in footprints, and therefore not removable.
wxStaticText * m_SilkSFrontStaticText
wxCheckBox * m_MarginCheckBox
wxStaticText * m_SoldPBackStaticText
wxCheckBox * m_SilkSFrontCheckBox
wxStaticText * m_MaskBackStaticText
void setCopperLayerCheckBoxes(int copperCount)
wxCheckBox * m_CrtYdBackCheckBox
wxCheckBox * m_CommentsCheckBox
wxCheckBox * m_FabBackCheckBox
wxTextCtrl * m_SoldPFrontName
wxTextCtrl * m_SilkSBackName
wxTextCtrl * m_SoldPBackName
wxStaticText * m_SilkSBackStaticText
wxTextCtrl * m_SilkSFrontName
wxCheckBox * m_Eco2CheckBox
wxCheckBox * m_AdhesFrontCheckBox
wxChoice * getChoice(PCB_LAYER_ID aLayer)
wxStaticText * m_SoldPFrontStaticText
LSEQ getRemovedLayersWithItems()
Return a list of layers removed from the board that contain items.
wxCheckBox * m_DrawingsCheckBox
wxStaticText * m_DrawingsStaticText
bool TransferDataFromWindow() override
void ImportSettingsFrom(BOARD *aBoard)
wxTextCtrl * m_CommentsName
wxTextCtrl * m_FabFrontName
The main frame for Pcbnew.
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
The 3 UI control pointers for a single board layer.
PANEL_SETUP_LAYERS_CTLs(wxTextCtrl *aName, wxCheckBox *aCheckBox, wxControl *aChoiceOrDesc)