KiCad PCB EDA Suite
GENERAL_COLLECTORS_GUIDE Class Reference

A general implementation of a COLLECTORS_GUIDE. More...

#include <collectors.h>

Inheritance diagram for GENERAL_COLLECTORS_GUIDE:
COLLECTORS_GUIDE

Public Member Functions

 GENERAL_COLLECTORS_GUIDE (LSET aVisibleLayerMask, PCB_LAYER_ID aPreferredLayer, KIGFX::VIEW *aView)
 Grab stuff from global preferences and uses reasonable defaults. More...
 
bool IsLayerVisible (PCB_LAYER_ID aLayerId) const override
 
void SetLayerVisible (PCB_LAYER_ID aLayerId, bool isVisible)
 
void SetLayerVisibleBits (LSET aLayerBits)
 
PCB_LAYER_ID GetPreferredLayer () const override
 
void SetPreferredLayer (PCB_LAYER_ID aLayer)
 
bool IgnoreLockedItems () const override
 
void SetIgnoreLockedItems (bool ignore)
 
bool IncludeSecondary () const override
 Determine if the secondary criteria, or 2nd choice items should be included. More...
 
void SetIncludeSecondary (bool include)
 
bool IgnoreHiddenFPText () const override
 
void SetIgnoreMTextsMarkedNoShow (bool ignore)
 
bool IgnoreFPTextOnBack () const override
 
void SetIgnoreMTextsOnBack (bool ignore)
 
bool IgnoreFPTextOnFront () const override
 
void SetIgnoreMTextsOnFront (bool ignore)
 
bool IgnoreFootprintsOnBack () const override
 
void SetIgnoreModulesOnBack (bool ignore)
 
bool IgnoreFootprintsOnFront () const override
 
void SetIgnoreModulesOnFront (bool ignore)
 
bool IgnorePadsOnBack () const override
 
void SetIgnorePadsOnBack (bool ignore)
 
bool IgnorePadsOnFront () const override
 
void SetIgnorePadsOnFront (bool ignore)
 
bool IgnoreThroughHolePads () const override
 
void SetIgnoreThroughHolePads (bool ignore)
 
bool IgnoreFPValues () const override
 
void SetIgnoreModulesVals (bool ignore)
 
bool IgnoreFPReferences () const override
 
void SetIgnoreModulesRefs (bool ignore)
 
bool IgnoreThroughVias () const override
 
void SetIgnoreThroughVias (bool ignore)
 
bool IgnoreBlindBuriedVias () const override
 
void SetIgnoreBlindBuriedVias (bool ignore)
 
bool IgnoreMicroVias () const override
 
void SetIgnoreMicroVias (bool ignore)
 
bool IgnoreTracks () const override
 
void SetIgnoreTracks (bool ignore)
 
bool IgnoreZoneFills () const override
 
void SetIgnoreZoneFills (bool ignore)
 
double OnePixelInIU () const override
 
void SetOnePixelInIU (double aValue)
 
virtual bool IgnorePads () const
 

Private Attributes

PCB_LAYER_ID m_preferredLayer
 
LSET m_visibleLayers
 bit-mapped layer visible bits More...
 
bool m_ignoreLockedItems
 
bool m_includeSecondary
 
bool m_ignoreHiddenFPText
 
bool m_ignoreFPTextOnBack
 
bool m_ignoreFPTextOnFront
 
bool m_ignoreFootprintsOnBack
 
bool m_ignoreFootprintsOnFront
 
bool m_ignorePadsOnFront
 
bool m_ignorePadsOnBack
 
bool m_ignoreThroughHolePads
 
bool m_ignoreFPValues
 
bool m_ignoreFPReferences
 
bool m_ignoreThroughVias
 
bool m_ignoreBlindBuriedVias
 
bool m_ignoreMicroVias
 
bool m_ignoreTracks
 
bool m_ignoreZoneFills
 
double m_onePixelInIU
 

Detailed Description

A general implementation of a COLLECTORS_GUIDE.

One of its constructors is entitled to grab information from the program's global preferences.

Definition at line 325 of file collectors.h.

Constructor & Destructor Documentation

◆ GENERAL_COLLECTORS_GUIDE()

GENERAL_COLLECTORS_GUIDE::GENERAL_COLLECTORS_GUIDE ( LSET  aVisibleLayerMask,
PCB_LAYER_ID  aPreferredLayer,
KIGFX::VIEW aView 
)
inline

