KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_PROPERTIES_PANEL Class Reference

#include <sch_properties_panel.h>

Inheritance diagram for SCH_PROPERTIES_PANEL:
PROPERTIES_PANEL

Public Member Functions

 SCH_PROPERTIES_PANEL (wxWindow *aParent, SCH_BASE_FRAME *aFrame)
 
virtual ~SCH_PROPERTIES_PANEL ()
 
void UpdateData () override
 
void AfterCommit () override
 
wxPropertyGrid * GetPropertyGrid ()
 
int PropertiesCount () const
 
const std::vector< PROPERTY_BASE * > & Properties () const
 
void RecalculateSplitterPos ()
 
void SetSplitterProportion (float aProportion)
 
float SplitterProportion () const
 

Protected Member Functions

wxPGProperty * createPGProperty (const PROPERTY_BASE *aProperty) const override
 
PROPERTY_BASEgetPropertyFromEvent (const wxPropertyGridEvent &aEvent) const
 
void valueChanging (wxPropertyGridEvent &aEvent) override
 
void valueChanged (wxPropertyGridEvent &aEvent) override
 
void OnLanguageChanged (wxCommandEvent &aEvent) override
 Regenerates caches of font list property.
 
void updateFontList ()
 
virtual void rebuildProperties (const SELECTION &aSelection)
 Generates the property grid for a given selection of items.
 
void onCharHook (wxKeyEvent &aEvent)
 
void onShow (wxShowEvent &aEvent)
 
bool getItemValue (EDA_ITEM *aItem, PROPERTY_BASE *aProperty, wxVariant &aValue)
 Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have property aProperty.
 
bool extractValueAndWritability (const SELECTION &aSelection, PROPERTY_BASE *aProperty, wxVariant &aValue, bool &aWritable)
 Processes a selection and determines whether the given property should be available or not and what the common value should be for the items in the selection.
 

Protected Attributes

SCH_BASE_FRAMEm_frame
 
PROPERTY_MANAGERm_propMgr
 
PG_UNIT_EDITORm_unitEditorInstance
 
PG_CHECKBOX_EDITORm_checkboxEditorInstance
 
PG_COLOR_EDITORm_colorEditorInstance
 
wxPGChoices m_nets
 
std::vector< PROPERTY_BASE * > m_displayed
 
wxPropertyGrid * m_grid
 
wxStaticText * m_caption
 
float m_splitter_key_proportion
 Proportion of the grid column splitter that is used for the key column (0.0 - 1.0)
 

Detailed Description

Definition at line 35 of file sch_properties_panel.h.

Constructor & Destructor Documentation

◆ SCH_PROPERTIES_PANEL()

◆ ~SCH_PROPERTIES_PANEL()

SCH_PROPERTIES_PANEL::~SCH_PROPERTIES_PANEL ( )
virtual

Definition at line 98 of file sch_properties_panel.cpp.

References m_unitEditorInstance, and PG_UNIT_EDITOR::UpdateFrame().

Member Function Documentation

◆ AfterCommit()

void SCH_PROPERTIES_PANEL::AfterCommit ( )
overridevirtual

◆ createPGProperty()

wxPGProperty * SCH_PROPERTIES_PANEL::createPGProperty ( const PROPERTY_BASE aProperty) const
overrideprotectedvirtual

◆ extractValueAndWritability()

bool PROPERTIES_PANEL::extractValueAndWritability ( const SELECTION aSelection,
PROPERTY_BASE aProperty,
wxVariant &  aValue,
bool &  aWritable 
)
protectedinherited

Processes a selection and determines whether the given property should be available or not and what the common value should be for the items in the selection.

Parameters
aSelectionis a set of EDA_ITEMs to process
aPropertyis the property to look up
aValuewill be filled with the value common to the selection, or null if different
aWritablewill be set to whether or not the property can be written for the selection
Returns
true if the property is available for all the items in the selection

Definition at line 375 of file properties_panel.cpp.

References PROPERTIES_PANEL::getItemValue(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), PROPERTY_BASE::IsHiddenFromPropertiesManager(), PROPERTY_MANAGER::IsWriteableFor(), and TYPE_HASH.

Referenced by PROPERTIES_PANEL::rebuildProperties().

◆ getItemValue()

bool PROPERTIES_PANEL::getItemValue ( EDA_ITEM aItem,
PROPERTY_BASE aProperty,
wxVariant &  aValue 
)
protectedinherited

Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have property aProperty.

Returns
true if conversion succeeded

Definition at line 350 of file properties_panel.cpp.

References INSPECTABLE::Get(), and PROPERTY_BASE::HasChoices().

Referenced by PROPERTIES_PANEL::extractValueAndWritability().

