KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_track_via_properties.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) 2015 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Maciej Suminski <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
23#include <widgets/unit_binder.h>
24#include <optional>
25#include <layer_ids.h>
27
28class PCB_SELECTION;
30class PAD;
31class PADSTACK;
32
34{
35public:
37
39
40 bool TransferDataFromWindow() override;
41
42private:
43 void onNetSelector( wxCommandEvent& aEvent );
44 void onViaNotFreeClicked( wxCommandEvent& aEvent ) override;
45 void onWidthSelect( wxCommandEvent& aEvent ) override;
46 void onWidthEdit( wxCommandEvent& aEvent ) override;
47 void onViaSelect( wxCommandEvent& aEvent ) override;
48 void onViaEdit( wxCommandEvent& aEvent ) override;
49 void onTrackEdit( wxCommandEvent& aEvent ) override;
50 void onPadstackModeChanged( wxCommandEvent& aEvent ) override;
51 void onEditLayerChanged( wxCommandEvent& aEvent ) override;
52 void onBackdrillChange( wxCommandEvent& aEvent ) override;
53 void onTopPostMachineChange( wxCommandEvent& aEvent ) override;
54 void onBottomPostMachineChange( wxCommandEvent& aEvent ) override;
55
56 void onUnitsChanged( wxCommandEvent& aEvent );
57 void onTeardropsUpdateUi( wxUpdateUIEvent& event ) override;
58
59 bool confirmShortingNets( int aNet, const std::set<int>& shortingNets );
60 bool confirmPadChange( const std::set<PAD*>& connectedPads );
61
62 int getLayerDepth();
64
66 bool TransferDataToWindow() override;
67
68private:
70 const PCB_SELECTION& m_items; // List of items to be modified.
71
76
79
86
92
93 bool m_tracks; // True if dialog displays any track properties.
94 bool m_vias; // True if dialog displays any via properties.
95
97 std::unique_ptr<PADSTACK> m_viaStack;
98
101 std::map<int, PCB_LAYER_ID> m_editLayerCtrlMap;
103};
DIALOG_TRACK_VIA_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Track & Via Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU)
void onWidthEdit(wxCommandEvent &aEvent) override
void onUnitsChanged(wxCommandEvent &aEvent)
void onNetSelector(wxCommandEvent &aEvent)
void afterPadstackModeChanged()
Get data from the PCB board and display it to dialog.
void onWidthSelect(wxCommandEvent &aEvent) override
bool confirmShortingNets(int aNet, const std::set< int > &shortingNets)
void onTeardropsUpdateUi(wxUpdateUIEvent &event) override
void onPadstackModeChanged(wxCommandEvent &aEvent) override
void onBackdrillChange(wxCommandEvent &aEvent) override
void onViaEdit(wxCommandEvent &aEvent) override
std::map< int, PCB_LAYER_ID > m_editLayerCtrlMap
PCB_LAYER_ID m_editLayer
The currently-shown copper layer of the edited via(s)
void onViaSelect(wxCommandEvent &aEvent) override
void onBottomPostMachineChange(wxCommandEvent &aEvent) override
void onEditLayerChanged(wxCommandEvent &aEvent) override
void onTopPostMachineChange(wxCommandEvent &aEvent) override
void onViaNotFreeClicked(wxCommandEvent &aEvent) override
DIALOG_TRACK_VIA_PROPERTIES(PCB_BASE_EDIT_FRAME *aParent, const PCB_SELECTION &aItems)
std::unique_ptr< PADSTACK > m_viaStack
Temporary padstack of the edited via(s)
bool confirmPadChange(const std::set< PAD * > &connectedPads)
void onTrackEdit(wxCommandEvent &aEvent) override
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition padstack.h:157
Definition pad.h:61
Common, abstract interface for edit frames.
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56