Grab stuff from global preferences and uses reasonable defaults.

Add more constructors as needed.

Parameters
aVisibleLayerMaskis the current visible layers (bit mask).
aPreferredLayeris the layer to search first.

Definition at line 337 of file collectors.h.

339 {
340 VECTOR2I one( 1, 1 );
341
342 m_preferredLayer = aPreferredLayer;
343 m_visibleLayers = aVisibleLayerMask;
344 m_ignoreLockedItems = false;
345
346#if defined(USE_MATCH_LAYER)
347 m_includeSecondary = false;
348#else
349 m_includeSecondary = true;
350#endif
351
352 m_ignoreHiddenFPText = true; // g_ModuleTextNOVColor;
354 m_ignoreFPTextOnFront = false;
355 m_ignoreFootprintsOnBack = true; // !Show_footprints_Cmp;
357
358 m_ignorePadsOnFront = false;
359 m_ignorePadsOnBack = false;
361
362 m_ignoreFPValues = false;
363 m_ignoreFPReferences = false;
364
365 m_ignoreThroughVias = false;
367 m_ignoreMicroVias = false;
368 m_ignoreTracks = false;
369 m_ignoreZoneFills = true;
370
371 m_onePixelInIU = abs( aView->ToWorld( one, false ).x );
372 }
LSET m_visibleLayers
bit-mapped layer visible bits
Definition: collectors.h:491
PCB_LAYER_ID m_preferredLayer
Definition: collectors.h:489
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
Definition: view.cpp:445
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition: eda_angle.h:401

References std::abs(), m_ignoreBlindBuriedVias, m_ignoreFootprintsOnBack, m_ignoreFootprintsOnFront, m_ignoreFPReferences, m_ignoreFPTextOnBack, m_ignoreFPTextOnFront, m_ignoreFPValues, m_ignoreHiddenFPText, m_ignoreLockedItems, m_ignoreMicroVias, m_ignorePadsOnBack, m_ignorePadsOnFront, m_ignoreThroughHolePads, m_ignoreThroughVias, m_ignoreTracks, m_ignoreZoneFills, m_includeSecondary, m_onePixelInIU, m_preferredLayer, m_visibleLayers, KIGFX::VIEW::ToWorld(), and VECTOR2< T >::x.

Member Function Documentation

◆ GetPreferredLayer()

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::GetPreferredLayer ( ) const
inlineoverridevirtual
Returns
int - the preferred layer for HitTest()ing.

Implements COLLECTORS_GUIDE.

Definition at line 390 of file collectors.h.

390{ return m_preferredLayer; }

References m_preferredLayer.

◆ IgnoreBlindBuriedVias()

bool GENERAL_COLLECTORS_GUIDE::IgnoreBlindBuriedVias ( ) const
inlineoverridevirtual
Returns
true if should ignore blind/buried vias

Implements COLLECTORS_GUIDE.

Definition at line 470 of file collectors.h.

470{ return m_ignoreBlindBuriedVias; }

References m_ignoreBlindBuriedVias.

◆ IgnoreFootprintsOnBack()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFootprintsOnBack ( ) const
inlineoverridevirtual
Returns
true if should ignore MODULEs on the back side

Implements COLLECTORS_GUIDE.

Definition at line 428 of file collectors.h.

428{ return m_ignoreFootprintsOnBack; }

References m_ignoreFootprintsOnBack.

◆ IgnoreFootprintsOnFront()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFootprintsOnFront ( ) const
inlineoverridevirtual
Returns
true if should ignore MODULEs on component layer.

Implements COLLECTORS_GUIDE.

Definition at line 434 of file collectors.h.

References m_ignoreFootprintsOnFront.

◆ IgnoreFPReferences()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFPReferences ( ) const
inlineoverridevirtual
Returns
true if should ignore footprints references.

Implements COLLECTORS_GUIDE.

Definition at line 464 of file collectors.h.

464{ return m_ignoreFPReferences; }

References m_ignoreFPReferences.

◆ IgnoreFPTextOnBack()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFPTextOnBack ( ) const
inlineoverridevirtual
Returns
true if should ignore MTexts on back layers

Implements COLLECTORS_GUIDE.

Definition at line 416 of file collectors.h.

416{ return m_ignoreFPTextOnBack; }

References m_ignoreFPTextOnBack.

◆ IgnoreFPTextOnFront()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFPTextOnFront ( ) const
inlineoverridevirtual
Returns
true if should ignore MTexts on front layers

Implements COLLECTORS_GUIDE.

Definition at line 422 of file collectors.h.

422{ return m_ignoreFPTextOnFront; }

References m_ignoreFPTextOnFront.

◆ IgnoreFPValues()

bool GENERAL_COLLECTORS_GUIDE::IgnoreFPValues ( ) const
inlineoverridevirtual
Returns
true if should ignore footprints values.

Implements COLLECTORS_GUIDE.

Definition at line 458 of file collectors.h.

458{ return m_ignoreFPValues; }

References m_ignoreFPValues.

◆ IgnoreHiddenFPText()

bool GENERAL_COLLECTORS_GUIDE::IgnoreHiddenFPText ( ) const
inlineoverridevirtual
Returns
true if MTexts marked as "no show" should be ignored.

Implements COLLECTORS_GUIDE.

Definition at line 410 of file collectors.h.

410{ return m_ignoreHiddenFPText; }

References m_ignoreHiddenFPText.

◆ IgnoreLockedItems()

bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedItems ( ) const
inlineoverridevirtual
Returns
true if should ignore locked items, else false.

Implements COLLECTORS_GUIDE.

Definition at line 396 of file collectors.h.

396{ return m_ignoreLockedItems; }

References m_ignoreLockedItems.

◆ IgnoreMicroVias()

bool GENERAL_COLLECTORS_GUIDE::IgnoreMicroVias ( ) const
inlineoverridevirtual
Returns
true if should ignore micro vias

Implements COLLECTORS_GUIDE.

Definition at line 473 of file collectors.h.

473{ return m_ignoreMicroVias; }

References m_ignoreMicroVias.

◆ IgnorePads()

virtual bool COLLECTORS_GUIDE::IgnorePads ( ) const
inlinevirtualinherited
Returns
true if should ignore PADSs on Front side and Back side.

Definition at line 122 of file collectors.h.

123 {
125 }
virtual bool IgnoreThroughHolePads() const =0
virtual bool IgnorePadsOnBack() const =0
virtual bool IgnorePadsOnFront() const =0

References COLLECTORS_GUIDE::IgnorePadsOnBack(), COLLECTORS_GUIDE::IgnorePadsOnFront(), and COLLECTORS_GUIDE::IgnoreThroughHolePads().

Referenced by GENERAL_COLLECTOR::Inspect().

◆ IgnorePadsOnBack()

bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnBack ( ) const
inlineoverridevirtual
Returns
true if should ignore Pads on Back Side.

Implements COLLECTORS_GUIDE.

Definition at line 440 of file collectors.h.

440{ return m_ignorePadsOnBack; }

References m_ignorePadsOnBack.

◆ IgnorePadsOnFront()

bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnFront ( ) const
inlineoverridevirtual
Returns
true if should ignore PADSs on Front Side.

Implements COLLECTORS_GUIDE.

Definition at line 446 of file collectors.h.

446{ return m_ignorePadsOnFront; }

References m_ignorePadsOnFront.

◆ IgnoreThroughHolePads()

bool GENERAL_COLLECTORS_GUIDE::IgnoreThroughHolePads ( ) const
inlineoverridevirtual
Returns
true if should ignore through-hole PADSs.

Implements COLLECTORS_GUIDE.

Definition at line 452 of file collectors.h.

452{ return m_ignoreThroughHolePads; }

References m_ignoreThroughHolePads.

◆ IgnoreThroughVias()

bool GENERAL_COLLECTORS_GUIDE::IgnoreThroughVias ( ) const
inlineoverridevirtual
Returns
true if should ignore through-hole vias

Implements COLLECTORS_GUIDE.

Definition at line 467 of file collectors.h.

467{ return m_ignoreThroughVias; }

References m_ignoreThroughVias.

◆ IgnoreTracks()

bool GENERAL_COLLECTORS_GUIDE::IgnoreTracks ( ) const
inlineoverridevirtual
Returns
true if should ignore tracks

Implements COLLECTORS_GUIDE.

Definition at line 476 of file collectors.h.

476{ return m_ignoreTracks; }

References m_ignoreTracks.

◆ IgnoreZoneFills()