◆ getPropertyFromEvent()

PROPERTY_BASE * SCH_PROPERTIES_PANEL::getPropertyFromEvent ( const wxPropertyGridEvent &  aEvent) const
protected

◆ GetPropertyGrid()

wxPropertyGrid * PROPERTIES_PANEL::GetPropertyGrid ( )
inlineinherited

Definition at line 50 of file properties_panel.h.

References PROPERTIES_PANEL::m_grid.

◆ onCharHook()

void PROPERTIES_PANEL::onCharHook ( wxKeyEvent &  aEvent)
protectedinherited

Definition at line 432 of file properties_panel.cpp.

References PROPERTIES_PANEL::m_grid.

Referenced by PROPERTIES_PANEL::PROPERTIES_PANEL().

◆ OnLanguageChanged()

void SCH_PROPERTIES_PANEL::OnLanguageChanged ( wxCommandEvent &  aEvent)
overrideprotectedvirtual

Regenerates caches of font list property.

Reimplemented from PROPERTIES_PANEL.

Definition at line 214 of file sch_properties_panel.cpp.

References PROPERTIES_PANEL::OnLanguageChanged(), and updateFontList().

◆ onShow()

void PROPERTIES_PANEL::onShow ( wxShowEvent &  aEvent)
protectedinherited

Definition at line 423 of file properties_panel.cpp.

References PROPERTIES_PANEL::UpdateData().

Referenced by PROPERTIES_PANEL::PROPERTIES_PANEL().

◆ Properties()

const std::vector< PROPERTY_BASE * > & PROPERTIES_PANEL::Properties ( ) const
inlineinherited

Definition at line 60 of file properties_panel.h.

References PROPERTIES_PANEL::m_displayed.

◆ PropertiesCount()

int PROPERTIES_PANEL::PropertiesCount ( ) const
inlineinherited

Definition at line 55 of file properties_panel.h.

References PROPERTIES_PANEL::m_displayed.

◆ rebuildProperties()

◆ RecalculateSplitterPos()

◆ SetSplitterProportion()

void PROPERTIES_PANEL::SetSplitterProportion ( float  aProportion)
inherited

◆ SplitterProportion()

float PROPERTIES_PANEL::SplitterProportion ( ) const
inlineinherited

◆ UpdateData()

void SCH_PROPERTIES_PANEL::UpdateData ( )
overridevirtual

◆ updateFontList()

◆ valueChanged()

void SCH_PROPERTIES_PANEL::valueChanged ( wxPropertyGridEvent &  aEvent)
overrideprotectedvirtual

◆ valueChanging()

void SCH_PROPERTIES_PANEL::valueChanging ( wxPropertyGridEvent &  aEvent)
overrideprotectedvirtual

Member Data Documentation

◆ m_caption

wxStaticText* PROPERTIES_PANEL::m_caption
protectedinherited

◆ m_checkboxEditorInstance

PG_CHECKBOX_EDITOR* SCH_PROPERTIES_PANEL::m_checkboxEditorInstance
protected

Definition at line 62 of file sch_properties_panel.h.

Referenced by SCH_PROPERTIES_PANEL().

◆ m_colorEditorInstance

PG_COLOR_EDITOR* SCH_PROPERTIES_PANEL::m_colorEditorInstance
protected

Definition at line 63 of file sch_properties_panel.h.

Referenced by SCH_PROPERTIES_PANEL().

◆ m_displayed

std::vector<PROPERTY_BASE*> PROPERTIES_PANEL::m_displayed
protectedinherited

◆ m_frame

◆ m_grid

◆ m_nets

wxPGChoices SCH_PROPERTIES_PANEL::m_nets
protected

Definition at line 65 of file sch_properties_panel.h.

◆ m_propMgr

PROPERTY_MANAGER& SCH_PROPERTIES_PANEL::m_propMgr
protected

◆ m_splitter_key_proportion

float PROPERTIES_PANEL::m_splitter_key_proportion
protectedinherited

Proportion of the grid column splitter that is used for the key column (0.0 - 1.0)

Definition at line 114 of file properties_panel.h.

Referenced by PROPERTIES_PANEL::PROPERTIES_PANEL(), PROPERTIES_PANEL::RecalculateSplitterPos(), PROPERTIES_PANEL::SetSplitterProportion(), and PROPERTIES_PANEL::SplitterProportion().

◆ m_unitEditorInstance

PG_UNIT_EDITOR* SCH_PROPERTIES_PANEL::m_unitEditorInstance
protected

Definition at line 61 of file sch_properties_panel.h.

Referenced by SCH_PROPERTIES_PANEL(), and ~SCH_PROPERTIES_PANEL().


The documentation for this class was generated from the following files: