KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_properties_panel.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) 2020 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Maciej Suminski <[email protected]>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 3
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23#ifndef PCB_PROPERTIES_PANEL_H
24#define PCB_PROPERTIES_PANEL_H
25
27#include <set>
28
29class SELECTION;
30class BOARD;
33class PG_UNIT_EDITOR;
35class PG_RATIO_EDITOR;
38class PG_FPID_EDITOR;
39class PG_URL_EDITOR;
40
42{
43public:
44 PCB_PROPERTIES_PANEL( wxWindow* aParent, PCB_BASE_EDIT_FRAME* aFrame );
45
46 virtual ~PCB_PROPERTIES_PANEL();
47
48 void UpdateData() override;
49
50 void AfterCommit() override;
51
53
54protected:
55 void rebuildProperties( const SELECTION& aSelection ) override;
56 wxPGProperty* createPGProperty( const PROPERTY_BASE* aProperty ) const override;
57 bool getItemValue( EDA_ITEM* aItem, PROPERTY_BASE* aProperty, wxVariant& aValue ) override;
58
59 PROPERTY_BASE* getPropertyFromEvent( const wxPropertyGridEvent& aEvent ) const;
60
61 void valueChanging( wxPropertyGridEvent& aEvent ) override;
62 void valueChanged( wxPropertyGridEvent& aEvent ) override;
63
64 void applyConfirmedScale( const wxString& aPropName, const wxVariant& aValue );
65
67 void updateLists( const BOARD* aBoard );
68
77 const SELECTION& getSelection( SELECTION& aFallbackSelection );
78
86
87protected:
97
98 static std::set<wxString> m_currentFieldNames;
99 wxPGChoices m_nets;
100
102};
103
104#endif /* PCB_PROPERTIES_PANEL_H */
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:96
Common, abstract interface for edit frames.
PCB_BASE_EDIT_FRAME * m_frame
PG_NET_SELECTOR_EDITOR * m_netSelectorEditorInstance
void valueChanged(wxPropertyGridEvent &aEvent) override
PG_UNIT_EDITOR * m_unitEditorInstance
PG_RATIO_EDITOR * m_ratioEditorInstance
wxPGProperty * createPGProperty(const PROPERTY_BASE *aProperty) const override
void rebuildProperties(const SELECTION &aSelection) override
Generates the property grid for a given selection of items.
PCB_PROPERTIES_PANEL(wxWindow *aParent, PCB_BASE_EDIT_FRAME *aFrame)
const SELECTION & getSelection(SELECTION &aFallbackSelection)
Get the current selection from the selection tool.
EDA_ITEM * getFrontItem()
Get the front item of the current selection.
PCB_BASE_EDIT_FRAME * GetFrame() const
static std::set< wxString > m_currentFieldNames
PROPERTY_BASE * getPropertyFromEvent(const wxPropertyGridEvent &aEvent) const
PROPERTY_MANAGER & m_propMgr
PG_URL_EDITOR * m_urlEditorInstance
PG_CHECKBOX_EDITOR * m_checkboxEditorInstance
void applyConfirmedScale(const wxString &aPropName, const wxVariant &aValue)
Regenerates caches storing layer and net names.
void updateLists(const BOARD *aBoard)
void valueChanging(wxPropertyGridEvent &aEvent) override
bool getItemValue(EDA_ITEM *aItem, PROPERTY_BASE *aProperty, wxVariant &aValue) override
Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have prope...
PG_TRACK_WIDTH_EDITOR * m_trackWidthEditorInstance
PG_FPID_EDITOR * m_fpEditorInstance
PROPERTIES_PANEL(wxWindow *aParent, EDA_BASE_FRAME *aFrame)
Provide class metadata.Helper macro to map type hashes to names.