bool GENERAL_COLLECTORS_GUIDE::IgnoreZoneFills ( ) const
inlineoverridevirtual
Returns
true if should ignore the interiors of zones

Implements COLLECTORS_GUIDE.

Definition at line 479 of file collectors.h.

479{ return m_ignoreZoneFills; }

References m_ignoreZoneFills.

◆ IncludeSecondary()

bool GENERAL_COLLECTORS_GUIDE::IncludeSecondary ( ) const
inlineoverridevirtual

Determine if the secondary criteria, or 2nd choice items should be included.

Returns
true if should include, else false.

Implements COLLECTORS_GUIDE.

Definition at line 404 of file collectors.h.

404{ return m_includeSecondary; }

References m_includeSecondary.

◆ IsLayerVisible()

bool GENERAL_COLLECTORS_GUIDE::IsLayerVisible ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual
Returns
true if the given layer is visible, else false.

Implements COLLECTORS_GUIDE.

Definition at line 377 of file collectors.h.

378 {
379 return m_visibleLayers[aLayerId];
380 }

References m_visibleLayers.

◆ OnePixelInIU()

double GENERAL_COLLECTORS_GUIDE::OnePixelInIU ( ) const
inlineoverridevirtual

Implements COLLECTORS_GUIDE.

Definition at line 482 of file collectors.h.

482{ return m_onePixelInIU; }

References m_onePixelInIU.

◆ SetIgnoreBlindBuriedVias()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreBlindBuriedVias ( bool  ignore)
inline

◆ SetIgnoreLockedItems()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedItems ( bool  ignore)
inline

Definition at line 397 of file collectors.h.

397{ m_ignoreLockedItems = ignore; }

References m_ignoreLockedItems.

◆ SetIgnoreMicroVias()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreMicroVias ( bool  ignore)
inline

Definition at line 474 of file collectors.h.

474{ m_ignoreMicroVias = ignore; }

References m_ignoreMicroVias.

Referenced by PCB_BASE_FRAME::GetCollectorsGuide(), and PCB_SELECTION_TOOL::getCollectorsGuide().

◆ SetIgnoreModulesOnBack()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnBack ( bool  ignore)
inline

◆ SetIgnoreModulesOnFront()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnFront ( bool  ignore)
inline

◆ SetIgnoreModulesRefs()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesRefs ( bool  ignore)
inline

◆ SetIgnoreModulesVals()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesVals ( bool  ignore)
inline

◆ SetIgnoreMTextsMarkedNoShow()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsMarkedNoShow ( bool  ignore)
inline

◆ SetIgnoreMTextsOnBack()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnBack ( bool  ignore)
inline

◆ SetIgnoreMTextsOnFront()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnFront ( bool  ignore)
inline

◆ SetIgnorePadsOnBack()

void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnBack ( bool  ignore)
inline

◆ SetIgnorePadsOnFront()

void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnFront ( bool  ignore)
inline

◆ SetIgnoreThroughHolePads()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreThroughHolePads ( bool  ignore)
inline

◆ SetIgnoreThroughVias()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreThroughVias ( bool  ignore)
inline

◆ SetIgnoreTracks()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreTracks ( bool  ignore)
inline

Definition at line 477 of file collectors.h.

477{ m_ignoreTracks = ignore; }

References m_ignoreTracks.

Referenced by PCB_BASE_FRAME::GetCollectorsGuide(), and PCB_SELECTION_TOOL::getCollectorsGuide().

◆ SetIgnoreZoneFills()

void GENERAL_COLLECTORS_GUIDE::SetIgnoreZoneFills ( bool  ignore)
inline

Definition at line 480 of file collectors.h.

480{ m_ignoreZoneFills = ignore; }

References m_ignoreZoneFills.

Referenced by BOARD_INSPECTION_TOOL::highlightNet(), and PCB_SELECTION_TOOL::selectPoint().

◆ SetIncludeSecondary()

void GENERAL_COLLECTORS_GUIDE::SetIncludeSecondary ( bool  include)
inline

Definition at line 405 of file collectors.h.

405{ m_includeSecondary = include; }

References m_includeSecondary.

◆ SetLayerVisible()

void GENERAL_COLLECTORS_GUIDE::SetLayerVisible ( PCB_LAYER_ID  aLayerId,
bool  isVisible 
)
inline

Definition at line 381 of file collectors.h.

382 {
383 m_visibleLayers.set( aLayerId, isVisible );
384 }

