25#ifndef SHEET_SYNCHRONIZATION_MODEL_H
26#define SHEET_SYNCHRONIZATION_MODEL_H
32#include <wx/dataview.h>
66 case NAME:
return _(
"Name" );
67 case SHAPE:
return _(
"Shape" );
77 void GetValueByRow( wxVariant& variant,
unsigned row,
unsigned col )
const override;
79 bool SetValueByRow(
const wxVariant& variant,
unsigned row,
unsigned col )
override;
81 bool GetAttrByRow(
unsigned row,
unsigned int col, wxDataViewItemAttr& attr )
const override;
83 void RemoveItems( wxDataViewItemArray
const& aItems );
88 bool AppendNewItem( std::shared_ptr<SHEET_SYNCHRONIZATION_ITEM> aItem );
93 bool AppendItem( std::shared_ptr<SHEET_SYNCHRONIZATION_ITEM> aItem );
105 void AddNotifier( std::shared_ptr<SHEET_SYNCHRONIZATION_NOTIFIER> aNotifier );
116 std::list<std::shared_ptr<SHEET_SYNCHRONIZATION_NOTIFIER>>
m_notifiers;
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Agent for all the modifications while syncing the sheet pin and hierarchical label.
~SHEET_SYNCHRONIZATION_MODEL() override
std::list< std::shared_ptr< SHEET_SYNCHRONIZATION_NOTIFIER > > m_notifiers
std::optional< unsigned > m_selectedIndex
bool GetAttrByRow(unsigned row, unsigned int col, wxDataViewItemAttr &attr) const override
bool SetValueByRow(const wxVariant &variant, unsigned row, unsigned col) override
SHEET_SYNCHRONIZATION_ITE_PTR TakeItem(wxDataViewItem const &aItem)
SHEET_SYNCHRONIZATION_ITEM_LIST TakeItems(wxDataViewItemArray const &aItems)
SHEET_SYNCHRONIZATION_ITE_PTR GetSynchronizationItem(unsigned aIndex) const
void AddNotifier(std::shared_ptr< SHEET_SYNCHRONIZATION_NOTIFIER > aNotifier)
void GetValueByRow(wxVariant &variant, unsigned row, unsigned col) const override
SHEET_SYNCHRONIZATION_COL
bool AppendItem(std::shared_ptr< SHEET_SYNCHRONIZATION_ITEM > aItem)
Just append item to the list, the notifiers are not notified.
void UpdateItems(SHEET_SYNCHRONIZATION_ITEM_LIST aItems)
SHEET_SYNCHRONIZATION_AGENT & m_agent
SHEET_SYNCHRONIZATION_ITEM_LIST m_items
void RemoveItems(wxDataViewItemArray const &aItems)
static wxString GetColName(int col)
std::optional< unsigned int > GetSelectedIndex() const
bool HasSelectedIndex() const
bool AppendNewItem(std::shared_ptr< SHEET_SYNCHRONIZATION_ITEM > aItem)
Add a new item, the notifiers are notified.
void OnRowSelected(std::optional< unsigned > aRow)
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
std::vector< SHEET_SYNCHRONIZATION_ITE_PTR > SHEET_SYNCHRONIZATION_ITEM_LIST
std::shared_ptr< SHEET_SYNCHRONIZATION_ITEM > SHEET_SYNCHRONIZATION_ITE_PTR