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

#include <pcb_properties_panel.h>

Inheritance diagram for PCB_PROPERTIES_PANEL:
PROPERTIES_PANEL

Public Member Functions

 PCB_PROPERTIES_PANEL (wxWindow *aParent, PCB_BASE_EDIT_FRAME *aFrame)
 
virtual ~PCB_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
 

Public Attributes

int m_SuppressGridChangeEvents
 

Protected Member Functions

void rebuildProperties (const SELECTION &aSelection) override
 Generates the property grid for a given selection of items.
 
wxPGProperty * createPGProperty (const PROPERTY_BASE *aProperty) const override
 
PROPERTY_BASEgetPropertyFromEvent (const wxPropertyGridEvent &aEvent) const
 
void valueChanging (wxPropertyGridEvent &aEvent) override
 
void valueChanged (wxPropertyGridEvent &aEvent) override
 Regenerates caches storing layer and net names.
 
void updateLists (const BOARD *aBoard)
 
void onCharHook (wxKeyEvent &aEvent)
 
void onShow (wxShowEvent &aEvent)
 
virtual void OnLanguageChanged (wxCommandEvent &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, const wxString &aPropName, wxVariant &aValue, bool &aWritable, wxPGChoices &aChoices)
 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

PCB_BASE_EDIT_FRAMEm_frame
 
PROPERTY_MANAGERm_propMgr
 
PG_UNIT_EDITORm_unitEditorInstance
 
PG_CHECKBOX_EDITORm_checkboxEditorInstance
 
PG_RATIO_EDITORm_ratioEditorInstance
 
PG_NET_SELECTOR_EDITORm_netSelectorEditorInstance
 
PG_FPID_EDITORm_fpEditorInstance
 
PG_URL_EDITORm_urlEditorInstance
 
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)
 

Static Protected Attributes

static std::set< wxString > m_currentFieldNames
 

Detailed Description

Definition at line 40 of file pcb_properties_panel.h.

Constructor & Destructor Documentation

◆ PCB_PROPERTIES_PANEL()

◆ ~PCB_PROPERTIES_PANEL()

PCB_PROPERTIES_PANEL::~PCB_PROPERTIES_PANEL ( )
virtual

Member Function Documentation

◆ AfterCommit()

void PCB_PROPERTIES_PANEL::AfterCommit ( )
overridevirtual

Reimplemented from PROPERTIES_PANEL.

Definition at line 298 of file pcb_properties_panel.cpp.

References PCB_SELECTION_TOOL::GetSelection(), m_frame, and rebuildProperties().

Referenced by valueChanged().

◆ createPGProperty()

◆ extractValueAndWritability()

bool PROPERTIES_PANEL::extractValueAndWritability ( const SELECTION & aSelection,
const wxString & aPropName,
wxVariant & aValue,
bool & aWritable,
wxPGChoices & aChoices )
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 406 of file properties_panel.cpp.

References PROPERTY_BASE::GetChoices(), getItemValue(), PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), PROPERTY_MANAGER::IsWriteableFor(), and TYPE_HASH.

Referenced by 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 375 of file properties_panel.cpp.

References INSPECTABLE::Get(), KIGFX::VIEW_ITEM::GetClass(), PROPERTY_BASE::HasChoices(), and PROPERTY_BASE::Name().

Referenced by extractValueAndWritability().

◆ getPropertyFromEvent()

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

◆ GetPropertyGrid()

wxPropertyGrid * PROPERTIES_PANEL::GetPropertyGrid ( )
inlineinherited

Definition at line 50 of file properties_panel.h.

References m_grid.

◆ onCharHook()

void PROPERTIES_PANEL::onCharHook ( wxKeyEvent & aEvent)
protectedinherited

Definition at line 483 of file properties_panel.cpp.

References m_grid.

Referenced by PROPERTIES_PANEL().

◆ OnLanguageChanged()

void PROPERTIES_PANEL::OnLanguageChanged ( wxCommandEvent & aEvent)
protectedvirtualinherited

◆ onShow()

void PROPERTIES_PANEL::onShow ( wxShowEvent & aEvent)
protectedinherited

Definition at line 474 of file properties_panel.cpp.

References UpdateData().

Referenced by PROPERTIES_PANEL().

◆ Properties()

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

Definition at line 60 of file properties_panel.h.

