KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TEST_MARKER Class Reference
Inheritance diagram for TEST_MARKER:
MARKER_BASE

Public Types

enum  MARKER_T {
  MARKER_UNSPEC , MARKER_ERC , MARKER_DRC , MARKER_DRAWING_SHEET ,
  MARKER_RATSNEST , MARKER_PARITY , MARKER_SIMUL
}
 

Public Member Functions

 TEST_MARKER (std::shared_ptr< RC_ITEM > aItem)
 
const KIID GetUUID () const override
 
KIGFX::COLOR4D getColor () const override
 
int MarkerScale () const
 The scaling factor to convert polygonal shape coordinates to internal units.
 
void SetMarkerScale (int aScale) const
 
void ShapeToPolygon (SHAPE_LINE_CHAIN &aPolygon, int aScale=-1) const
 Return the shape polygon in internal units in a SHAPE_LINE_CHAIN the coordinates are relatives to the marker position (are not absolute).
 
const VECTOR2IGetPos () const
 
void SetMarkerType (enum MARKER_T aMarkerType)
 Accessors to set/get marker type (DRC, ERC, or other)
 
enum MARKER_T GetMarkerType () const
 
bool IsExcluded () const
 
void SetExcluded (bool aExcluded, const wxString &aComment=wxEmptyString)
 
wxString GetComment () const
 
virtual SEVERITY GetSeverity () const
 
bool IsTreatedAsExcluded () const
 A marker is treated as excluded when the user has dismissed it through the DRC UI (m_excluded) or when a custom rule has pinned its severity to "exclusion".
 
std::shared_ptr< RC_ITEMGetRCItem () const
 
bool HitTestMarker (const VECTOR2I &aHitPosition, int aAccuracy) const
 Test if the given VECTOR2I is within the bounds of this object.
 
bool HitTestMarker (const BOX2I &aRect, bool aContained, int aAccuracy=0) const
 Test if the given BOX2I intersects or contains the bounds of this object.
 
bool HitTestMarker (const SHAPE_LINE_CHAIN &aPoly, bool aContained) const
 Test if the given SHAPE_LINE_CHAIN intersects or contains the bounds of this object.
 
BOX2I GetBoundingBoxMarker () const
 Return the orthogonal, bounding box of this object for display purposes.
 

Public Attributes

KIID m_uuid
 
VECTOR2I m_Pos
 Position of the marker.
 

Protected Attributes

MARKER_T m_markerType
 The type of marker.
 
bool m_excluded
 User has excluded this specific error.
 
wxString m_comment
 User supplied comment.
 
std::shared_ptr< RC_ITEMm_rcItem
 
int m_scalingFactor
 Scaling factor to convert corners coordinates to internal units.
 
BOX2I m_shapeBoundingBox
 Bounding box of the graphic symbol relative to the position of the shape in marker shape units.
 

Detailed Description

Definition at line 66 of file test_rc_tree_model.cpp.

Member Enumeration Documentation

◆ MARKER_T

enum MARKER_BASE::MARKER_T
inherited
Enumerator
MARKER_UNSPEC 
MARKER_ERC 
MARKER_DRC 
MARKER_DRAWING_SHEET 
MARKER_RATSNEST 
MARKER_PARITY 
MARKER_SIMUL 

Definition at line 47 of file marker_base.h.

Constructor & Destructor Documentation

◆ TEST_MARKER()

TEST_MARKER::TEST_MARKER ( std::shared_ptr< RC_ITEM > aItem)
inline

Definition at line 69 of file test_rc_tree_model.cpp.

References MARKER_BASE::MARKER_BASE(), and move.

Member Function Documentation

◆ GetBoundingBoxMarker()

BOX2I MARKER_BASE::GetBoundingBoxMarker ( ) const
inherited

Return the orthogonal, bounding box of this object for display purposes.

This box should be an enclosing perimeter for visible components of this object, and the units should be in the pcb or schematic coordinate system. It is OK to overestimate the size by a few counts.

Definition at line 137 of file marker_base.cpp.

References BOX2< Vec >::GetSize(), m_Pos, m_scalingFactor, and m_shapeBoundingBox.

Referenced by PCB_MARKER::GetBoundingBox(), SCH_MARKER::GetBoundingBox(), HitTestMarker(), and HitTestMarker().

◆ getColor()

KIGFX::COLOR4D TEST_MARKER::getColor ( ) const
inlineoverridevirtual

Implements MARKER_BASE.

Definition at line 75 of file test_rc_tree_model.cpp.

◆ GetComment()

wxString MARKER_BASE::GetComment ( ) const
inlineinherited

◆ GetMarkerType()

◆ GetPos()

const VECTOR2I & MARKER_BASE::GetPos ( ) const
inlineinherited
Returns
the position of this marker in internal units.

Definition at line 79 of file marker_base.h.

References m_Pos.

Referenced by PCB_SELECTION_TOOL::hitTestDistance(), and DIALOG_DRC::OnDRCItemSelected().

◆ GetRCItem()

◆ GetSeverity()

virtual SEVERITY MARKER_BASE::GetSeverity ( ) const
inlinevirtualinherited

◆ GetUUID()

const KIID TEST_MARKER::GetUUID ( ) const
inlineoverridevirtual

Implements MARKER_BASE.

Definition at line 74 of file test_rc_tree_model.cpp.

References m_uuid.

◆ HitTestMarker() [1/3]

bool MARKER_BASE::HitTestMarker ( const BOX2I & aRect,
bool aContained,
int aAccuracy = 0 ) const
inherited

