KiCad PCB EDA Suite
|
Agent for all the modifications while syncing the sheet pin and hierarchical label. More...
#include <sheet_synchronization_agent.h>
Public Types | |
enum | SHEET_SYNCHRONIZATION_PLACEMENT { PLACE_SHEET_PIN , PLACE_HIERLABEL } |
using | DO_DELETE_ITEM = std::function< void(EDA_ITEM *, SCH_SHEET_PATH)> |
using | MODIFICATION = std::function< void()> |
using | DO_MODIFY_ITEM = std::function< void(EDA_ITEM *, SCH_SHEET_PATH, MODIFICATION const &)> |
using | DO_PLACE_ITEM = std::function< void(SCH_SHEET *, SCH_SHEET_PATH, SHEET_SYNCHRONIZATION_PLACEMENT, EDA_ITEM *)> |
Public Member Functions | |
SHEET_SYNCHRONIZATION_AGENT (DO_MODIFY_ITEM aDoModify, DO_DELETE_ITEM aDoDelete, DO_PLACE_ITEM aPlaceItem, TOOL_MANAGER *aToolManager, SCH_EDIT_FRAME *a_frame) | |
~SHEET_SYNCHRONIZATION_AGENT () | |
void | ModifyItem (SHEET_SYNCHRONIZATION_ITEM &aItem, std::function< void()> const &aDoModify, const SCH_SHEET_PATH &aPath) |
void | ModifyItem (SCH_ITEM *aItem, std::function< void()> const &aDoModify, const SCH_SHEET_PATH &aPath, SHEET_SYNCHRONIZATION_ITEM_KIND aKind) |
void | RemoveItem (SHEET_SYNCHRONIZATION_ITEM &aItem, SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath) |
void | PlaceSheetPin (SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath, SCH_HIERLABEL *aLabel) |
void | PlaceHieraLable (SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath, SCH_SHEET_PIN *aPin) |
Private Attributes | |
DO_MODIFY_ITEM | m_doModify |
DO_DELETE_ITEM | m_doDelete |
DO_PLACE_ITEM | m_doPlaceItem |
TOOL_MANAGER * | m_toolManager |
SCH_EDIT_FRAME * | m_frame |
Agent for all the modifications while syncing the sheet pin and hierarchical label.
Definition at line 46 of file sheet_synchronization_agent.h.
using SHEET_SYNCHRONIZATION_AGENT::DO_DELETE_ITEM = std::function<void( EDA_ITEM*, SCH_SHEET_PATH )> |
Definition at line 55 of file sheet_synchronization_agent.h.
using SHEET_SYNCHRONIZATION_AGENT::DO_MODIFY_ITEM = std::function<void( EDA_ITEM*, SCH_SHEET_PATH, MODIFICATION const& )> |
Definition at line 59 of file sheet_synchronization_agent.h.
using SHEET_SYNCHRONIZATION_AGENT::DO_PLACE_ITEM = std::function<void( SCH_SHEET*, SCH_SHEET_PATH, SHEET_SYNCHRONIZATION_PLACEMENT, EDA_ITEM* )> |
Definition at line 61 of file sheet_synchronization_agent.h.
using SHEET_SYNCHRONIZATION_AGENT::MODIFICATION = std::function<void()> |
Definition at line 57 of file sheet_synchronization_agent.h.
Enumerator | |
---|---|
PLACE_SHEET_PIN | |
PLACE_HIERLABEL |
Definition at line 49 of file sheet_synchronization_agent.h.
SHEET_SYNCHRONIZATION_AGENT::SHEET_SYNCHRONIZATION_AGENT | ( | DO_MODIFY_ITEM | aDoModify, |
DO_DELETE_ITEM | aDoDelete, | ||
DO_PLACE_ITEM | aPlaceItem, | ||
TOOL_MANAGER * | aToolManager, | ||
SCH_EDIT_FRAME * | a_frame | ||
) |
Definition at line 33 of file sheet_synchronization_agent.cpp.
|
default |
void SHEET_SYNCHRONIZATION_AGENT::ModifyItem | ( | SCH_ITEM * | aItem, |
std::function< void()> const & | aDoModify, | ||
const SCH_SHEET_PATH & | aPath, | ||
SHEET_SYNCHRONIZATION_ITEM_KIND | aKind | ||
) |
Definition at line 58 of file sheet_synchronization_agent.cpp.
References m_doModify, and SCH_SHEET_PATH::pop_back().
void SHEET_SYNCHRONIZATION_AGENT::ModifyItem | ( | SHEET_SYNCHRONIZATION_ITEM & | aItem, |
std::function< void()> const & | aDoModify, | ||
const SCH_SHEET_PATH & | aPath | ||
) |
Definition at line 50 of file sheet_synchronization_agent.cpp.
References SHEET_SYNCHRONIZATION_ITEM::GetItem(), SHEET_SYNCHRONIZATION_ITEM::GetKind(), and ModifyItem().
Referenced by PANEL_SYNC_SHEET_PINS::GenericSync(), and ModifyItem().
void SHEET_SYNCHRONIZATION_AGENT::PlaceHieraLable | ( | SCH_SHEET * | aSheet, |
SCH_SHEET_PATH const & | aPath, | ||
SCH_SHEET_PIN * | aPin | ||
) |
Definition at line 122 of file sheet_synchronization_agent.cpp.
References m_doPlaceItem, and PLACE_HIERLABEL.
Referenced by PANEL_SYNC_SHEET_PINS::OnBtnAddLabelsClicked().
void SHEET_SYNCHRONIZATION_AGENT::PlaceSheetPin | ( | SCH_SHEET * | aSheet, |
SCH_SHEET_PATH const & | aPath, | ||
SCH_HIERLABEL * | aLabel | ||
) |
Definition at line 113 of file sheet_synchronization_agent.cpp.
References m_doPlaceItem, PLACE_SHEET_PIN, and SCH_SHEET_PATH::pop_back().
Referenced by PANEL_SYNC_SHEET_PINS::OnBtnAddSheetPinsClicked().
void SHEET_SYNCHRONIZATION_AGENT::RemoveItem | ( | SHEET_SYNCHRONIZATION_ITEM & | aItem, |
SCH_SHEET * | aSheet, | ||
SCH_SHEET_PATH const & | aPath | ||
) |
Definition at line 86 of file sheet_synchronization_agent.cpp.
References SHEET_SYNCHRONIZATION_ITEM::GetItem(), SHEET_SYNCHRONIZATION_ITEM::GetKind(), m_doDelete, and SCH_SHEET_PATH::pop_back().
Referenced by SHEET_SYNCHRONIZATION_MODEL::RemoveItems().
|
private |
Definition at line 86 of file sheet_synchronization_agent.h.
Referenced by RemoveItem().
|
private |
Definition at line 85 of file sheet_synchronization_agent.h.
Referenced by ModifyItem().
|
private |
Definition at line 87 of file sheet_synchronization_agent.h.
Referenced by PlaceHieraLable(), and PlaceSheetPin().
|
private |
Definition at line 89 of file sheet_synchronization_agent.h.
|
private |
Definition at line 88 of file sheet_synchronization_agent.h.