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 IsLayerLocked (PCB_LAYER_ID aLayerId) const override
 
void SetLayerLocked (PCB_LAYER_ID aLayerId, bool isLocked)
 
bool IsLayerVisible (PCB_LAYER_ID aLayerId) const override
 
void SetLayerVisible (PCB_LAYER_ID aLayerId, bool isVisible)
 
void SetLayerVisibleBits (LSET aLayerBits)
 
bool IgnoreLockedLayers () const override
 
void SetIgnoreLockedLayers (bool ignore)
 
bool IgnoreNonVisibleLayers () const override
 
void SetIgnoreNonVisibleLayers (bool ignore)
 
PCB_LAYER_ID GetPreferredLayer () const override
 
void SetPreferredLayer (PCB_LAYER_ID aLayer)
 
bool IgnorePreferredLayer () const override
 Provide wildcard behavior regarding the preferred layer. More...
 
void SetIgnorePreferredLayer (bool ignore)
 
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 IgnoreMTextsMarkedNoShow () const override
 
void SetIgnoreMTextsMarkedNoShow (bool ignore)
 
bool IgnoreMTextsOnBack () const override
 
void SetIgnoreMTextsOnBack (bool ignore)
 
bool IgnoreMTextsOnFront () const override
 
void SetIgnoreMTextsOnFront (bool ignore)
 
bool IgnoreModulesOnBack () const override
 
void SetIgnoreModulesOnBack (bool ignore)
 
bool IgnoreModulesOnFront () 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 IgnoreModulesVals () const override
 
void SetIgnoreModulesVals (bool ignore)
 
bool IgnoreModulesRefs () 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
 
virtual bool IgnorePads () const
 

Private Attributes

PCB_LAYER_ID m_PreferredLayer
 
bool m_IgnorePreferredLayer
 
LSET m_LayerLocked
 bit-mapped layer locked bits More...
 
bool m_IgnoreLockedLayers
 
LSET m_LayerVisible
 bit-mapped layer visible bits More...
 
bool m_IgnoreNonVisibleLayers
 
bool m_IgnoreLockedItems
 
bool m_IncludeSecondary
 
bool m_IgnoreMTextsMarkedNoShow
 
bool m_IgnoreMTextsOnBack
 
bool m_IgnoreMTextsOnFront
 
bool m_IgnoreModulesOnBack
 
bool m_IgnoreModulesOnFront
 
bool m_IgnorePadsOnFront
 
bool m_IgnorePadsOnBack
 
bool m_IgnoreThroughHolePads
 
bool m_IgnoreModulesVals
 
bool m_IgnoreModulesRefs
 
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 391 of file collectors.h.

Constructor & Destructor Documentation

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
aVisibleLayerMask= current visible layers (bit mask)
aPreferredLayer= the layer to search first

Definition at line 437 of file collectors.h.

References KIGFX::VIEW::ToWorld(), and VECTOR2< T >::x.

439  {
440  VECTOR2I one( 1, 1 );
441 
442  m_PreferredLayer = aPreferredLayer;
443  m_IgnorePreferredLayer = false;
444  m_LayerVisible = aVisibleLayerMask;
445  m_IgnoreLockedLayers = true;
447  m_IgnoreLockedItems = false;
448 
449 #if defined(USE_MATCH_LAYER)
450  m_IncludeSecondary = false;
451 #else
452  m_IncludeSecondary = true;
453 #endif
454 
455  m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor;
456  m_IgnoreMTextsOnBack = true;
457  m_IgnoreMTextsOnFront = false;
458  m_IgnoreModulesOnBack = true; // !Show_Modules_Cmp;
459  m_IgnoreModulesOnFront = false;
460 
461  m_IgnorePadsOnFront = false;
462  m_IgnorePadsOnBack = false;
463  m_IgnoreThroughHolePads = false;
464 
465  m_IgnoreModulesVals = false;
466  m_IgnoreModulesRefs = false;
467 
468  m_IgnoreThroughVias = false;
469  m_IgnoreBlindBuriedVias = false;
470  m_IgnoreMicroVias = false;
471  m_IgnoreTracks = false;
472  m_IgnoreZoneFills = true;
473 
474  m_OnePixelInIU = aView->ToWorld( one, false ).x;
475  }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:397
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Function ToWorld() Converts a screen space point/vector to a point/vector in world space coordinates...
Definition: view.cpp:474
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:403

Member Function Documentation

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

Implements COLLECTORS_GUIDE.

Definition at line 518 of file collectors.h.

