KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_SELECTION Class Reference

#include <pcb_selection.h>

Inheritance diagram for PCB_SELECTION:
SELECTION KIGFX::VIEW_GROUP KIGFX::VIEW_ITEM INSPECTABLE

Public Types

using ITER = std::deque< EDA_ITEM * >::iterator
 
using CITER = std::deque< EDA_ITEM * >::const_iterator
 

Public Member Functions

EDA_ITEMGetTopLeftItem (bool aFootprintsOnly=false) const override
 
BOX2I GetBoundingBox () const override
 
const std::vector< KIGFX::VIEW_ITEM * > updateDrawList () const override
 
bool operator== (const SELECTION &aOther) const
 
ITER begin ()
 
CITER begin () const
 
ITER end ()
 
CITER end () const
 
void SetIsHover (bool aIsHover)
 
bool IsHover () const
 
virtual void Add (EDA_ITEM *aItem)
 
virtual void Add (VIEW_ITEM *aItem)
 Add an item to the group.
 
virtual void Remove (EDA_ITEM *aItem)
 
virtual void Remove (VIEW_ITEM *aItem)
 Remove an item from the group.
 
virtual void Clear () override
 Remove all the stored items from the group.
 
virtual unsigned int GetSize () const override
 Return the number of stored items.
 
virtual KIGFX::VIEW_ITEMGetItem (unsigned int aIdx) const override
 
bool Contains (EDA_ITEM *aItem) const
 
bool Empty () const
 Checks if there is anything selected.
 
int Size () const
 Returns the number of selected parts.
 
const std::deque< EDA_ITEM * > GetItems () const
 
EDA_ITEMGetLastAddedItem () const
 
std::vector< EDA_ITEM * > GetItemsSortedByTypeAndXY (bool leftBeforeRight=true, bool topBeforeBottom=true) const
 Returns a copy of this selection of items sorted by their X then Y position.
 
std::vector< EDA_ITEM * > GetItemsSortedBySelectionOrder () const
 
virtual VECTOR2I GetCenter () const
 Returns the center point of the selection area bounding box.
 
virtual const BOX2I ViewBBox () const override
 Return the bounding box for all stored items covering all its layers.
 
VECTOR2I GetPosition () const
 Returns the top left point of the selection area bounding box.
 
EDA_ITEMoperator[] (const size_t aIdx) const
 
EDA_ITEMFront () const
 
std::deque< EDA_ITEM * > & Items ()
 
const std::deque< EDA_ITEM * > & Items () const
 
template<class T >
T * FirstOfKind () const
 
bool HasType (KICAD_T aType) const
 Checks if there is at least one item of requested kind.
 
size_t CountType (KICAD_T aType) const
 
bool HasReferencePoint () const
 
VECTOR2I GetReferencePoint () const
 
void SetReferencePoint (const VECTOR2I &aP)
 
void ClearReferencePoint ()
 
bool AreAllItemsIdentical () const
 Checks if all items in the selection are the same KICAD_T type.
 
bool OnlyContains (std::vector< KICAD_T > aList) const
 Checks if all items in the selection have a type in aList.
 
virtual void ViewDraw (int aLayer, VIEW *aView) const override
 Draw all the stored items in the group on the given layer.
 
virtual void ViewGetLayers (int aLayers[], int &aCount) const override
 Return all the layers used by the stored items.
 
virtual void SetLayer (int aLayer)
 Set layer used to draw the group.
 
void FreeItems ()
 Free all the items that were added to the group.
 
bool IsSCH_ITEM () const
 
bool IsBOARD_ITEM () const
 
virtual double ViewGetLOD (int aLayer, VIEW *aView) const
 Return the level of detail (LOD) of the item.
 
VIEW_ITEM_DATA * viewPrivData () const
 
void SetForcedTransparency (double aForcedTransparency)
 
double GetForcedTransparency () const
 
