KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PROPERTIES_PANEL Class Referenceabstract

#include <properties_panel.h>

Inheritance diagram for PROPERTIES_PANEL:
PCB_PROPERTIES_PANEL SCH_PROPERTIES_PANEL

Public Member Functions

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

Protected Member Functions

virtual void rebuildProperties (const SELECTION &aSelection)
 Generates the property grid for a given selection of items.
 
virtual wxPGProperty * createPGProperty (const PROPERTY_BASE *aProperty) const =0
 
virtual void valueChanging (wxPropertyGridEvent &aEvent)
 
virtual void valueChanged (wxPropertyGridEvent &aEvent)
 
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, 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

std::vector< PROPERTY_BASE * > m_displayed
 
wxPropertyGrid * m_grid
 
EDA_BASE_FRAMEm_frame
 
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 39 of file properties_panel.h.

Constructor & Destructor Documentation

◆ PROPERTIES_PANEL()

◆ ~PROPERTIES_PANEL()

PROPERTIES_PANEL::~PROPERTIES_PANEL ( )
virtual

Definition at line 149 of file properties_panel.cpp.

References m_frame, and OnLanguageChanged().

Member Function Documentation

◆ AfterCommit()

virtual void PROPERTIES_PANEL::AfterCommit ( )
inlinevirtual

Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.

Definition at line 48 of file properties_panel.h.

◆ createPGProperty()

virtual wxPGProperty * PROPERTIES_PANEL::createPGProperty ( const PROPERTY_BASE aProperty) const
protectedpure virtual

Implemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.

Referenced by rebuildProperties().

◆ extractValueAndWritability()

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

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 getItemValue(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), PROPERTY_BASE::IsHiddenFromPropertiesManager(), PROPERTY_MANAGER::IsWriteableFor(), and TYPE_HASH.

Referenced by rebuildProperties().

◆ getItemValue()

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

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 extractValueAndWritability().

◆ GetPropertyGrid()

wxPropertyGrid * PROPERTIES_PANEL::GetPropertyGrid ( )
inline

Definition at line 50 of file properties_panel.h.

References m_grid.

◆ onCharHook()

void PROPERTIES_PANEL::onCharHook ( wxKeyEvent &  aEvent)
protected

Definition at line 432 of file properties_panel.cpp.

References m_grid.

Referenced by PROPERTIES_PANEL().

◆ OnLanguageChanged()

void PROPERTIES_PANEL::OnLanguageChanged ( wxCommandEvent &  aEvent)
protectedvirtual

◆ onShow()

void PROPERTIES_PANEL::onShow ( wxShowEvent &  aEvent)
protected

Definition at line 423 of file properties_panel.cpp.

References UpdateData().

Referenced by PROPERTIES_PANEL().

◆ Properties()

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

Definition at line 60 of file properties_panel.h.

References m_displayed.

◆ PropertiesCount()

int PROPERTIES_PANEL::PropertiesCount ( ) const
inline

Definition at line 55 of file properties_panel.h.

References m_displayed.

◆ rebuildProperties()

◆ RecalculateSplitterPos()

void PROPERTIES_PANEL::RecalculateSplitterPos ( )

◆ SetSplitterProportion()

void PROPERTIES_PANEL::SetSplitterProportion ( float  aProportion)

Definition at line 474 of file properties_panel.cpp.

References m_splitter_key_proportion, and RecalculateSplitterPos().

◆ SplitterProportion()

float PROPERTIES_PANEL::SplitterProportion ( ) const
inline

◆ UpdateData()

virtual void PROPERTIES_PANEL::UpdateData ( )
pure virtual

◆ valueChanged()

virtual void PROPERTIES_PANEL::valueChanged ( wxPropertyGridEvent &  aEvent)
inlineprotectedvirtual

Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.

Definition at line 82 of file properties_panel.h.

Referenced by PROPERTIES_PANEL().

◆ valueChanging()

virtual void PROPERTIES_PANEL::valueChanging ( wxPropertyGridEvent &  aEvent)
inlineprotectedvirtual

Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.

Definition at line 81 of file properties_panel.h.

Referenced by PROPERTIES_PANEL().

Member Data Documentation

◆ m_caption

wxStaticText* PROPERTIES_PANEL::m_caption
protected

Definition at line 111 of file properties_panel.h.

Referenced by PROPERTIES_PANEL(), and rebuildProperties().

◆ m_displayed

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

◆ m_frame

EDA_BASE_FRAME* PROPERTIES_PANEL::m_frame
protected

Definition at line 110 of file properties_panel.h.

Referenced by PROPERTIES_PANEL(), rebuildProperties(), and ~PROPERTIES_PANEL().

◆ m_grid

wxPropertyGrid* PROPERTIES_PANEL::m_grid
protected

◆ m_splitter_key_proportion

float PROPERTIES_PANEL::m_splitter_key_proportion
protected

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(), RecalculateSplitterPos(), SetSplitterProportion(), and SplitterProportion().


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