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 |
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_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) | |
Definition at line 39 of file properties_panel.h.
PROPERTIES_PANEL::PROPERTIES_PANEL | ( | wxWindow * | aParent, |
EDA_BASE_FRAME * | aFrame | ||
) |
Definition at line 43 of file properties_panel.cpp.
References _, KIUI::GetDockedPaneFont(), m_caption, m_frame, m_grid, PGM_BASE::m_PropertyGridInitialized, m_splitter_key_proportion, onCharHook(), OnLanguageChanged(), onShow(), Pgm(), RecalculateSplitterPos(), valueChanged(), valueChanging(), and wxPGGlobalVars.
|
virtual |
Definition at line 149 of file properties_panel.cpp.
References m_frame, and OnLanguageChanged().
|
inlinevirtual |
Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.
Definition at line 48 of file properties_panel.h.
|
protectedpure virtual |
Implemented in SCH_PROPERTIES_PANEL, and 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 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().
|
protected |
Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have property aProperty.
Definition at line 350 of file properties_panel.cpp.
References INSPECTABLE::Get(), and PROPERTY_BASE::HasChoices().
Referenced by extractValueAndWritability().
|
inline |
Definition at line 50 of file properties_panel.h.
References m_grid.
|
protected |
Definition at line 432 of file properties_panel.cpp.
References m_grid.
Referenced by PROPERTIES_PANEL().
|
protectedvirtual |
Reimplemented in SCH_PROPERTIES_PANEL.
Definition at line 155 of file properties_panel.cpp.
References m_displayed, m_grid, and UpdateData().
Referenced by SCH_PROPERTIES_PANEL::OnLanguageChanged(), PROPERTIES_PANEL(), and ~PROPERTIES_PANEL().
|
protected |
Definition at line 423 of file properties_panel.cpp.
References UpdateData().
Referenced by PROPERTIES_PANEL().
|
inline |
Definition at line 60 of file properties_panel.h.
References m_displayed.
|
inline |
Definition at line 55 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 169 of file properties_panel.cpp.
References _, copy, createPGProperty(), SELECTION::Empty(), extractValueAndWritability(), FRAME_FOOTPRINT_EDITOR, FRAME_PCB_EDITOR, FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR, SELECTION::Front(), PROPERTY_MANAGER::GetDisplayOrder(), EDA_ITEM::GetFriendlyName(), PROPERTY_MANAGER::GetGroupDisplayOrder(), PROPERTY_MANAGER::GetProperties(), PROPERTY_MANAGER::GetProperty(), group, PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsAvailableFor(), EDA_BASE_FRAME::IsType(), m_caption, m_displayed, m_frame, m_grid, RecalculateSplitterPos(), SELECTION::Size(), and TYPE_HASH.
Referenced by SCH_PROPERTIES_PANEL::AfterCommit(), PCB_PROPERTIES_PANEL::AfterCommit(), SCH_PROPERTIES_PANEL::UpdateData(), and PCB_PROPERTIES_PANEL::UpdateData().
void PROPERTIES_PANEL::RecalculateSplitterPos | ( | ) |
Definition at line 465 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 474 of file properties_panel.cpp.
References m_splitter_key_proportion, and RecalculateSplitterPos().
|
inline |
Definition at line 68 of file properties_panel.h.
References m_splitter_key_proportion.
Referenced by SCH_EDIT_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::SaveSettings(), FOOTPRINT_EDIT_FRAME::SaveSettings(), and PCB_EDIT_FRAME::SaveSettings().
|
pure virtual |
Implemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.
Referenced by OnLanguageChanged(), onShow(), and EDA_DRAW_FRAME::UpdateProperties().
|
inlineprotectedvirtual |
Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.
Definition at line 82 of file properties_panel.h.
Referenced by PROPERTIES_PANEL().
|
inlineprotectedvirtual |
Reimplemented in SCH_PROPERTIES_PANEL, and PCB_PROPERTIES_PANEL.
Definition at line 81 of file properties_panel.h.
Referenced by PROPERTIES_PANEL().
|
protected |
Definition at line 111 of file properties_panel.h.
Referenced by PROPERTIES_PANEL(), and rebuildProperties().
|
protected |
Definition at line 108 of file properties_panel.h.
Referenced by OnLanguageChanged(), Properties(), PropertiesCount(), and rebuildProperties().
|
protected |
Definition at line 110 of file properties_panel.h.
Referenced by PROPERTIES_PANEL(), rebuildProperties(), and ~PROPERTIES_PANEL().
|
protected |
Definition at line 109 of file properties_panel.h.
Referenced by GetPropertyGrid(), onCharHook(), OnLanguageChanged(), 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 114 of file properties_panel.h.
Referenced by PROPERTIES_PANEL(), RecalculateSplitterPos(), SetSplitterProportion(), and SplitterProportion().