KiCad PCB EDA Suite
ITEM_PICKER Class Reference

#include <undo_redo_container.h>

Public Member Functions

 ITEM_PICKER (EDA_ITEM *aItem=NULL, UNDO_REDO_T aUndoRedoStatus=UR_UNSPECIFIED)
 
EDA_ITEMGetItem () const
 
void SetItem (EDA_ITEM *aItem)
 
KICAD_T GetItemType () const
 
void SetStatus (UNDO_REDO_T aStatus)
 
UNDO_REDO_T GetStatus () const
 
void SetFlags (STATUS_FLAGS aFlags)
 
STATUS_FLAGS GetFlags () const
 
void SetLink (EDA_ITEM *aItem)
 
EDA_ITEMGetLink () const
 

Private Attributes

STATUS_FLAGS m_pickerFlags
 
UNDO_REDO_T m_undoRedoStatus
 
EDA_ITEMm_pickedItem
 
KICAD_T m_pickedItemType
 
EDA_ITEMm_link
 

Detailed Description

Definition at line 75 of file undo_redo_container.h.

Constructor & Destructor Documentation

◆ ITEM_PICKER()

ITEM_PICKER::ITEM_PICKER ( EDA_ITEM aItem = NULL,
UNDO_REDO_T  aUndoRedoStatus = UR_UNSPECIFIED 
)

Definition at line 31 of file undo_redo_container.cpp.

32 {
33  m_undoRedoStatus = aUndoRedoStatus;
34  SetItem( aItem );
35  m_pickerFlags = 0;
36  m_link = NULL;
37 }
EDA_ITEM * m_link
void SetItem(EDA_ITEM *aItem)
STATUS_FLAGS m_pickerFlags
UNDO_REDO_T m_undoRedoStatus

References m_link, m_pickerFlags, m_undoRedoStatus, and SetItem().

Member Function Documentation

◆ GetFlags()

STATUS_FLAGS ITEM_PICKER::GetFlags ( ) const
inline

Definition at line 112 of file undo_redo_container.h.

112 { return m_pickerFlags; }
STATUS_FLAGS m_pickerFlags

References m_pickerFlags.

Referenced by PICKED_ITEMS_LIST::ClearListAndDeleteItems().

◆ GetItem()

◆ GetItemType()

KICAD_T ITEM_PICKER::GetItemType ( ) const
inline

Definition at line 104 of file undo_redo_container.h.

104 { return m_pickedItemType; }
KICAD_T m_pickedItemType

References m_pickedItemType.

◆ GetLink()

EDA_ITEM* ITEM_PICKER::GetLink ( ) const
inline

Definition at line 116 of file undo_redo_container.h.

116 { return m_link; }
EDA_ITEM * m_link

References m_link.

Referenced by PICKED_ITEMS_LIST::ClearListAndDeleteItems().

◆ GetStatus()

UNDO_REDO_T ITEM_PICKER::GetStatus ( ) const
inline

◆ SetFlags()

void ITEM_PICKER::SetFlags ( STATUS_FLAGS  aFlags)
inline

Definition at line 110 of file undo_redo_container.h.

110 { m_pickerFlags = aFlags; }
STATUS_FLAGS m_pickerFlags

References m_pickerFlags.

Referenced by SCH_EDIT_FRAME::SaveCopyInUndoList().

◆ SetItem()

void ITEM_PICKER::SetItem ( EDA_ITEM aItem)
inline

Definition at line 98 of file undo_redo_container.h.

99  {
100  m_pickedItem = aItem;
101  m_pickedItemType = aItem ? aItem->Type() : TYPE_NOT_INIT;
102  }
KICAD_T m_pickedItemType
EDA_ITEM * m_pickedItem
KICAD_T Type() const
Function Type()
Definition: base_struct.h:210

References m_pickedItem, m_pickedItemType, EDA_ITEM::Type(), and TYPE_NOT_INIT.

Referenced by ITEM_PICKER().

◆ SetLink()

◆ SetStatus()

void ITEM_PICKER::SetStatus ( UNDO_REDO_T  aStatus)
inline

Definition at line 106 of file undo_redo_container.h.

106 { m_undoRedoStatus = aStatus; }
UNDO_REDO_T m_undoRedoStatus

References m_undoRedoStatus.

Member Data Documentation

◆ m_link

EDA_ITEM* ITEM_PICKER::m_link
private

Definition at line 86 of file undo_redo_container.h.

Referenced by GetLink(), ITEM_PICKER(), and SetLink().

◆ m_pickedItem

EDA_ITEM* ITEM_PICKER::m_pickedItem
private

Definition at line 81 of file undo_redo_container.h.

Referenced by GetItem(), and SetItem().

◆ m_pickedItemType

KICAD_T ITEM_PICKER::m_pickedItemType
private

Definition at line 84 of file undo_redo_container.h.

Referenced by GetItemType(), and SetItem().

◆ m_pickerFlags

STATUS_FLAGS ITEM_PICKER::m_pickerFlags
private

Definition at line 78 of file undo_redo_container.h.

Referenced by GetFlags(), ITEM_PICKER(), and SetFlags().

◆ m_undoRedoStatus

UNDO_REDO_T ITEM_PICKER::m_undoRedoStatus
private

Definition at line 80 of file undo_redo_container.h.

Referenced by GetStatus(), ITEM_PICKER(), and SetStatus().


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