References m_displayed.

◆ PropertiesCount()

int PROPERTIES_PANEL::PropertiesCount ( ) const
inlineinherited

Definition at line 55 of file properties_panel.h.

References m_displayed.

◆ rebuildProperties()

void PCB_PROPERTIES_PANEL::rebuildProperties ( const SELECTION & aSelection)
overrideprotectedvirtual

Generates the property grid for a given selection of items.

Parameters
aSelectionis a set of items to show properties for.

Reimplemented from PROPERTIES_PANEL.

Definition at line 307 of file pcb_properties_panel.cpp.

References _HKI, FOOTPRINT::GetFields(), m_currentFieldNames, m_propMgr, name, PCB_FOOTPRINT_T, PROPERTIES_PANEL::rebuildProperties(), and TYPE_HASH.

Referenced by AfterCommit(), and UpdateData().

◆ RecalculateSplitterPos()

void PROPERTIES_PANEL::RecalculateSplitterPos ( )
inherited

◆ SetSplitterProportion()

void PROPERTIES_PANEL::SetSplitterProportion ( float aProportion)
inherited

Definition at line 541 of file properties_panel.cpp.

References m_splitter_key_proportion, and RecalculateSplitterPos().

◆ SplitterProportion()

float PROPERTIES_PANEL::SplitterProportion ( ) const
inlineinherited

Definition at line 68 of file properties_panel.h.

References m_splitter_key_proportion.

◆ UpdateData()

void PCB_PROPERTIES_PANEL::UpdateData ( )
overridevirtual

◆ updateLists()

void PCB_PROPERTIES_PANEL::updateLists ( const BOARD * aBoard)
protected

◆ valueChanged()

◆ valueChanging()

void PCB_PROPERTIES_PANEL::valueChanging ( wxPropertyGridEvent & aEvent)
overrideprotectedvirtual

Member Data Documentation

◆ m_caption

wxStaticText* PROPERTIES_PANEL::m_caption
protectedinherited

Definition at line 114 of file properties_panel.h.

Referenced by PROPERTIES_PANEL(), and rebuildProperties().

◆ m_checkboxEditorInstance

PG_CHECKBOX_EDITOR* PCB_PROPERTIES_PANEL::m_checkboxEditorInstance
protected

Definition at line 67 of file pcb_properties_panel.h.

Referenced by PCB_PROPERTIES_PANEL().

◆ m_currentFieldNames

std::set< wxString > PCB_PROPERTIES_PANEL::m_currentFieldNames
staticprotected

Definition at line 73 of file pcb_properties_panel.h.

Referenced by rebuildProperties().

◆ m_displayed

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

◆ m_fpEditorInstance

PG_FPID_EDITOR* PCB_PROPERTIES_PANEL::m_fpEditorInstance
protected

Definition at line 70 of file pcb_properties_panel.h.

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

◆ m_frame

◆ m_grid

wxPropertyGrid* PROPERTIES_PANEL::m_grid
protectedinherited

◆ m_nets

wxPGChoices PCB_PROPERTIES_PANEL::m_nets
protected

Definition at line 74 of file pcb_properties_panel.h.

◆ m_netSelectorEditorInstance

PG_NET_SELECTOR_EDITOR* PCB_PROPERTIES_PANEL::m_netSelectorEditorInstance
protected

Definition at line 69 of file pcb_properties_panel.h.

Referenced by PCB_PROPERTIES_PANEL().

◆ m_propMgr

PROPERTY_MANAGER& PCB_PROPERTIES_PANEL::m_propMgr
protected

◆ m_ratioEditorInstance

PG_RATIO_EDITOR* PCB_PROPERTIES_PANEL::m_ratioEditorInstance
protected

Definition at line 68 of file pcb_properties_panel.h.

Referenced by PCB_PROPERTIES_PANEL().

◆ 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 117 of file properties_panel.h.

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

◆ m_SuppressGridChangeEvents

◆ m_unitEditorInstance

PG_UNIT_EDITOR* PCB_PROPERTIES_PANEL::m_unitEditorInstance
protected

Definition at line 66 of file pcb_properties_panel.h.

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

◆ m_urlEditorInstance

PG_URL_EDITOR* PCB_PROPERTIES_PANEL::m_urlEditorInstance
protected

Definition at line 71 of file pcb_properties_panel.h.

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


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