518 { return m_PreferredLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:397
bool GENERAL_COLLECTORS_GUIDE::IgnoreBlindBuriedVias ( ) const
inlineoverridevirtual
Returns
true if should ignore blind/buried vias

Implements COLLECTORS_GUIDE.

Definition at line 606 of file collectors.h.

606 { return m_IgnoreBlindBuriedVias; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedItems ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore locked items, else false.

Implements COLLECTORS_GUIDE.

Definition at line 532 of file collectors.h.

532 { return m_IgnoreLockedItems; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedLayers ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore locked layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 506 of file collectors.h.

506 { return m_IgnoreLockedLayers; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMicroVias ( ) const
inlineoverridevirtual
Returns
true if should ignore micro vias

Implements COLLECTORS_GUIDE.

Definition at line 609 of file collectors.h.

609 { return m_IgnoreMicroVias; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnBack ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MODULEs on the back side

Implements COLLECTORS_GUIDE.

Definition at line 564 of file collectors.h.

564 { return m_IgnoreModulesOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MODULEs on component layer.

Implements COLLECTORS_GUIDE.

Definition at line 570 of file collectors.h.

570 { return m_IgnoreModulesOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesRefs ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore modules references.

Implements COLLECTORS_GUIDE.

Definition at line 600 of file collectors.h.

600 { return m_IgnoreModulesRefs; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesVals ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore modules values.

Implements COLLECTORS_GUIDE.

Definition at line 594 of file collectors.h.

594 { return m_IgnoreModulesVals; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsMarkedNoShow ( ) const
inlineoverridevirtual
Returns
bool - true if MTexts marked as "no show" should be ignored.

Implements COLLECTORS_GUIDE.

Definition at line 546 of file collectors.h.

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

Implements COLLECTORS_GUIDE.

Definition at line 552 of file collectors.h.

552 { return m_IgnoreMTextsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MTexts on front layers

Implements COLLECTORS_GUIDE.

Definition at line 558 of file collectors.h.

558 { return m_IgnoreMTextsOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreNonVisibleLayers ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore non-visible layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 512 of file collectors.h.

512 { return m_IgnoreNonVisibleLayers; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnBack ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore Pads on Back Side.

Implements COLLECTORS_GUIDE.

Definition at line 576 of file collectors.h.

576 { return m_IgnorePadsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore PADSs on Front Side.

Implements COLLECTORS_GUIDE.

Definition at line 582 of file collectors.h.

582 { return m_IgnorePadsOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePreferredLayer ( ) const
inlineoverridevirtual

Provide wildcard behavior regarding the preferred layer.

Returns
bool - true if should ignore preferred layer, else false.

Implements COLLECTORS_GUIDE.

Definition at line 526 of file collectors.h.

526 { return m_IgnorePreferredLayer; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreThroughHolePads ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore through-hole PADSs.

Implements COLLECTORS_GUIDE.

Definition at line 588 of file collectors.h.

588 { return m_IgnoreThroughHolePads; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreThroughVias ( ) const
inlineoverridevirtual
Returns
true if should ignore through-hole vias

Implements COLLECTORS_GUIDE.

Definition at line 603 of file collectors.h.

603 { return m_IgnoreThroughVias; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreTracks ( ) const
inlineoverridevirtual
Returns
true if should ignore tracks

Implements COLLECTORS_GUIDE.

Definition at line 612 of file collectors.h.

612 { return m_IgnoreTracks; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreZoneFills ( ) const
inlineoverridevirtual
Returns
true if should ignore the interiors of zones

Implements COLLECTORS_GUIDE.

Definition at line 615 of file collectors.h.

615 { return m_IgnoreZoneFills; }
bool GENERAL_COLLECTORS_GUIDE::IncludeSecondary ( ) const
inlineoverridevirtual

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

Returns
bool - true if should include, else false.

Implements COLLECTORS_GUIDE.

Definition at line 540 of file collectors.h.

540 { return m_IncludeSecondary; }
bool GENERAL_COLLECTORS_GUIDE::IsLayerLocked ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual
Returns
bool - true if the given layer is locked, else false.

Implements COLLECTORS_GUIDE.

Definition at line 480 of file collectors.h.

481  {
482  return m_LayerLocked[aLayerId];
483  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:400
bool GENERAL_COLLECTORS_GUIDE::IsLayerVisible ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual
Returns
bool - true if the given layer is visible, else false.

Implements COLLECTORS_GUIDE.

Definition at line 493 of file collectors.h.

494  {
495  return m_LayerVisible[aLayerId];
496  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:403
double GENERAL_COLLECTORS_GUIDE::OnePixelInIU ( ) const
inlineoverridevirtual
void GENERAL_COLLECTORS_GUIDE::SetIgnoreBlindBuriedVias ( bool  ignore)
inline

Definition at line 607 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

607 { m_IgnoreBlindBuriedVias = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedItems ( bool  ignore)
inline

Definition at line 533 of file collectors.h.

533 { m_IgnoreLockedItems = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedLayers ( bool  ignore)
inline

Definition at line 507 of file collectors.h.

507 { m_IgnoreLockedLayers = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMicroVias ( bool  ignore)
inline

Definition at line 610 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

610 { m_IgnoreMicroVias = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnBack ( bool  ignore)
inline

Definition at line 565 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

565 { m_IgnoreModulesOnBack = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnFront ( bool  ignore)
inline

Definition at line 571 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

571 { m_IgnoreModulesOnFront = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesRefs ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesVals ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsMarkedNoShow ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnBack ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnFront ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreNonVisibleLayers ( bool  ignore)
inline

Definition at line 513 of file collectors.h.

513 { m_IgnoreLockedLayers = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnBack ( bool  ignore)
inline

Definition at line 577 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

577 { m_IgnorePadsOnBack = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnFront ( bool  ignore)
inline

Definition at line 583 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

583 { m_IgnorePadsOnFront = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePreferredLayer ( bool  ignore)
inline

Definition at line 527 of file collectors.h.

527 { m_IgnorePreferredLayer = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreThroughHolePads ( bool  ignore)
inline

Definition at line 589 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

589 { m_IgnoreThroughHolePads = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreThroughVias ( bool  ignore)
inline

Definition at line 604 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

604 { m_IgnoreThroughVias = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreTracks ( bool  ignore)
inline

Definition at line 613 of file collectors.h.

Referenced by SELECTION_TOOL::getCollectorsGuide().

613 { m_IgnoreTracks = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreZoneFills ( bool  ignore)
inline

Definition at line 616 of file collectors.h.

616 { m_IgnoreZoneFills = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIncludeSecondary ( bool  include)
inline

Definition at line 541 of file collectors.h.

541 { m_IncludeSecondary = include; }
void GENERAL_COLLECTORS_GUIDE::SetLayerLocked ( PCB_LAYER_ID  aLayerId,
bool  isLocked 
)
inline

Definition at line 485 of file collectors.h.

486  {
487  m_LayerLocked.set( aLayerId, isLocked );
488  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:400
void GENERAL_COLLECTORS_GUIDE::SetLayerVisible ( PCB_LAYER_ID  aLayerId,
bool  isVisible 
)
inline

Definition at line 497 of file collectors.h.

498  {
499  m_LayerVisible.set( aLayerId, isVisible );
500  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:403
void GENERAL_COLLECTORS_GUIDE::SetLayerVisibleBits ( LSET  aLayerBits)
inline

Definition at line 501 of file collectors.h.

501 { m_LayerVisible = aLayerBits; }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:403
void GENERAL_COLLECTORS_GUIDE::SetPreferredLayer ( PCB_LAYER_ID  aLayer)
inline

Definition at line 519 of file collectors.h.

519 { m_PreferredLayer = aLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:397

Member Data Documentation

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreBlindBuriedVias
private

Definition at line 420 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedItems
private

Definition at line 406 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedLayers
private

Definition at line 401 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMicroVias
private

Definition at line 421 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnBack
private

Definition at line 412 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnFront
private

Definition at line 413 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesRefs
private

Definition at line 418 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesVals
private

Definition at line 417 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsMarkedNoShow
private

Definition at line 409 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnBack
private

Definition at line 410 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnFront
private

Definition at line 411 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreNonVisibleLayers
private

Definition at line 404 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnBack
private

Definition at line 415 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnFront
private

Definition at line 414 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePreferredLayer
private

Definition at line 398 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreThroughHolePads
private

Definition at line 416 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreThroughVias
private

Definition at line 419 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreTracks
private

Definition at line 422 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreZoneFills
private

Definition at line 423 of file collectors.h.

bool GENERAL_COLLECTORS_GUIDE::m_IncludeSecondary
private

Definition at line 407 of file collectors.h.

LSET GENERAL_COLLECTORS_GUIDE::m_LayerLocked
private

bit-mapped layer locked bits

Definition at line 400 of file collectors.h.

LSET GENERAL_COLLECTORS_GUIDE::m_LayerVisible
private

bit-mapped layer visible bits

Definition at line 403 of file collectors.h.

double GENERAL_COLLECTORS_GUIDE::m_OnePixelInIU
private

Definition at line 425 of file collectors.h.

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::m_PreferredLayer
private

Definition at line 397 of file collectors.h.


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