References m_visibleLayers.

◆ SetLayerVisibleBits()

void GENERAL_COLLECTORS_GUIDE::SetLayerVisibleBits ( LSET  aLayerBits)
inline

Definition at line 385 of file collectors.h.

385{ m_visibleLayers = aLayerBits; }

References m_visibleLayers.

◆ SetOnePixelInIU()

void GENERAL_COLLECTORS_GUIDE::SetOnePixelInIU ( double  aValue)
inline

Definition at line 483 of file collectors.h.

483{ m_onePixelInIU = aValue; }

References m_onePixelInIU.

◆ SetPreferredLayer()

void GENERAL_COLLECTORS_GUIDE::SetPreferredLayer ( PCB_LAYER_ID  aLayer)
inline

Definition at line 391 of file collectors.h.

391{ m_preferredLayer = aLayer; }

References m_preferredLayer.

Referenced by BOARD_INSPECTION_TOOL::highlightNet().

Member Data Documentation

◆ m_ignoreBlindBuriedVias

bool GENERAL_COLLECTORS_GUIDE::m_ignoreBlindBuriedVias
private

◆ m_ignoreFootprintsOnBack

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFootprintsOnBack
private

◆ m_ignoreFootprintsOnFront

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFootprintsOnFront
private

◆ m_ignoreFPReferences

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFPReferences
private

◆ m_ignoreFPTextOnBack

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFPTextOnBack
private

◆ m_ignoreFPTextOnFront

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFPTextOnFront
private

◆ m_ignoreFPValues

bool GENERAL_COLLECTORS_GUIDE::m_ignoreFPValues
private

Definition at line 504 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreFPValues(), and SetIgnoreModulesVals().

◆ m_ignoreHiddenFPText

bool GENERAL_COLLECTORS_GUIDE::m_ignoreHiddenFPText
private

◆ m_ignoreLockedItems

bool GENERAL_COLLECTORS_GUIDE::m_ignoreLockedItems
private

Definition at line 493 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreLockedItems(), and SetIgnoreLockedItems().

◆ m_ignoreMicroVias

bool GENERAL_COLLECTORS_GUIDE::m_ignoreMicroVias
private

Definition at line 508 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreMicroVias(), and SetIgnoreMicroVias().

◆ m_ignorePadsOnBack

bool GENERAL_COLLECTORS_GUIDE::m_ignorePadsOnBack
private

Definition at line 502 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnorePadsOnBack(), and SetIgnorePadsOnBack().

◆ m_ignorePadsOnFront

bool GENERAL_COLLECTORS_GUIDE::m_ignorePadsOnFront
private

Definition at line 501 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnorePadsOnFront(), and SetIgnorePadsOnFront().

◆ m_ignoreThroughHolePads

bool GENERAL_COLLECTORS_GUIDE::m_ignoreThroughHolePads
private

◆ m_ignoreThroughVias

bool GENERAL_COLLECTORS_GUIDE::m_ignoreThroughVias
private

Definition at line 506 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreThroughVias(), and SetIgnoreThroughVias().

◆ m_ignoreTracks

bool GENERAL_COLLECTORS_GUIDE::m_ignoreTracks
private

Definition at line 509 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreTracks(), and SetIgnoreTracks().

◆ m_ignoreZoneFills

bool GENERAL_COLLECTORS_GUIDE::m_ignoreZoneFills
private

Definition at line 510 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IgnoreZoneFills(), and SetIgnoreZoneFills().

◆ m_includeSecondary

bool GENERAL_COLLECTORS_GUIDE::m_includeSecondary
private

Definition at line 494 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IncludeSecondary(), and SetIncludeSecondary().

◆ m_onePixelInIU

double GENERAL_COLLECTORS_GUIDE::m_onePixelInIU
private

Definition at line 512 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), OnePixelInIU(), and SetOnePixelInIU().

◆ m_preferredLayer

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::m_preferredLayer
private

Definition at line 489 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), GetPreferredLayer(), and SetPreferredLayer().

◆ m_visibleLayers

LSET GENERAL_COLLECTORS_GUIDE::m_visibleLayers
private

bit-mapped layer visible bits

Definition at line 491 of file collectors.h.

Referenced by GENERAL_COLLECTORS_GUIDE(), IsLayerVisible(), SetLayerVisible(), and SetLayerVisibleBits().


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