KiCad PCB EDA Suite
PNS_PCBNEW_DEBUG_DECORATOR Class Reference
Inheritance diagram for PNS_PCBNEW_DEBUG_DECORATOR:
PNS::DEBUG_DECORATOR

Public Member Functions

 PNS_PCBNEW_DEBUG_DECORATOR (KIGFX::VIEW *aView=nullptr)
 
 ~PNS_PCBNEW_DEBUG_DECORATOR ()
 
void SetView (KIGFX::VIEW *aView)
 
virtual void AddPoint (const VECTOR2I &aP, const KIGFX::COLOR4D &aColor, int aSize, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
 
void Clear () override
 
void SetDebugEnabled (bool aEnabled)
 
bool IsDebugEnabled () const
 
virtual void SetIteration (int iter)
 
virtual void Message (const wxString &msg, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
virtual void NewStage (const wxString &name, int iter, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
virtual void BeginGroup (const wxString &name, int aLevel=0, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
virtual void EndGroup (const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
virtual void AddItem (const ITEM *aItem, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
virtual void AddShape (const SHAPE *aShape, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
void AddShape (const BOX2I &aBox, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 
void AddShape (const SEG &aSeg, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
 

Private Attributes

KIGFX::VIEWm_view
 
KIGFX::VIEW_GROUPm_items
 
bool m_debugEnabled
 

Detailed Description

Definition at line 808 of file pns_kicad_iface.cpp.

Constructor & Destructor Documentation

◆ PNS_PCBNEW_DEBUG_DECORATOR()

PNS_PCBNEW_DEBUG_DECORATOR::PNS_PCBNEW_DEBUG_DECORATOR ( KIGFX::VIEW aView = nullptr)
inline

Definition at line 811 of file pns_kicad_iface.cpp.

811 :
813 m_view( nullptr ),
814 m_items( nullptr )
815 {
816 SetView( aView );
817 }
KIGFX::VIEW_GROUP * m_items
void SetView(KIGFX::VIEW *aView)

References SetView().

◆ ~PNS_PCBNEW_DEBUG_DECORATOR()

PNS_PCBNEW_DEBUG_DECORATOR::~PNS_PCBNEW_DEBUG_DECORATOR ( )
inline

Definition at line 819 of file pns_kicad_iface.cpp.

820 {
822 delete m_items;
823 }

References Clear(), and m_items.

Member Function Documentation

◆ AddItem()

virtual void PNS::DEBUG_DECORATOR::AddItem ( const ITEM aItem,
const KIGFX::COLOR4D aColor,
int  aOverrideWidth = 0,
const wxString &  aName = wxT( "" ),
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 79 of file pns_debug_decorator.h.

82 {};

◆ AddPoint()

virtual void PNS_PCBNEW_DEBUG_DECORATOR::AddPoint ( const VECTOR2I aP,
const KIGFX::COLOR4D aColor,
int  aSize,
const wxString &  aName = wxT( "" ),
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlineoverridevirtual

Reimplemented from PNS::DEBUG_DECORATOR.

Definition at line 840 of file pns_kicad_iface.cpp.

844 {
845 #if 0
847
848 l.Append( aP - VECTOR2I( -aSize, -aSize ) );
849 l.Append( aP + VECTOR2I( -aSize, -aSize ) );
850
851 AddLine( l, aColor, 10000, aName );
852
853 l.Clear();
854 l.Append( aP - VECTOR2I( aSize, -aSize ) );
855 l.Append( aP + VECTOR2I( aSize, -aSize ) );
856
857 AddLine( l, aColor, 10000, aName );
858 #endif
859 }
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Clear()
Remove all points from the line chain.
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618

References SHAPE_LINE_CHAIN::Append(), and SHAPE_LINE_CHAIN::Clear().

◆ AddShape() [1/3]

void PNS::DEBUG_DECORATOR::AddShape ( const BOX2I aBox,
const KIGFX::COLOR4D aColor,
int  aOverrideWidth = 0,
const wxString &  aName = wxT( "" ),
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlineinherited

Definition at line 89 of file pns_debug_decorator.h.

93 {
94 SHAPE_RECT r( aBox );
95 AddShape( &r, aColor, aOverrideWidth, aName, aSrcLoc );
96 }
virtual void AddShape(const SHAPE *aShape, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO())
E_SERIE r
Definition: eserie.cpp:41

References PNS::DEBUG_DECORATOR::AddShape(), and r.

◆ AddShape() [2/3]

void PNS::DEBUG_DECORATOR::AddShape ( const SEG aSeg,
const KIGFX::COLOR4D aColor,
int  aOverrideWidth = 0,
const wxString &  aName = wxT( "" ),
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlineinherited

Definition at line 98 of file pns_debug_decorator.h.

102 {
104 lc.Append( aSeg.A );
105 lc.Append( aSeg.B );
106 AddShape( &lc, aColor, aOverrideWidth, aName, aSrcLoc );
107 }
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References SEG::A, PNS::DEBUG_DECORATOR::AddShape(), SHAPE_LINE_CHAIN::Append(), and SEG::B.

◆ AddShape() [3/3]

virtual void PNS::DEBUG_DECORATOR::AddShape ( const SHAPE aShape,
const KIGFX::COLOR4D aColor,
int  aOverrideWidth = 0,
const wxString &  aName = wxT( "" ),
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 84 of file pns_debug_decorator.h.

87 {};

Referenced by PNS::DEBUG_DECORATOR::AddShape().

◆ BeginGroup()

virtual void PNS::DEBUG_DECORATOR::BeginGroup ( const wxString &  name,
int  aLevel = 0,
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 70 of file pns_debug_decorator.h.

71 {};

◆ Clear()

void PNS_PCBNEW_DEBUG_DECORATOR::Clear ( )
inlineoverridevirtual

Reimplemented from PNS::DEBUG_DECORATOR.

Definition at line 861 of file pns_kicad_iface.cpp.

862 {
863 if( m_view && m_items )
864 {
867 }
868 }
void FreeItems()
Free all the items that were added to the group.
Definition: view_group.cpp:191
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: view.cpp:1574

References KIGFX::VIEW_GROUP::FreeItems(), m_items, m_view, and KIGFX::VIEW::Update().

Referenced by SetView(), and ~PNS_PCBNEW_DEBUG_DECORATOR().

◆ EndGroup()

virtual void PNS::DEBUG_DECORATOR::EndGroup ( const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO())
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 73 of file pns_debug_decorator.h.

73{};

◆ IsDebugEnabled()

bool PNS::DEBUG_DECORATOR::IsDebugEnabled ( ) const
inlineinherited

Definition at line 60 of file pns_debug_decorator.h.

References PNS::DEBUG_DECORATOR::m_debugEnabled.

◆ Message()

virtual void PNS::DEBUG_DECORATOR::Message ( const wxString &  msg,
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 64 of file pns_debug_decorator.h.

65 {};

◆ NewStage()

virtual void PNS::DEBUG_DECORATOR::NewStage ( const wxString &  name,
int  iter,
const SRC_LOCATION_INFO aSrcLoc = SRC_LOCATION_INFO() 
)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 67 of file pns_debug_decorator.h.

68 {};

◆ SetDebugEnabled()

void PNS::DEBUG_DECORATOR::SetDebugEnabled ( bool  aEnabled)
inlineinherited

◆ SetIteration()

virtual void PNS::DEBUG_DECORATOR::SetIteration ( int  iter)
inlinevirtualinherited

Reimplemented in PNS_TEST_DEBUG_DECORATOR.

Definition at line 62 of file pns_debug_decorator.h.

62{};

Referenced by PNS::SHOVE::shoveIteration().

◆ SetView()

void PNS_PCBNEW_DEBUG_DECORATOR::SetView ( KIGFX::VIEW aView)
inline

Definition at line 825 of file pns_kicad_iface.cpp.

826 {
827 Clear();
828 delete m_items;
829 m_items = nullptr;
830 m_view = aView;
831
832 if( m_view == nullptr )
833 return;
834
837 m_view->Add( m_items );
838 }
Extend VIEW_ITEM by possibility of grouping items into a single object.
Definition: view_group.h:47
virtual void SetLayer(int aLayer)
Set layer used to draw the group.
Definition: view_group.h:98
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Definition: view.cpp:316
@ LAYER_SELECT_OVERLAY
currently selected items overlay
Definition: layer_ids.h:219

References KIGFX::VIEW::Add(), Clear(), LAYER_SELECT_OVERLAY, m_items, m_view, and KIGFX::VIEW_GROUP::SetLayer().

Referenced by PNS_PCBNEW_DEBUG_DECORATOR().

Member Data Documentation

◆ m_debugEnabled

bool PNS::DEBUG_DECORATOR::m_debugEnabled
privateinherited

◆ m_items

KIGFX::VIEW_GROUP* PNS_PCBNEW_DEBUG_DECORATOR::m_items
private

Definition at line 872 of file pns_kicad_iface.cpp.

Referenced by Clear(), SetView(), and ~PNS_PCBNEW_DEBUG_DECORATOR().

◆ m_view

KIGFX::VIEW* PNS_PCBNEW_DEBUG_DECORATOR::m_view
private

Definition at line 871 of file pns_kicad_iface.cpp.

Referenced by Clear(), and SetView().


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