KiCad PCB EDA Suite
|
#include <properties_panel.h>
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 |
void | OnLanguageChanged () |
Protected Member Functions | |
virtual void | rebuildProperties (const SELECTION &aSelection) |
Generates the property grid for a given selection of items. More... | |
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) |
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. More... | |
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. More... | |
Protected Attributes | |
std::vector< PROPERTY_BASE * > | m_displayed |
wxPropertyGrid * | m_grid |
EDA_BASE_FRAME * | m_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) More... | |
Definition at line 39 of file properties_panel.h.
PROPERTIES_PANEL::PROPERTIES_PANEL | ( | wxWindow * | aParent, |
EDA_BASE_FRAME * | aFrame | ||
) |
Definition at line 42 of file properties_panel.cpp.
References _, KIUI::GetDockedPaneFont(), m_caption, m_grid, m_splitter_key_proportion, onCharHook(), onShow(), RecalculateSplitterPos(), valueChanged(), valueChanging(), and wxPGGlobalVars.
|
inlinevirtual |
Definition at line 44 of file properties_panel.h.
|
inlinevirtual |
Reimplemented in PCB_PROPERTIES_PANEL.
Definition at line 50 of file properties_panel.h.
|
protectedpure virtual |
Implemented in PCB_PROPERTIES_PANEL.
Referenced by rebuildProperties().
|
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.
aSelection | is a set of EDA_ITEMs to process |
aProperty | is the property to look up |
aValue | will be filled with the value common to the selection, or null if different |
aWritable | will be set to whether or not the property can be written for the selection |
Definition at line 344 of file properties_panel.cpp.
References getItemValue(), EDA_BASE_FRAME::GetOriginTransforms(), UNITS_PROVIDER::GetUserUnits(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), m_frame, PROPERTY_MANAGER::SetTransforms(), PROPERTY_MANAGER::SetUnits(), TYPE_HASH, and PROPERTY_BASE::Writeable().
Referenced by rebuildProperties().
|
protected |
Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have property aProperty.
Definition at line 319 of file properties_panel.cpp.
References INSPECTABLE::Get(), and PROPERTY_BASE::HasChoices().
Referenced by extractValueAndWritability().
|
inline |
Definition at line 52 of file properties_panel.h.
References m_grid.
|
protected |
Definition at line 399 of file properties_panel.cpp.
References m_grid.
Referenced by PROPERTIES_PANEL().
void PROPERTIES_PANEL::OnLanguageChanged | ( | ) |
Definition at line 137 of file properties_panel.cpp.
References UpdateData().
Referenced by PCB_EDIT_FRAME::ShowChangedLanguage().
|
protected |
Definition at line 392 of file properties_panel.cpp.
References UpdateData().
Referenced by PROPERTIES_PANEL().
|
inline |
Definition at line 62 of file properties_panel.h.
References m_displayed.
|
inline |
Definition at line 57 of file properties_panel.h.
References m_displayed.
|
protectedvirtual |
Generates the property grid for a given selection of items.
aSelection | is a set of items to show properties for. |
Definition at line 143 of file properties_panel.cpp.
References _, copy, createPGProperty(), SELECTION::Empty(), extractValueAndWritability(), FRAME_FOOTPRINT_EDITOR, SELECTION::Front(), PROPERTY_MANAGER::GetDisplayOrder(), EDA_ITEM::GetFriendlyName(), PROPERTY_MANAGER::GetGroupDisplayOrder(), EDA_BASE_FRAME::GetOriginTransforms(), PROPERTY_MANAGER::GetProperties(), PROPERTY_MANAGER::GetProperty(), UNITS_PROVIDER::GetUserUnits(), group, PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), EDA_BASE_FRAME::IsType(), m_caption, m_displayed, m_frame, m_grid, RecalculateSplitterPos(), PROPERTY_MANAGER::SetTransforms(), PROPERTY_MANAGER::SetUnits(), SELECTION::Size(), and TYPE_HASH.
Referenced by PCB_PROPERTIES_PANEL::AfterCommit(), and PCB_PROPERTIES_PANEL::UpdateData().
void PROPERTIES_PANEL::RecalculateSplitterPos | ( | ) |
Definition at line 429 of file properties_panel.cpp.
References m_grid, and m_splitter_key_proportion.
Referenced by PROPERTIES_PANEL(), rebuildProperties(), and SetSplitterProportion().
void PROPERTIES_PANEL::SetSplitterProportion | ( | float | aProportion | ) |
Definition at line 438 of file properties_panel.cpp.
References m_splitter_key_proportion, and RecalculateSplitterPos().
|
inline |
Definition at line 70 of file properties_panel.h.
References m_splitter_key_proportion.
Referenced by FOOTPRINT_EDIT_FRAME::SaveSettings(), and PCB_EDIT_FRAME::SaveSettings().
|
pure virtual |
Implemented in PCB_PROPERTIES_PANEL.
Referenced by OnLanguageChanged(), onShow(), and PCB_BASE_EDIT_FRAME::UpdateProperties().
|
inlineprotectedvirtual |
Reimplemented in PCB_PROPERTIES_PANEL.
Definition at line 86 of file properties_panel.h.
Referenced by PROPERTIES_PANEL().
|
inlineprotectedvirtual |
Reimplemented in PCB_PROPERTIES_PANEL.
Definition at line 85 of file properties_panel.h.
Referenced by PROPERTIES_PANEL().
|
protected |
Definition at line 113 of file properties_panel.h.
Referenced by PROPERTIES_PANEL(), and rebuildProperties().
|
protected |
Definition at line 110 of file properties_panel.h.
Referenced by Properties(), PropertiesCount(), and rebuildProperties().
|
protected |
Definition at line 112 of file properties_panel.h.
Referenced by extractValueAndWritability(), and rebuildProperties().
|
protected |
Definition at line 111 of file properties_panel.h.
Referenced by GetPropertyGrid(), onCharHook(), PROPERTIES_PANEL(), rebuildProperties(), and RecalculateSplitterPos().
|
protected |
Proportion of the grid column splitter that is used for the key column (0.0 - 1.0)
Definition at line 116 of file properties_panel.h.
Referenced by PROPERTIES_PANEL(), RecalculateSplitterPos(), SetSplitterProportion(), and SplitterProportion().