KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
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 3
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 along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
25#include <set>
26
27class SELECTION;
28class SCHEMATIC;
29class SCH_BASE_FRAME;
30class SCH_COMMIT;
31class SCH_EDIT_FRAME;
32class SCH_SHEET;
34class PG_UNIT_EDITOR;
36class PG_COLOR_EDITOR;
37class PG_FPID_EDITOR;
38class PG_URL_EDITOR;
39
41{
42public:
43 SCH_PROPERTIES_PANEL( wxWindow* aParent, SCH_BASE_FRAME* aFrame );
44
45 virtual ~SCH_PROPERTIES_PANEL();
46
47 void UpdateData() override;
48
49 void AfterCommit() override;
50
51protected:
52 void rebuildProperties( const SELECTION& aSelection ) override;
53 wxPGProperty* createPGProperty( const PROPERTY_BASE* aProperty ) const override;
54 bool getItemValue( EDA_ITEM* aItem, PROPERTY_BASE* aProperty, wxVariant& aValue ) override;
55
56 PROPERTY_BASE* getPropertyFromEvent( const wxPropertyGridEvent& aEvent ) const;
57
58 void valueChanging( wxPropertyGridEvent& aEvent ) override;
59 void valueChanged( wxPropertyGridEvent& aEvent ) override;
60
62 SCH_COMMIT& aChanges, const wxString& aNewFilename );
63
64 void OnLanguageChanged( wxCommandEvent& aEvent ) override;
65
73 const SELECTION& getSelection( SELECTION& aFallbackSelection );
74
82
83protected:
91
92 static std::set<wxString> m_currentFieldNames;
93 wxPGChoices m_nets;
94};
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:99
PROPERTIES_PANEL(wxWindow *aParent, EDA_BASE_FRAME *aFrame)
Provide class metadata.Helper macro to map type hashes to names.
Holds all the data relating to one schematic.
Definition schematic.h:88
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Schematic editor (Eeschema) main window.
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...
wxPGProperty * createPGProperty(const PROPERTY_BASE *aProperty) const override
PROPERTY_MANAGER & m_propMgr
PG_CHECKBOX_EDITOR * m_checkboxEditorInstance
PG_FPID_EDITOR * m_fpEditorInstance
const SELECTION & getSelection(SELECTION &aFallbackSelection)
Get the current selection from the selection tool.
void valueChanging(wxPropertyGridEvent &aEvent) override
PG_UNIT_EDITOR * m_unitEditorInstance
static std::set< wxString > m_currentFieldNames
void valueChanged(wxPropertyGridEvent &aEvent) override
SCH_PROPERTIES_PANEL(wxWindow *aParent, SCH_BASE_FRAME *aFrame)
PG_COLOR_EDITOR * m_colorEditorInstance
EDA_ITEM * getFrontItem()
Get the front item of the current selection.
PROPERTY_BASE * getPropertyFromEvent(const wxPropertyGridEvent &aEvent) const
void OnLanguageChanged(wxCommandEvent &aEvent) override
bool handleSheetFilenameChange(SCH_EDIT_FRAME *aFrame, SCH_SHEET *aSheet, SCH_COMMIT &aChanges, const wxString &aNewFilename)
void rebuildProperties(const SELECTION &aSelection) override
Generates the property grid for a given selection of items.
PG_URL_EDITOR * m_urlEditorInstance
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48