Test if the given BOX2I intersects or contains the bounds of this object.

Definition at line 103 of file marker_base.cpp.

References BOX2< Vec >::Contains(), GetBoundingBoxMarker(), BOX2< Vec >::GetInflated(), and BOX2< Vec >::Intersects().

◆ HitTestMarker() [2/3]

bool MARKER_BASE::HitTestMarker ( const SHAPE_LINE_CHAIN & aPoly,
bool aContained ) const
inherited

Test if the given SHAPE_LINE_CHAIN intersects or contains the bounds of this object.

Definition at line 114 of file marker_base.cpp.

References m_Pos, SHAPE_LINE_CHAIN::Move(), KIGEOM::ShapeHitTest(), and ShapeToPolygon().

◆ HitTestMarker() [3/3]

bool MARKER_BASE::HitTestMarker ( const VECTOR2I & aHitPosition,
int aAccuracy ) const
inherited

Test if the given VECTOR2I is within the bounds of this object.

Parameters
aHitPositionis the VECTOR2I to test (in internal units).
Returns
true if a hit, else false.

Definition at line 84 of file marker_base.cpp.

References BOX2< Vec >::Contains(), GetBoundingBoxMarker(), BOX2< Vec >::GetInflated(), m_Pos, SHAPE_LINE_CHAIN::PointInside(), and ShapeToPolygon().

Referenced by PCB_MARKER::HitTest(), PCB_MARKER::HitTest(), PCB_MARKER::HitTest(), and SCH_MARKER::HitTest().

◆ IsExcluded()

◆ IsTreatedAsExcluded()

bool MARKER_BASE::IsTreatedAsExcluded ( ) const
inlineinherited

A marker is treated as excluded when the user has dismissed it through the DRC UI (m_excluded) or when a custom rule has pinned its severity to "exclusion".

Definition at line 104 of file marker_base.h.

References GetSeverity(), m_excluded, and RPT_SEVERITY_EXCLUSION.

◆ MarkerScale()

int MARKER_BASE::MarkerScale ( ) const
inlineinherited

The scaling factor to convert polygonal shape coordinates to internal units.

Definition at line 65 of file marker_base.h.

References m_scalingFactor.

Referenced by KIGFX::PCB_PAINTER::draw(), PCB_MARKER::GetShapes(), and ShapeToPolygon().

◆ SetExcluded()

◆ SetMarkerScale()

void MARKER_BASE::SetMarkerScale ( int aScale) const
inlineinherited

Definition at line 66 of file marker_base.h.

References m_scalingFactor.

Referenced by PCB_MARKER::SetZoom().

◆ SetMarkerType()

void MARKER_BASE::SetMarkerType ( enum MARKER_T aMarkerType)
inlineinherited

Accessors to set/get marker type (DRC, ERC, or other)

Definition at line 86 of file marker_base.h.

References m_markerType.

Referenced by PCB_MARKER::PCB_MARKER().

◆ ShapeToPolygon()

void MARKER_BASE::ShapeToPolygon ( SHAPE_LINE_CHAIN & aPolygon,
int aScale = -1 ) const
inherited

Return the shape polygon in internal units in a SHAPE_LINE_CHAIN the coordinates are relatives to the marker position (are not absolute).

Parameters
aPolygonis the SHAPE_LINE_CHAIN to fill with the shape.

Definition at line 124 of file marker_base.cpp.

References SHAPE_LINE_CHAIN::Append(), MarkerScale(), MarkerShapeCorners, and SHAPE_LINE_CHAIN::SetClosed().

Referenced by KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), FOOTPRINT::GetCoverageArea(), PCB_SELECTION_TOOL::hitTestDistance(), HitTestMarker(), and HitTestMarker().

Member Data Documentation

◆ m_comment

wxString MARKER_BASE::m_comment
protectedinherited

User supplied comment.

Definition at line 150 of file marker_base.h.

Referenced by GetComment(), PCB_MARKER::GetMsgPanelInfo(), SCH_MARKER::GetMsgPanelInfo(), SetExcluded(), and SCH_MARKER::swapData().

◆ m_excluded

bool MARKER_BASE::m_excluded
protectedinherited

User has excluded this specific error.

Definition at line 149 of file marker_base.h.

Referenced by IsExcluded(), IsTreatedAsExcluded(), MARKER_BASE(), SetExcluded(), and SCH_MARKER::swapData().

◆ m_markerType

MARKER_T MARKER_BASE::m_markerType
protectedinherited

The type of marker.

Definition at line 148 of file marker_base.h.

Referenced by GetMarkerType(), MARKER_BASE(), SetMarkerType(), and SCH_MARKER::swapData().

◆ m_Pos

◆ m_rcItem

◆ m_scalingFactor

int MARKER_BASE::m_scalingFactor
mutableprotectedinherited

Scaling factor to convert corners coordinates to internal units.

Dependant on current zoom.

Definition at line 153 of file marker_base.h.

Referenced by GetBoundingBoxMarker(), MARKER_BASE(), MarkerScale(), SetMarkerScale(), and SCH_MARKER::swapData().

◆ m_shapeBoundingBox

BOX2I MARKER_BASE::m_shapeBoundingBox
protectedinherited

Bounding box of the graphic symbol relative to the position of the shape in marker shape units.

Definition at line 155 of file marker_base.h.

Referenced by GetBoundingBoxMarker(), MARKER_BASE(), and SCH_MARKER::swapData().

◆ m_uuid

KIID TEST_MARKER::m_uuid

Definition at line 77 of file test_rc_tree_model.cpp.

Referenced by GetUUID().


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