bool Set (PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
 
template<typename T >
bool Set (PROPERTY_BASE *aProperty, T aValue, bool aNotify=true)
 
template<typename T >
bool Set (const wxString &aProperty, T aValue, bool aNotify=true)
 
wxAny Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
std::optional< T > Get (const wxString &aProperty) const
 

Protected Attributes

std::optional< VECTOR2Im_referencePoint
 
std::deque< EDA_ITEM * > m_items
 
std::deque< int > m_itemsOrders
 
int m_orderCounter
 
EDA_ITEMm_lastAddedItem
 
bool m_isHover
 
int m_layer
 
std::vector< VIEW_ITEM * > m_groupItems
 

Private Attributes

bool m_isSCH_ITEM
 
bool m_isBOARD_ITEM
 
VIEW_ITEM_DATA * m_viewPrivData
 
double m_forcedTransparency
 Additional transparency for diff'ing items.
 

Detailed Description

Definition at line 31 of file pcb_selection.h.

Member Typedef Documentation

◆ CITER

using SELECTION::CITER = std::deque<EDA_ITEM*>::const_iterator
inherited

Definition at line 72 of file selection.h.

◆ ITER

using SELECTION::ITER = std::deque<EDA_ITEM*>::iterator
inherited

Definition at line 71 of file selection.h.

Member Function Documentation

◆ Add() [1/2]

◆ Add() [2/2]

◆ AreAllItemsIdentical()

bool SELECTION::AreAllItemsIdentical ( ) const
inherited

Checks if all items in the selection are the same KICAD_T type.

Returns
True if all items are the same type, this includes zero or single items

Definition at line 203 of file selection.cpp.

References SELECTION::m_items.

◆ begin() [1/2]

◆ begin() [2/2]

CITER SELECTION::begin ( ) const
inlineinherited

Definition at line 76 of file selection.h.

References SELECTION::m_items.

◆ Clear()

◆ ClearReferencePoint()

◆ Contains()

bool SELECTION::Contains ( EDA_ITEM aItem) const
inherited

◆ CountType()

size_t SELECTION::CountType ( KICAD_T  aType) const
inherited

◆ Empty()

bool SELECTION::Empty ( ) const
inlineinherited

Checks if there is anything selected.

Definition at line 110 of file selection.h.

References SELECTION::m_items.

Referenced by SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_EDIT_TOOL::ChangeSymbols(), GERBVIEW_SELECTION_TOOL::clearSelection(), PL_SELECTION_TOOL::ClearSelection(), PCB_TEST_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EDIT_TOOL::CreateArray(), ZONE_CREATE_HELPER::createNewZone(), CONVERT_TOOL::CreatePolys(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EE_INSPECTION_TOOL::DiffSymbol(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddRowBelow(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteColumns(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteRows(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doMergeCells(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doUnmergeCells(), EDIT_TOOL::Duplicate(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SELECTION_CONDITIONS::Empty(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), EDIT_TOOL::Flip(), DRAWING_TOOL::getSourceZoneForAction(), GROUP_TOOL::Group(), SELECTION_CONDITIONS::hasTypeFunc(), SELECTION_CONDITIONS::hasTypesFunc(), ROUTER_TOOL::InlineDrag(), EDIT_TOOL::JustifyText(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EE_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SELECTION_CONDITIONS::NotEmpty(), SELECTION_CONDITIONS::onlyTypesFunc(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), BOARD_REANNOTATE_TOOL::ReannotateDuplicatesInSelection(), PROPERTIES_PANEL::rebuildProperties(), GROUP_TOOL::RemoveFromGroup(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), EDIT_TOOL::Rotate(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), PCB_SELECTION_CONDITIONS::sameNetFunc(), CLIPBOARD_IO::SaveSelection(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), EE_SELECTION_TOOL::SelectConnection(), PCB_SELECTION_TOOL::selectCursor(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), SCH_EDIT_TOOL::SetAttribute(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_EDIT_TOOL::ToggleAttribute(), GROUP_TOOL::Ungroup(), GERBVIEW_SELECTION_TOOL::unselect(), SCH_EDIT_TOOL::UnsetAttribute(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), PCB_CONTROL::UpdateMessagePanel(), and EDIT_TOOL::updateModificationPoint().

◆ end() [1/2]

◆ end() [2/2]

CITER SELECTION::end ( ) const
inlineinherited

Definition at line 77 of file selection.h.

References SELECTION::m_items.

◆ FirstOfKind()

template<class T >
T * SELECTION::FirstOfKind ( ) const
inlineinherited

◆ FreeItems()

◆ Front()

EDA_ITEM * SELECTION::Front ( ) const
inlineinherited

Definition at line 172 of file selection.h.

References SELECTION::m_items.

Referenced by PCB_POINT_EDITOR::addCornerCondition(), SCH_EDIT_TOOL::AutoplaceFields(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_EDIT_TOOL::ChangeSymbols(), SCH_EDIT_TOOL::CleanupSheetPins(), PL_SELECTION_TOOL::ClearSelection(), PCB_TEST_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), CONVERT_TOOL::CreatePolys(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), EE_INSPECTION_TOOL::DiffSymbol(), PL_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::EditPageNumber(), SCH_LINE_WIRE_BUS_TOOL::getBusForUnfolding(), GERBVIEW_SELECTION::GetCenter(), SCH_FIND_REPLACE_TOOL::getCurrentMatch(), EE_GRID_HELPER::GetSelectionGrid(), GRID_HELPER::GetSelectionGrid(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus(), SCH_EDIT_TOOL::JustifyText(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), PROPERTIES_PANEL::rebuildProperties(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), CLIPBOARD_IO::SaveSelection(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), EE_INSPECTION_TOOL::ShowDatasheet(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDIT_TOOL::Swap(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), SCH_DRAWING_TOOLS::SyncSheetsPins(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), PL_EDIT_TOOL::updateModificationPoint(), and GERBVIEW_SELECTION::ViewBBox().

◆ Get() [1/3]

template<typename T >
std::optional< T > INSPECTABLE::Get ( const wxString &  aProperty) const
inlineinherited

◆ Get() [2/3]

◆ Get() [3/3]

template<typename T >
T INSPECTABLE::Get ( PROPERTY_BASE aProperty) const
inlineinherited

◆ GetBoundingBox()

BOX2I PCB_SELECTION::GetBoundingBox ( ) const
overridevirtual

◆ GetCenter()

VECTOR2I SELECTION::GetCenter ( ) const
virtualinherited

◆ GetForcedTransparency()

double KIGFX::VIEW_ITEM::GetForcedTransparency ( ) const
inlineinherited

◆ GetItem()

◆ GetItems()

◆ GetItemsSortedBySelectionOrder()

std::vector< EDA_ITEM * > SELECTION::GetItemsSortedBySelectionOrder ( ) const
inherited

◆ GetItemsSortedByTypeAndXY()

std::vector< EDA_ITEM * > SELECTION::GetItemsSortedByTypeAndXY ( bool  leftBeforeRight = true,
bool  topBeforeBottom = true 
) const
inherited

Returns a copy of this selection of items sorted by their X then Y position.

Returns
std::vector of sorted items

Definition at line 223 of file selection.cpp.

References SELECTION::m_items.

Referenced by SCH_MOVE_TOOL::doMoveSelection().

◆ GetLastAddedItem()

EDA_ITEM * SELECTION::GetLastAddedItem ( ) const
inlineinherited

Definition at line 126 of file selection.h.

References SELECTION::m_lastAddedItem.

Referenced by BOARD_EDITOR_CONTROL::doCrossProbePcbToSch().

◆ GetPosition()

VECTOR2I SELECTION::GetPosition ( ) const
inlineinherited

Returns the top left point of the selection area bounding box.

Definition at line 152 of file selection.h.

References SELECTION::GetBoundingBox(), and BOX2< Vec >::GetPosition().

◆ GetReferencePoint()

◆ GetSize()

virtual unsigned int SELECTION::GetSize ( ) const
inlineoverridevirtualinherited

◆ GetTopLeftItem()

EDA_ITEM * PCB_SELECTION::GetTopLeftItem ( bool  aFootprintsOnly = false) const
overridevirtual

◆ HasReferencePoint()

◆ HasType()

bool SELECTION::HasType ( KICAD_T  aType) const
inherited

Checks if there is at least one item of requested kind.

Parameters
aTypeis the type to check for.
Returns
True if there is at least one item of such kind.

Definition at line 145 of file selection.cpp.

References SELECTION::m_items.

Referenced by POSITION_RELATIVE_TOOL::PositionRelative(), EDIT_TOOL::Remove(), and SCH_EDIT_FRAME::SaveSelectionAsDesignBlock().

◆ IsBOARD_ITEM()

◆ IsHover()

◆ IsSCH_ITEM()

bool KIGFX::VIEW_ITEM::IsSCH_ITEM ( ) const
inlineinherited

Definition at line 99 of file view_item.h.

◆ Items() [1/2]

◆ Items() [2/2]

const std::deque< EDA_ITEM * > & SELECTION::Items ( ) const
inlineinherited

Definition at line 182 of file selection.h.

References SELECTION::m_items.

◆ OnlyContains()

bool SELECTION::OnlyContains ( std::vector< KICAD_T aList) const
inherited

Checks if all items in the selection have a type in aList.

Returns
False if any item in the selection has a type not included in aList

Definition at line 213 of file selection.cpp.

References SELECTION::m_items.

Referenced by SCH_EDIT_TOOL::Swap().

◆ operator==()

bool SELECTION::operator== ( const SELECTION aOther) const
inherited

◆ operator[]()

EDA_ITEM * SELECTION::operator[] ( const size_t  aIdx) const
inlineinherited

Definition at line 164 of file selection.h.

References SELECTION::m_items.

◆ Remove() [1/2]

◆ Remove() [2/2]

void VIEW_GROUP::Remove ( VIEW_ITEM aItem)
virtualinherited

Remove an item from the group.

Definition at line 64 of file view_group.cpp.

References alg::delete_matching(), and KIGFX::VIEW_GROUP::m_groupItems.

◆ Set() [1/3]

template<typename T >
bool INSPECTABLE::Set ( const wxString &  aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [2/3]

template<typename T >
bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [3/3]

bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
wxAny &  aValue,
bool  aNotify = true 
)
inlineinherited

◆ SetForcedTransparency()

void KIGFX::VIEW_ITEM::SetForcedTransparency ( double  aForcedTransparency)
inlineinherited

◆ SetIsHover()

◆ SetLayer()

virtual void KIGFX::VIEW_GROUP::SetLayer ( int  aLayer)
inlinevirtualinherited

Set layer used to draw the group.

Definition at line 99 of file view_group.h.

Referenced by SELECTION_TOOL::doSelectionMenu(), PNS_PCBNEW_DEBUG_DECORATOR::SetView(), and PNS_KICAD_IFACE::SetView().

◆ SetReferencePoint()

◆ Size()

int SELECTION::Size ( ) const
inlineinherited

Returns the number of selected parts.

Definition at line 116 of file selection.h.

References SELECTION::m_items.

Referenced by PCB_POINT_EDITOR::addCornerCondition(), PAD_TOOL::copyPadSettings(), SELECTION_CONDITIONS::countFunc(), BOARD_INSPECTION_TOOL::DiffFootprint(), ALIGN_DISTRIBUTE_TOOL::DistributeItems(), PL_EDIT_TOOL::DoDelete(), PCB_SELECTION_TOOL::doSyncSelection(), EDIT_TOOL::DragArcTrack(), SCH_DRAWING_TOOLS::DrawSheet(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), PAD_TOOL::EditPad(), EDIT_TOOL::FilletTracks(), GERBVIEW_SELECTION::GetCenter(), DRAWING_TOOL::getSourceZoneForAction(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), ARRAY_CREATOR::Invoke(), SELECTION_CONDITIONS::lessThanFunc(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), SELECTION_CONDITIONS::moreThanFunc(), EDIT_TOOL::MoveExact(), PCB_POINT_EDITOR::OnSelectionChange(), PCB_CONTROL::placeBoardItems(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), PROPERTIES_PANEL::rebuildProperties(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), CLIPBOARD_IO::SaveSelection(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), PCB_SELECTION_TOOL::selectNet(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), SCH_EDIT_TOOL::Swap(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), EDIT_TOOL::Swap(), EE_SELECTION_TOOL::SyncSelection(), EDIT_TOOL::updateModificationPoint(), PL_EDIT_TOOL::updateModificationPoint(), EE_SELECTION_TOOL::updateReferencePoint(), GERBVIEW_SELECTION::ViewBBox(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().

◆ updateDrawList()

const std::vector< KIGFX::VIEW_ITEM * > PCB_SELECTION::updateDrawList ( ) const
overridevirtual

Reimplemented from SELECTION.

Definition at line 85 of file pcb_selection.cpp.

References SELECTION::m_items, and BOARD_ITEM::RunOnChildren().

◆ ViewBBox()

virtual const BOX2I SELECTION::ViewBBox ( ) const
inlineoverridevirtualinherited

Return the bounding box for all stored items covering all its layers.

Reimplemented from KIGFX::VIEW_GROUP.

Reimplemented in GERBVIEW_SELECTION.

Definition at line 144 of file selection.h.

References BOX2< Vec >::SetMaximum().

◆ ViewDraw()

void VIEW_GROUP::ViewDraw ( int  aLayer,
VIEW aView 
) const
overridevirtualinherited

◆ ViewGetLayers()

void VIEW_GROUP::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtualinherited

Return all the layers used by the stored items.

Parameters
aLayers[]is the output layer index array.
aCountis the number of layer indices in aLayers[].

Implements KIGFX::VIEW_ITEM.

Definition at line 196 of file view_group.cpp.

References KIGFX::VIEW_GROUP::m_layer.

◆ ViewGetLOD()

virtual double KIGFX::VIEW_ITEM::ViewGetLOD ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Return the level of detail (LOD) of the item.

A level of detail is the minimal VIEW scale that is sufficient for an item to be shown on a given layer.

Parameters
aLayeris the current drawing layer.
aViewis a pointer to the VIEW device we are drawing on.
Returns
the level of detail. 0 always show the item, because the actual zoom level (or VIEW scale) is always > 0

Reimplemented in SCH_LINE, GERBER_DRAW_ITEM, FOOTPRINT, PAD, PCB_FIELD, PCB_GROUP, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, and ZONE.

Definition at line 145 of file view_item.h.

Referenced by PCB_GRID_HELPER::computeAnchors(), PNS_KICAD_IFACE::IsItemVisible(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), EE_GRID_HELPER::queryVisible(), and PCB_GRID_HELPER::queryVisible().

◆ viewPrivData()

Member Data Documentation

◆ m_forcedTransparency

double KIGFX::VIEW_ITEM::m_forcedTransparency
privateinherited

Additional transparency for diff'ing items.

Definition at line 172 of file view_item.h.

Referenced by KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()().

◆ m_groupItems

◆ m_isBOARD_ITEM

bool KIGFX::VIEW_ITEM::m_isBOARD_ITEM
privateinherited

Definition at line 170 of file view_item.h.

◆ m_isHover

bool SELECTION::m_isHover
protectedinherited

◆ m_isSCH_ITEM

bool KIGFX::VIEW_ITEM::m_isSCH_ITEM
privateinherited

Definition at line 169 of file view_item.h.

◆ m_items

◆ m_itemsOrders

std::deque<int> SELECTION::m_itemsOrders
protectedinherited

◆ m_lastAddedItem

EDA_ITEM* SELECTION::m_lastAddedItem
protectedinherited

◆ m_layer

int KIGFX::VIEW_GROUP::m_layer
protectedinherited

Definition at line 113 of file view_group.h.

Referenced by KIGFX::VIEW_GROUP::ViewDraw(), and KIGFX::VIEW_GROUP::ViewGetLayers().

◆ m_orderCounter

int SELECTION::m_orderCounter
protectedinherited

◆ m_referencePoint

std::optional<VECTOR2I> SELECTION::m_referencePoint
protectedinherited

◆ m_viewPrivData

VIEW_ITEM_DATA* KIGFX::VIEW_ITEM::m_viewPrivData
privateinherited

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