KiCad PCB EDA Suite
ITEM_PICKER Class Reference

#include <undo_redo_container.h>

Public Member Functions

 ITEM_PICKER ()
 
 ITEM_PICKER (BASE_SCREEN *aScreen, EDA_ITEM *aItem, UNDO_REDO aStatus=UNDO_REDO::UNSPECIFIED)
 
EDA_ITEMGetItem () const
 
void SetItem (EDA_ITEM *aItem)
 
KICAD_T GetItemType () const
 
void SetStatus (UNDO_REDO aStatus)
 
UNDO_REDO GetStatus () const
 
void SetFlags (EDA_ITEM_FLAGS aFlags)
 
EDA_ITEM_FLAGS GetFlags () const
 
void SetLink (EDA_ITEM *aItem)
 
EDA_ITEMGetLink () const
 
BASE_SCREENGetScreen () const
 

Private Attributes

EDA_ITEM_FLAGS m_pickerFlags
 
UNDO_REDO m_undoRedoStatus
 
EDA_ITEMm_pickedItem
 
KICAD_T m_pickedItemType
 
EDA_ITEMm_link
 
BASE_SCREENm_screen
 

Detailed Description

Definition at line 77 of file undo_redo_container.h.

Constructor & Destructor Documentation

◆ ITEM_PICKER() [1/2]

ITEM_PICKER::ITEM_PICKER ( )

Definition at line 30 of file undo_redo_container.cpp.

31 {
33  SetItem( nullptr );
34  m_pickerFlags = 0;
35  m_link = nullptr;
36  m_screen = nullptr;
37 }
UNDO_REDO m_undoRedoStatus
void SetItem(EDA_ITEM *aItem)
BASE_SCREEN * m_screen
EDA_ITEM_FLAGS m_pickerFlags

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

◆ ITEM_PICKER() [2/2]

ITEM_PICKER::ITEM_PICKER ( BASE_SCREEN aScreen,
EDA_ITEM aItem,
UNDO_REDO  aStatus = UNDO_REDO::UNSPECIFIED 
)

Definition at line 40 of file undo_redo_container.cpp.

41 {
42  m_undoRedoStatus = aUndoRedoStatus;
43  SetItem( aItem );
44  m_pickerFlags = 0;
45  m_link = nullptr;
46  m_screen = aScreen;
47 }
UNDO_REDO m_undoRedoStatus
void SetItem(EDA_ITEM *aItem)
BASE_SCREEN * m_screen
EDA_ITEM_FLAGS m_pickerFlags

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

Member Function Documentation

◆ GetFlags()

EDA_ITEM_FLAGS ITEM_PICKER::GetFlags ( ) const
inline

Definition at line 97 of file undo_redo_container.h.

97 { return m_pickerFlags; }
EDA_ITEM_FLAGS m_pickerFlags

References m_pickerFlags.

Referenced by PICKED_ITEMS_LIST::ClearListAndDeleteItems().

◆ GetItem()

◆ GetItemType()

KICAD_T ITEM_PICKER::GetItemType ( ) const
inline

Definition at line 89 of file undo_redo_container.h.

89 { return m_pickedItemType; }
KICAD_T m_pickedItemType

References m_pickedItemType.

◆ GetLink()

EDA_ITEM* ITEM_PICKER::GetLink ( ) const
inline

Definition at line 101 of file undo_redo_container.h.

101 { return m_link; }

References m_link.

Referenced by PICKED_ITEMS_LIST::ClearListAndDeleteItems().

◆ GetScreen()

BASE_SCREEN* ITEM_PICKER::GetScreen ( ) const
inline

Definition at line 103 of file undo_redo_container.h.

103 { return m_screen; }
BASE_SCREEN * m_screen

References m_screen.

◆ GetStatus()

UNDO_REDO ITEM_PICKER::GetStatus ( ) const
inline

◆ SetFlags()

void ITEM_PICKER::SetFlags ( EDA_ITEM_FLAGS  aFlags)
inline

Definition at line 95 of file undo_redo_container.h.

95 { m_pickerFlags = aFlags; }
EDA_ITEM_FLAGS m_pickerFlags

References m_pickerFlags.

Referenced by SCH_EDIT_FRAME::SaveCopyInUndoList().

◆ SetItem()

void ITEM_PICKER::SetItem ( EDA_ITEM aItem)

Definition at line 50 of file undo_redo_container.cpp.

51 {
52  m_pickedItem = aItem;
53  m_pickedItemType = aItem ? aItem->Type() : TYPE_NOT_INIT;
54 }
KICAD_T m_pickedItemType
EDA_ITEM * m_pickedItem
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:113

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

Referenced by ITEM_PICKER().

◆ SetLink()

◆ SetStatus()

void ITEM_PICKER::SetStatus ( UNDO_REDO  aStatus)
inline

Definition at line 91 of file undo_redo_container.h.

91 { m_undoRedoStatus = aStatus; }
UNDO_REDO m_undoRedoStatus

References m_undoRedoStatus.

Member Data Documentation

◆ m_link

EDA_ITEM* ITEM_PICKER::m_link
private

Definition at line 114 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 109 of file undo_redo_container.h.

Referenced by GetItem(), and SetItem().

◆ m_pickedItemType

KICAD_T ITEM_PICKER::m_pickedItemType
private

Definition at line 112 of file undo_redo_container.h.

Referenced by GetItemType(), and SetItem().

◆ m_pickerFlags

EDA_ITEM_FLAGS ITEM_PICKER::m_pickerFlags
private

Definition at line 106 of file undo_redo_container.h.

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

◆ m_screen

BASE_SCREEN* ITEM_PICKER::m_screen
private

Definition at line 121 of file undo_redo_container.h.

Referenced by GetScreen(), and ITEM_PICKER().

◆ m_undoRedoStatus

UNDO_REDO ITEM_PICKER::m_undoRedoStatus
private

Definition at line 108 of file undo_redo_container.h.

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


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