KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_map_gerber_layers_to_pcb.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) 2011-2018 Jean-Pierre Charras jp.charras at wanadoo.fr
5 * Copyright The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
24#include <layer_ids.h>
25
26class GERBVIEW_FRAME;
27
32{
35
38
39protected:
40 bool TransferDataFromWindow() override;
41
42private:
43 void initDialog();
45 void OnBrdLayersCountSelection( wxCommandEvent& event ) override;
46 void OnSelectLayer( wxCommandEvent& event );
47
48 void OnStoreSetup( wxCommandEvent& event ) override;
49 void OnGetSetup( wxCommandEvent& event ) override;
50 void OnResetClick( wxCommandEvent& event ) override;
51
65 int findKnownGerbersLoaded( std::vector<int>& aGerber2KicadMapping );
66
80 int findNumAltiumGerbersLoaded( std::vector<int>& aGerber2KicadMapping );
81
95 int findNumKiCadGerbersLoaded( std::vector<int>& aGerber2KicadMapping );
96
110 int findNumX2GerbersLoaded( std::vector<int>& aGerber2KicadMapping );
111
113
114private:
116 int m_gerberActiveLayersCount; // Number of initialized Gerber layers
118
119 // Indexes Gerber layers to PCB file layers; the last value in table is the number of
120 // copper layers.
123 wxStaticText* m_layersList[ int(GERBER_DRAWLAYERS_COUNT) + 1 ];
124};
125
DIALOG_MAP_GERBER_LAYERS_TO_PCB_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Layer Selection"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnStoreSetup(wxCommandEvent &event) override
int findNumKiCadGerbersLoaded(std::vector< int > &aGerber2KicadMapping)
Find number of loaded Gerbers using KiCad naming convention.
DIALOG_MAP_GERBER_LAYERS_TO_PCB(GERBVIEW_FRAME *parent)
wxStaticText * m_layersList[int(GERBER_DRAWLAYERS_COUNT)+1]
void OnResetClick(wxCommandEvent &event) override
int m_buttonTable[int(GERBER_DRAWLAYERS_COUNT)+1]
int findNumX2GerbersLoaded(std::vector< int > &aGerber2KicadMapping)
Find number of loaded Gerbers using X2 File Functions to define layers.
void OnBrdLayersCountSelection(wxCommandEvent &event) override
int findKnownGerbersLoaded(std::vector< int > &aGerber2KicadMapping)
Find number of loaded Gerbers where the matching KiCad layer can be identified.
void OnGetSetup(wxCommandEvent &event) override
int findNumAltiumGerbersLoaded(std::vector< int > &aGerber2KicadMapping)
Find number of loaded Gerbers using Altium file extensions.
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
Definition layer_ids.h:517