Naming conventions.

This commit is contained in:
Jeff Young 2020-11-14 18:11:28 +00:00
parent 2d001796a3
commit 7bd31d5237
115 changed files with 472 additions and 574 deletions

View File

@ -33,7 +33,7 @@
#include "cbbox2d.h" #include "cbbox2d.h"
#include <cstring> #include <cstring>
#include <class_board_item.h> #include <board_item.h>
enum class INTERSECTION_RESULT enum class INTERSECTION_RESULT
{ {

View File

@ -34,7 +34,7 @@
#include "../hitinfo.h" #include "../hitinfo.h"
#include "../cmaterial.h" #include "../cmaterial.h"
#include <class_board_item.h> #include <board_item.h>
enum class OBJECT3D_TYPE enum class OBJECT3D_TYPE
{ {

View File

@ -502,12 +502,12 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp
${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.cpp
${CMAKE_SOURCE_DIR}/pcbnew/board.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board.cpp
${CMAKE_SOURCE_DIR}/pcbnew/class_board_item.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/dimension.cpp ${CMAKE_SOURCE_DIR}/pcbnew/dimension.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp
${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.cpp ${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_group.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_group.cpp
${CMAKE_SOURCE_DIR}/pcbnew/class_marker_pcb.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_marker.cpp
${CMAKE_SOURCE_DIR}/pcbnew/footprint.cpp ${CMAKE_SOURCE_DIR}/pcbnew/footprint.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp

View File

@ -79,7 +79,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
m_gridSelectBox = NULL; m_gridSelectBox = NULL;
m_zoomSelectBox = NULL; m_zoomSelectBox = NULL;
m_firstRunDialogSetting = 0; m_firstRunDialogSetting = 0;
m_UndoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS; m_undoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS;
m_canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE; m_canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE;
m_canvas = NULL; m_canvas = NULL;
@ -92,9 +92,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas: m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas:
// BLACK for Pcbnew, BLACK or WHITE for Eeschema // BLACK for Pcbnew, BLACK or WHITE for Eeschema
m_colorSettings = nullptr; m_colorSettings = nullptr;
m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
m_userUnits = EDA_UNITS::MILLIMETRES; m_userUnits = EDA_UNITS::MILLIMETRES;
m_PolarCoords = false; m_polarCoords = false;
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN ); m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
m_auimgr.SetFlags(wxAUI_MGR_DEFAULT); m_auimgr.SetFlags(wxAUI_MGR_DEFAULT);
@ -137,10 +137,10 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
// Create child subwindows. // Create child subwindows.
GetClientSize( &m_FrameSize.x, &m_FrameSize.y ); GetClientSize( &m_FrameSize.x, &m_FrameSize.y );
m_FramePos.x = m_FramePos.y = 0; m_FramePos.x = m_FramePos.y = 0;
m_FrameSize.y -= m_MsgFrameHeight; m_FrameSize.y -= m_msgFrameHeight;
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ), m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ),
wxSize( m_FrameSize.x, m_MsgFrameHeight ) ); wxSize( m_FrameSize.x, m_msgFrameHeight ) );
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() ); m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
} }
@ -541,7 +541,7 @@ void EDA_DRAW_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
// Read units used in dialogs and toolbars // Read units used in dialogs and toolbars
SetUserUnits( static_cast<EDA_UNITS>( aCfg->m_System.units ) ); SetUserUnits( static_cast<EDA_UNITS>( aCfg->m_System.units ) );
m_UndoRedoCountMax = aCfg->m_System.max_undo_items; m_undoRedoCountMax = aCfg->m_System.max_undo_items;
m_firstRunDialogSetting = aCfg->m_System.first_run_shown; m_firstRunDialogSetting = aCfg->m_System.first_run_shown;
m_galDisplayOptions.ReadConfig( *cmnCfg, *window, this ); m_galDisplayOptions.ReadConfig( *cmnCfg, *window, this );

View File

@ -49,30 +49,30 @@ static const BITMAP_OPAQUE dummy_xpm[1] = {{ dummy_png, sizeof( dummy_png ), "du
EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) : EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) :
m_StructType( idType ), m_structType( idType ),
m_Status( 0 ), m_status( 0 ),
m_Parent( parent ), m_parent( parent ),
m_forceVisible( false ), m_forceVisible( false ),
m_Flags( 0 ) m_flags( 0 )
{ } { }
EDA_ITEM::EDA_ITEM( KICAD_T idType ) : EDA_ITEM::EDA_ITEM( KICAD_T idType ) :
m_StructType( idType ), m_structType( idType ),
m_Status( 0 ), m_status( 0 ),
m_Parent( nullptr ), m_parent( nullptr ),
m_forceVisible( false ), m_forceVisible( false ),
m_Flags( 0 ) m_flags( 0 )
{ } { }
EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) : EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) :
m_Uuid( base.m_Uuid ), m_Uuid( base.m_Uuid ),
m_StructType( base.m_StructType ), m_structType( base.m_structType ),
m_Status( base.m_Status ), m_status( base.m_status ),
m_Parent( base.m_Parent ), m_parent( base.m_parent ),
m_forceVisible( base.m_forceVisible ), m_forceVisible( base.m_forceVisible ),
m_Flags( base.m_Flags ) m_flags( base.m_flags )
{ } { }
@ -81,8 +81,8 @@ void EDA_ITEM::SetModified()
SetFlags( IS_CHANGED ); SetFlags( IS_CHANGED );
// If this a child object, then the parent modification state also needs to be set. // If this a child object, then the parent modification state also needs to be set.
if( m_Parent ) if( m_parent )
m_Parent->SetModified(); m_parent->SetModified();
} }
@ -194,10 +194,10 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem )
{ {
// do not call initVars() // do not call initVars()
m_StructType = aItem.m_StructType; m_structType = aItem.m_structType;
m_Flags = aItem.m_Flags; m_flags = aItem.m_flags;
m_Status = aItem.m_Status; m_status = aItem.m_status;
m_Parent = aItem.m_Parent; m_parent = aItem.m_parent;
m_forceVisible = aItem.m_forceVisible; m_forceVisible = aItem.m_forceVisible;
return *this; return *this;

View File

@ -34,30 +34,30 @@
void EDA_RECT::Normalize() void EDA_RECT::Normalize()
{ {
if( m_Size.y < 0 ) if( m_size.y < 0 )
{ {
m_Size.y = -m_Size.y; m_size.y = -m_size.y;
m_Pos.y -= m_Size.y; m_pos.y -= m_size.y;
} }
if( m_Size.x < 0 ) if( m_size.x < 0 )
{ {
m_Size.x = -m_Size.x; m_size.x = -m_size.x;
m_Pos.x -= m_Size.x; m_pos.x -= m_size.x;
} }
} }
void EDA_RECT::Move( const wxPoint& aMoveVector ) void EDA_RECT::Move( const wxPoint& aMoveVector )
{ {
m_Pos += aMoveVector; m_pos += aMoveVector;
} }
bool EDA_RECT::Contains( const wxPoint& aPoint ) const bool EDA_RECT::Contains( const wxPoint& aPoint ) const
{ {
wxPoint rel_pos = aPoint - m_Pos; wxPoint rel_pos = aPoint - m_pos;
wxSize size = m_Size; wxSize size = m_size;
if( size.x < 0 ) if( size.x < 0 )
{ {
@ -160,13 +160,13 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const
rect.Normalize(); // ensure size is >= 0 rect.Normalize(); // ensure size is >= 0
// calculate the left common area coordinate: // calculate the left common area coordinate:
int left = std::max( me.m_Pos.x, rect.m_Pos.x ); int left = std::max( me.m_pos.x, rect.m_pos.x );
// calculate the right common area coordinate: // calculate the right common area coordinate:
int right = std::min( me.m_Pos.x + me.m_Size.x, rect.m_Pos.x + rect.m_Size.x ); int right = std::min( me.m_pos.x + me.m_size.x, rect.m_pos.x + rect.m_size.x );
// calculate the upper common area coordinate: // calculate the upper common area coordinate:
int top = std::max( me.m_Pos.y, aRect.m_Pos.y ); int top = std::max( me.m_pos.y, aRect.m_pos.y );
// calculate the lower common area coordinate: // calculate the lower common area coordinate:
int bottom = std::min( me.m_Pos.y + me.m_Size.y, rect.m_Pos.y + rect.m_Size.y ); int bottom = std::min( me.m_pos.y + me.m_size.y, rect.m_pos.y + rect.m_size.y );
// if a common area exists, it must have a positive (null accepted) size // if a common area exists, it must have a positive (null accepted) size
if( left <= right && top <= bottom ) if( left <= right && top <= bottom )
@ -230,10 +230,10 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect, double aRot ) const
/* Test A : Any corners exist in rotated rect? */ /* Test A : Any corners exist in rotated rect? */
corners[0] = m_Pos; corners[0] = m_pos;
corners[1] = m_Pos + wxPoint( m_Size.x, 0 ); corners[1] = m_pos + wxPoint( m_size.x, 0 );
corners[2] = m_Pos + wxPoint( m_Size.x, m_Size.y ); corners[2] = m_pos + wxPoint( m_size.x, m_size.y );
corners[3] = m_Pos + wxPoint( 0, m_Size.y ); corners[3] = m_pos + wxPoint( 0, m_size.y );
wxPoint rCentre = aRect.Centre(); wxPoint rCentre = aRect.Centre();
@ -362,65 +362,65 @@ EDA_RECT& EDA_RECT::Inflate( int aDelta )
EDA_RECT& EDA_RECT::Inflate( wxCoord dx, wxCoord dy ) EDA_RECT& EDA_RECT::Inflate( wxCoord dx, wxCoord dy )
{ {
if( m_Size.x >= 0 ) if( m_size.x >= 0 )
{ {
if( m_Size.x < -2 * dx ) if( m_size.x < -2 * dx )
{ {
// Don't allow deflate to eat more width than we have, // Don't allow deflate to eat more width than we have,
m_Pos.x += m_Size.x / 2; m_pos.x += m_size.x / 2;
m_Size.x = 0; m_size.x = 0;
} }
else else
{ {
// The inflate is valid. // The inflate is valid.
m_Pos.x -= dx; m_pos.x -= dx;
m_Size.x += 2 * dx; m_size.x += 2 * dx;
} }
} }
else // size.x < 0: else // size.x < 0:
{ {
if( m_Size.x > -2 * dx ) if( m_size.x > -2 * dx )
{ {
// Don't allow deflate to eat more width than we have, // Don't allow deflate to eat more width than we have,
m_Pos.x -= m_Size.x / 2; m_pos.x -= m_size.x / 2;
m_Size.x = 0; m_size.x = 0;
} }
else else
{ {
// The inflate is valid. // The inflate is valid.
m_Pos.x += dx; m_pos.x += dx;
m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 m_size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0
} }
} }
if( m_Size.y >= 0 ) if( m_size.y >= 0 )
{ {
if( m_Size.y < -2 * dy ) if( m_size.y < -2 * dy )
{ {
// Don't allow deflate to eat more height than we have, // Don't allow deflate to eat more height than we have,
m_Pos.y += m_Size.y / 2; m_pos.y += m_size.y / 2;
m_Size.y = 0; m_size.y = 0;
} }
else else
{ {
// The inflate is valid. // The inflate is valid.
m_Pos.y -= dy; m_pos.y -= dy;
m_Size.y += 2 * dy; m_size.y += 2 * dy;
} }
} }
else // size.y < 0: else // size.y < 0:
{ {
if( m_Size.y > 2 * dy ) if( m_size.y > 2 * dy )
{ {
// Don't allow deflate to eat more height than we have, // Don't allow deflate to eat more height than we have,
m_Pos.y -= m_Size.y / 2; m_pos.y -= m_size.y / 2;
m_Size.y = 0; m_size.y = 0;
} }
else else
{ {
// The inflate is valid. // The inflate is valid.
m_Pos.y += dy; m_pos.y += dy;
m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 m_size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0
} }
} }
@ -434,8 +434,8 @@ void EDA_RECT::Merge( const EDA_RECT& aRect )
{ {
if( aRect.IsValid() ) if( aRect.IsValid() )
{ {
m_Pos = aRect.GetPosition(); m_pos = aRect.GetPosition();
m_Size = aRect.GetSize(); m_size = aRect.GetSize();
m_init = true; m_init = true;
} }
return; return;
@ -448,8 +448,8 @@ void EDA_RECT::Merge( const EDA_RECT& aRect )
wxPoint rect_end = rect.GetEnd(); wxPoint rect_end = rect.GetEnd();
// Change origin and size in order to contain the given rect // Change origin and size in order to contain the given rect
m_Pos.x = std::min( m_Pos.x, rect.m_Pos.x ); m_pos.x = std::min( m_pos.x, rect.m_pos.x );
m_Pos.y = std::min( m_Pos.y, rect.m_Pos.y ); m_pos.y = std::min( m_pos.y, rect.m_pos.y );
end.x = std::max( end.x, rect_end.x ); end.x = std::max( end.x, rect_end.x );
end.y = std::max( end.y, rect_end.y ); end.y = std::max( end.y, rect_end.y );
SetEnd( end ); SetEnd( end );
@ -460,8 +460,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint )
{ {
if( !m_init ) if( !m_init )
{ {
m_Pos = aPoint; m_pos = aPoint;
m_Size = wxSize( 0, 0 ); m_size = wxSize( 0, 0 );
m_init = true; m_init = true;
return; return;
} }
@ -470,8 +470,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint )
wxPoint end = GetEnd(); wxPoint end = GetEnd();
// Change origin and size in order to contain the given rect // Change origin and size in order to contain the given rect
m_Pos.x = std::min( m_Pos.x, aPoint.x ); m_pos.x = std::min( m_pos.x, aPoint.x );
m_Pos.y = std::min( m_Pos.y, aPoint.y ); m_pos.y = std::min( m_pos.y, aPoint.y );
end.x = std::max( end.x, aPoint.x ); end.x = std::max( end.x, aPoint.x );
end.y = std::max( end.y, aPoint.y ); end.y = std::max( end.y, aPoint.y );
SetEnd( end ); SetEnd( end );

View File

@ -266,7 +266,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* aComponent )
TestDanglingEnds(); TestDanglingEnds();
aComponent->ClearFlags(); aComponent->ClearFlags();
aComponent->SetFlags( savedFlags ); // Restore m_Flags (modified by SetConvert()) aComponent->SetFlags( savedFlags ); // Restore m_flags (modified by SetConvert())
// If selected make sure all the now-included pins are selected // If selected make sure all the now-included pins are selected
if( aComponent->IsSelected() ) if( aComponent->IsSelected() )

View File

@ -100,7 +100,7 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint, int aAccuracy ) const
bool LIB_ARC::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_ARC::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() ); wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() );

View File

@ -262,7 +262,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos, int aAccuracy ) const
bool LIB_BEZIER::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_BEZIER::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
EDA_RECT sel = aRect; EDA_RECT sel = aRect;

View File

@ -60,7 +60,7 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef, int aAccuracy ) const
bool LIB_CIRCLE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_CIRCLE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() ); wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() );

View File

@ -73,7 +73,7 @@ LIB_FIELD& LIB_FIELD::operator=( const LIB_FIELD& field )
{ {
m_id = field.m_id; m_id = field.m_id;
m_name = field.m_name; m_name = field.m_name;
m_Parent = field.m_Parent; m_parent = field.m_parent;
SetText( field.GetText() ); SetText( field.GetText() );
SetEffects( field ); SetEffects( field );
@ -131,7 +131,7 @@ bool LIB_FIELD::HitTest( const wxPoint& aPosition, int aAccuracy ) const
// Reference designator text has one or 2 additional character (displays U? or U?A) // Reference designator text has one or 2 additional character (displays U? or U?A)
if( m_id == REFERENCE_FIELD ) if( m_id == REFERENCE_FIELD )
{ {
const LIB_PART* parent = dynamic_cast<const LIB_PART*>( m_Parent ); const LIB_PART* parent = dynamic_cast<const LIB_PART*>( m_parent );
wxString extended_text = tmp_text.GetText(); wxString extended_text = tmp_text.GetText();
extended_text.Append('?'); extended_text.Append('?');
@ -169,7 +169,7 @@ void LIB_FIELD::Copy( LIB_FIELD* aTarget ) const
aTarget->CopyText( *this ); aTarget->CopyText( *this );
aTarget->SetEffects( *this ); aTarget->SetEffects( *this );
aTarget->SetParent( m_Parent ); aTarget->SetParent( m_parent );
} }

View File

@ -42,7 +42,7 @@ LIB_ITEM::LIB_ITEM( KICAD_T aType,
m_Unit = aUnit; m_Unit = aUnit;
m_Convert = aConvert; m_Convert = aConvert;
m_Fill = aFillType; m_Fill = aFillType;
m_Parent = (EDA_ITEM*) aComponent; m_parent = (EDA_ITEM*) aComponent;
m_isFillable = false; m_isFillable = false;
} }
@ -119,7 +119,7 @@ bool LIB_ITEM::operator<( const LIB_ITEM& aOther ) const
bool LIB_ITEM::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_ITEM::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
EDA_RECT sel = aRect; EDA_RECT sel = aRect;

View File

@ -182,7 +182,7 @@ public:
LIB_PART* GetParent() const LIB_PART* GetParent() const
{ {
return (LIB_PART*) m_Parent; return (LIB_PART*) m_parent;
} }
void ViewGetLayers( int aLayers[], int& aCount ) const override; void ViewGetLayers( int aLayers[], int& aCount ) const override;

View File

@ -150,7 +150,7 @@ bool LIB_PIN::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool LIB_PIN::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_PIN::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
EDA_RECT sel = aRect; EDA_RECT sel = aRect;

View File

@ -247,7 +247,7 @@ bool LIB_POLYLINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool LIB_POLYLINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool LIB_POLYLINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
EDA_RECT sel = aRect; EDA_RECT sel = aRect;

View File

@ -80,7 +80,7 @@ EDA_ITEM* LIB_TEXT::Clone() const
newitem->m_Unit = m_Unit; newitem->m_Unit = m_Unit;
newitem->m_Convert = m_Convert; newitem->m_Convert = m_Convert;
newitem->m_Flags = m_Flags; newitem->m_flags = m_flags;
newitem->SetText( GetText() ); newitem->SetText( GetText() );
newitem->SetEffects( *this ); newitem->SetEffects( *this );

View File

@ -147,7 +147,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* aSheet, PICKED_SY
SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) : SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) :
SCH_ITEM( aComponent ) SCH_ITEM( aComponent )
{ {
m_Parent = aComponent.m_Parent; m_parent = aComponent.m_parent;
m_Pos = aComponent.m_Pos; m_Pos = aComponent.m_Pos;
m_unit = aComponent.m_unit; m_unit = aComponent.m_unit;
m_convert = aComponent.m_convert; m_convert = aComponent.m_convert;
@ -1759,7 +1759,7 @@ bool SCH_COMPONENT::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool SCH_COMPONENT::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool SCH_COMPONENT::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT ) if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT )
return false; return false;
EDA_RECT rect = aRect; EDA_RECT rect = aRect;

View File

@ -75,7 +75,7 @@ void SCH_FIELD::SetId( int aId )
{ {
m_id = aId; m_id = aId;
if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) if( m_parent && m_parent->Type() == SCH_SHEET_T )
{ {
switch( m_id ) switch( m_id )
{ {
@ -109,7 +109,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
} }
else else
{ {
SCH_COMPONENT* component = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* component = static_cast<SCH_COMPONENT*>( m_parent );
if( component->ResolveTextVar( token, aDepth + 1 ) ) if( component->ResolveTextVar( token, aDepth + 1 ) )
return true; return true;
@ -127,7 +127,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
std::function<bool( wxString* )> sheetResolver = std::function<bool( wxString* )> sheetResolver =
[&]( wxString* token ) -> bool [&]( wxString* token ) -> bool
{ {
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_Parent ); SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_parent );
return sheet->ResolveTextVar( token, aDepth + 1 ); return sheet->ResolveTextVar( token, aDepth + 1 );
}; };
@ -142,9 +142,9 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
if( aDepth < 10 ) if( aDepth < 10 )
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
text = ExpandTextVars( text, &symbolResolver, project ); text = ExpandTextVars( text, &symbolResolver, project );
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
text = ExpandTextVars( text, &sheetResolver, project ); text = ExpandTextVars( text, &sheetResolver, project );
else else
text = ExpandTextVars( text, nullptr, project ); text = ExpandTextVars( text, nullptr, project );
@ -154,9 +154,9 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
// WARNING: the IDs of FIELDS and SHEETS overlap, so one must check *both* the // WARNING: the IDs of FIELDS and SHEETS overlap, so one must check *both* the
// id and the parent's type. // id and the parent's type.
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* component = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* component = static_cast<SCH_COMPONENT*>( m_parent );
if( m_id == REFERENCE_FIELD ) if( m_id == REFERENCE_FIELD )
{ {
@ -166,7 +166,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
text << LIB_PART::SubReference( component->GetUnit() ); text << LIB_PART::SubReference( component->GetUnit() );
} }
} }
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
{ {
if( m_id == SHEETFILENAME ) if( m_id == SHEETFILENAME )
text = _( "File:" ) + wxS( " " )+ text; text = _( "File:" ) + wxS( " " )+ text;
@ -196,9 +196,9 @@ void SCH_FIELD::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
// Calculate the text orientation according to the component orientation. // Calculate the text orientation according to the component orientation.
orient = GetTextAngle(); orient = GetTextAngle();
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
if( parentComponent && parentComponent->GetTransform().y1 ) // Rotate component 90 degrees. if( parentComponent && parentComponent->GetTransform().y1 ) // Rotate component 90 degrees.
{ {
@ -263,9 +263,9 @@ const EDA_RECT SCH_FIELD::GetBoundingBox() const
// Now, apply the component transform (mirror/rot) // Now, apply the component transform (mirror/rot)
TRANSFORM transform; TRANSFORM transform;
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
// Due to the Y axis direction, we must mirror the bounding box, // Due to the Y axis direction, we must mirror the bounding box,
// relative to the text position: // relative to the text position:
@ -326,12 +326,12 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
if( !IsVisible() && !searchHiddenFields ) if( !IsVisible() && !searchHiddenFields )
return false; return false;
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T && m_id == REFERENCE_FIELD ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T && m_id == REFERENCE_FIELD )
{ {
if( searchAndReplace && !replaceReferences ) if( searchAndReplace && !replaceReferences )
return false; return false;
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
wxASSERT( aAuxData ); wxASSERT( aAuxData );
// Take sheet path into account which effects the reference field and the unit for // Take sheet path into account which effects the reference field and the unit for
@ -354,9 +354,9 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
bool SCH_FIELD::IsReplaceable() const bool SCH_FIELD::IsReplaceable() const
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
if( m_id == VALUE_FIELD ) if( m_id == VALUE_FIELD )
{ {
@ -366,7 +366,7 @@ bool SCH_FIELD::IsReplaceable() const
return false; return false;
} }
} }
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
{ {
// See comments in SCH_FIELD::Replace(), below. // See comments in SCH_FIELD::Replace(), below.
if( m_id == SHEETFILENAME ) if( m_id == SHEETFILENAME )
@ -381,9 +381,9 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData )
{ {
bool isReplaced = false; bool isReplaced = false;
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
if( m_id == REFERENCE_FIELD ) if( m_id == REFERENCE_FIELD )
{ {
@ -405,7 +405,7 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData )
isReplaced = EDA_TEXT::Replace( aSearchData ); isReplaced = EDA_TEXT::Replace( aSearchData );
} }
} }
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
{ {
isReplaced = EDA_TEXT::Replace( aSearchData ); isReplaced = EDA_TEXT::Replace( aSearchData );
@ -443,9 +443,9 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) const
return m_name; return m_name;
else if( aUseDefaultName ) else if( aUseDefaultName )
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
return TEMPLATE_FIELDNAME::GetDefaultFieldName( m_id ); return TEMPLATE_FIELDNAME::GetDefaultFieldName( m_id );
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
return SCH_SHEET::GetDefaultFieldName( m_id ); return SCH_SHEET::GetDefaultFieldName( m_id );
} }
@ -455,7 +455,7 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) const
wxString SCH_FIELD::GetCanonicalName() const wxString SCH_FIELD::GetCanonicalName() const
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
switch( m_id ) switch( m_id )
{ {
@ -465,7 +465,7 @@ wxString SCH_FIELD::GetCanonicalName() const
case DATASHEET_FIELD: return wxT( "Datasheet" ); case DATASHEET_FIELD: return wxT( "Datasheet" );
} }
} }
else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) else if( m_parent && m_parent->Type() == SCH_SHEET_T )
{ {
switch( m_id ) switch( m_id )
{ {
@ -480,7 +480,7 @@ wxString SCH_FIELD::GetCanonicalName() const
BITMAP_DEF SCH_FIELD::GetMenuImage() const BITMAP_DEF SCH_FIELD::GetMenuImage() const
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
switch( m_id ) switch( m_id )
{ {
@ -543,9 +543,9 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter )
// Calculate the text orientation, according to the component orientation/mirror // Calculate the text orientation, according to the component orientation/mirror
int orient = GetTextAngle(); int orient = GetTextAngle();
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
if( parentComponent->GetTransform().y1 ) // Rotate component 90 deg. if( parentComponent->GetTransform().y1 ) // Rotate component 90 deg.
{ {
@ -582,9 +582,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition )
// Actual positions are calculated by the rotation/mirror transform of the // Actual positions are calculated by the rotation/mirror transform of the
// parent component of the field. The inverse transform is used to calculate // parent component of the field. The inverse transform is used to calculate
// the position relative to the parent component. // the position relative to the parent component.
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
wxPoint relativePos = aPosition - parentComponent->GetPosition(); wxPoint relativePos = aPosition - parentComponent->GetPosition();
relativePos = parentComponent->GetTransform(). relativePos = parentComponent->GetTransform().
@ -600,9 +600,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition )
wxPoint SCH_FIELD::GetPosition() const wxPoint SCH_FIELD::GetPosition() const
{ {
if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) if( m_parent && m_parent->Type() == SCH_COMPONENT_T )
{ {
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent ); SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
wxPoint relativePos = GetTextPos() - parentComponent->GetPosition(); wxPoint relativePos = GetTextPos() - parentComponent->GetPosition();
relativePos = parentComponent->GetTransform().TransformCoordinate( relativePos ); relativePos = parentComponent->GetTransform().TransformCoordinate( relativePos );
@ -616,7 +616,7 @@ wxPoint SCH_FIELD::GetPosition() const
wxPoint SCH_FIELD::GetParentPosition() const wxPoint SCH_FIELD::GetParentPosition() const
{ {
return m_Parent ? m_Parent->GetPosition() : wxPoint( 0, 0 ); return m_parent ? m_parent->GetPosition() : wxPoint( 0, 0 );
} }

View File

@ -137,7 +137,7 @@ void SCH_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
bool SCH_ITEM::IsConnected( const wxPoint& aPosition ) const bool SCH_ITEM::IsConnected( const wxPoint& aPosition ) const
{ {
if( ( m_Flags & STRUCT_DELETED ) || ( m_Flags & SKIP_STRUCT ) ) if(( m_flags & STRUCT_DELETED ) || ( m_flags & SKIP_STRUCT ) )
return false; return false;
return doIsConnected( aPosition ); return doIsConnected( aPosition );

View File

@ -194,7 +194,7 @@ bool SCH_JUNCTION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool SCH_JUNCTION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool SCH_JUNCTION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT ) if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT )
return false; return false;
if( aContained ) if( aContained )

View File

@ -634,10 +634,10 @@ std::vector<wxPoint> SCH_LINE::GetConnectionPoints() const
void SCH_LINE::GetSelectedPoints( std::vector< wxPoint >& aPoints ) const void SCH_LINE::GetSelectedPoints( std::vector< wxPoint >& aPoints ) const
{ {
if( m_Flags & STARTPOINT ) if( m_flags & STARTPOINT )
aPoints.push_back( m_start ); aPoints.push_back( m_start );
if( m_Flags & ENDPOINT ) if( m_flags & ENDPOINT )
aPoints.push_back( m_end ); aPoints.push_back( m_end );
} }
@ -727,7 +727,7 @@ bool SCH_LINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
bool SCH_LINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const bool SCH_LINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{ {
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
return false; return false;
EDA_RECT rect = aRect; EDA_RECT rect = aRect;

View File

@ -166,7 +166,7 @@ public:
* @return The sheet that is the parent of this sheet pin or NULL if it does * @return The sheet that is the parent of this sheet pin or NULL if it does
* not have a parent. * not have a parent.
*/ */
SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; } SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_parent; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override; void Show( int nestLevel, std::ostream& os ) const override;

View File

@ -478,8 +478,8 @@ void SCH_TEXT::GetContextualTextVars( wxArrayString* aVars ) const
if( Type() == SCH_GLOBAL_LABEL_T || Type() == SCH_HIER_LABEL_T || Type() == SCH_SHEET_PIN_T ) if( Type() == SCH_GLOBAL_LABEL_T || Type() == SCH_HIER_LABEL_T || Type() == SCH_SHEET_PIN_T )
aVars->push_back( wxT( "CONNECTION_TYPE" ) ); aVars->push_back( wxT( "CONNECTION_TYPE" ) );
if( Type() == SCH_SHEET_PIN_T && m_Parent ) if( Type() == SCH_SHEET_PIN_T && m_parent )
static_cast<SCH_SHEET*>( m_Parent )->GetContextualTextVars( aVars ); static_cast<SCH_SHEET*>( m_parent )->GetContextualTextVars( aVars );
} }
@ -497,9 +497,9 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const
return true; return true;
} }
if( Type() == SCH_SHEET_PIN_T && m_Parent ) if( Type() == SCH_SHEET_PIN_T && m_parent )
{ {
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_Parent ); SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_parent );
if( sheet->ResolveTextVar( token, aDepth ) ) if( sheet->ResolveTextVar( token, aDepth ) )
return true; return true;

View File

@ -923,7 +923,7 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
" addr=\"" << std::hex << this << std::dec << '"' << " addr=\"" << std::hex << this << std::dec << '"' <<
" layer=\"" << GetLayer() << '"' << " layer=\"" << GetLayer() << '"' <<
" size=\"" << m_Size << '"' << " size=\"" << m_Size << '"' <<
" flags=\"" << m_Flags << '"' << " flags=\"" << m_flags << '"' <<
" status=\"" << GetStatus() << '"' << " status=\"" << GetStatus() << '"' <<
"<start" << m_Start << "/>" << "<start" << m_Start << "/>" <<
"<end" << m_End << "/>"; "<end" << m_End << "/>";

View File

@ -22,11 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/**
* @file class_board_item.h
* @brief Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
*/
#ifndef BOARD_ITEM_STRUCT_H #ifndef BOARD_ITEM_STRUCT_H
#define BOARD_ITEM_STRUCT_H #define BOARD_ITEM_STRUCT_H
@ -181,7 +176,7 @@ public:
*/ */
virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const; virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const;
BOARD_ITEM_CONTAINER* GetParent() const { return (BOARD_ITEM_CONTAINER*) m_Parent; } BOARD_ITEM_CONTAINER* GetParent() const { return (BOARD_ITEM_CONTAINER*) m_parent; }
/** /**
* Function GetLayer * Function GetLayer

View File

@ -147,14 +147,9 @@ public:
protected: protected:
struct COMMIT_LINE struct COMMIT_LINE
{ {
///> Main item that is added/deleted/modified EDA_ITEM* m_item; ///> Main item that is added/deleted/modified
EDA_ITEM* m_item; EDA_ITEM* m_copy; ///> Optional copy of the item
CHANGE_TYPE m_type; ///> Modification type
///> Optional copy of the item
EDA_ITEM* m_copy;
///> Modification type
CHANGE_TYPE m_type;
}; };
// Should be called in Push() & Revert() methods // Should be called in Push() & Revert() methods

View File

@ -73,7 +73,7 @@ class EDA_ITEM;
/** /**
* Enum KICAD_T * Enum KICAD_T
* is the set of class identification values, stored in EDA_ITEM::m_StructType * is the set of class identification values, stored in EDA_ITEM::m_structType
*/ */
enum KICAD_T enum KICAD_T
{ {

View File

@ -73,7 +73,7 @@ class EDA_DRAW_FRAME : public KIWAY_PLAYER
KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions; KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions;
/// Default display origin transforms object /// Default display origin transforms object
ORIGIN_TRANSFORMS m_OriginTransforms; ORIGIN_TRANSFORMS m_originTransforms;
protected: protected:
wxSocketServer* m_socketServer; wxSocketServer* m_socketServer;
@ -85,9 +85,9 @@ protected:
COLOR4D m_gridColor; // Grid color COLOR4D m_gridColor; // Grid color
COLOR4D m_drawBgColor; // The background color of the draw canvas; BLACK for COLOR4D m_drawBgColor; // The background color of the draw canvas; BLACK for
// Pcbnew, BLACK or WHITE for eeschema // Pcbnew, BLACK or WHITE for eeschema
int m_UndoRedoCountMax; // Default Undo/Redo command Max depth, to be handed int m_undoRedoCountMax; // Default Undo/Redo command Max depth, to be handed
// to screens // to screens
bool m_PolarCoords; // For those frames that support polar coordinates bool m_polarCoords; // For those frames that support polar coordinates
bool m_showBorderAndTitleBlock; // Show the worksheet (border and title block). bool m_showBorderAndTitleBlock; // Show the worksheet (border and title block).
long m_firstRunDialogSetting; // Show first run dialog on startup long m_firstRunDialogSetting; // Show first run dialog on startup
@ -105,7 +105,7 @@ protected:
wxArrayString m_replaceStringHistoryList; wxArrayString m_replaceStringHistoryList;
EDA_MSG_PANEL* m_messagePanel; EDA_MSG_PANEL* m_messagePanel;
int m_MsgFrameHeight; int m_msgFrameHeight;
COLOR_SETTINGS* m_colorSettings; COLOR_SETTINGS* m_colorSettings;
@ -188,8 +188,8 @@ public:
/** /**
* For those frames that support polar coordinates. * For those frames that support polar coordinates.
*/ */
bool GetShowPolarCoords() const { return m_PolarCoords; } bool GetShowPolarCoords() const { return m_polarCoords; }
void SetShowPolarCoords( bool aShow ) { m_PolarCoords = aShow; } void SetShowPolarCoords( bool aShow ) { m_polarCoords = aShow; }
void ToggleUserUnits() override; void ToggleUserUnits() override;
@ -220,7 +220,7 @@ public:
* Return a reference to the default ORIGIN_TRANSFORMS object * Return a reference to the default ORIGIN_TRANSFORMS object
*/ */
virtual ORIGIN_TRANSFORMS& GetOriginTransforms() virtual ORIGIN_TRANSFORMS& GetOriginTransforms()
{ return m_OriginTransforms; } { return m_originTransforms; }
virtual const TITLE_BLOCK& GetTitleBlock() const = 0; virtual const TITLE_BLOCK& GetTitleBlock() const = 0;

View File

@ -94,7 +94,7 @@ typedef std::function< SEARCH_RESULT ( EDA_ITEM* aItem, void* aTestData ) > IN
typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested users by ref, avoids copying std::function typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested users by ref, avoids copying std::function
// These define are used for the .m_Flags and .m_UndoRedoStatus member of the // These define are used for the .m_flags and .m_UndoRedoStatus member of the
// class EDA_ITEM // class EDA_ITEM
// //
// NB: DO NOT ADD FLAGS ANYWHERE BUT AT THE END: THE FLAG-SET IS STORED AS AN INTEGER IN FILES. // NB: DO NOT ADD FLAGS ANYWHERE BUT AT THE END: THE FLAG-SET IS STORED AS AN INTEGER IN FILES.
@ -142,8 +142,7 @@ typedef unsigned STATUS_FLAGS;
/** /**
* EDA_ITEM * EDA_ITEM
* is a base class for most all the KiCad significant classes, used in * is a base class for most all the KiCad significant classes used in schematics and boards.
* schematics and boards.
*/ */
class EDA_ITEM : public KIGFX::VIEW_ITEM class EDA_ITEM : public KIGFX::VIEW_ITEM
{ {
@ -152,17 +151,16 @@ public:
private: private:
/** /**
* Run time identification, _keep private_ so it can never be changed after * Run time identification, _keep private_ so it can never be changed after a ctor
* a constructor sets it. See comment near SetType() regarding virtual * sets it. See comment near SetType() regarding virtual functions.
* functions.
*/ */
KICAD_T m_StructType; KICAD_T m_structType;
protected: protected:
STATUS_FLAGS m_Status; STATUS_FLAGS m_status;
EDA_ITEM* m_Parent; ///< Linked list: Link (parent struct) EDA_ITEM* m_parent; ///< Linked list: Link (parent struct)
bool m_forceVisible; bool m_forceVisible;
STATUS_FLAGS m_Flags; STATUS_FLAGS m_flags;
protected: protected:
EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ); EDA_ITEM( EDA_ITEM* parent, KICAD_T idType );
@ -175,23 +173,23 @@ public:
/** /**
* Function Type() * Function Type()
* *
* returns the type of object. This attribute should never be changed * returns the type of object. This attribute should never be changed after a ctor sets
* after a constructor sets it, so there is no public "setter" method. * it, so there is no public "setter" method.
* @return KICAD_T - the type of object. * @return KICAD_T - the type of object.
*/ */
inline KICAD_T Type() const { return m_StructType; } inline KICAD_T Type() const { return m_structType; }
EDA_ITEM* GetParent() const { return m_Parent; } EDA_ITEM* GetParent() const { return m_parent; }
virtual void SetParent( EDA_ITEM* aParent ) { m_Parent = aParent; } virtual void SetParent( EDA_ITEM* aParent ) { m_parent = aParent; }
inline bool IsModified() const { return m_Flags & IS_CHANGED; } inline bool IsModified() const { return m_flags & IS_CHANGED; }
inline bool IsNew() const { return m_Flags & IS_NEW; } inline bool IsNew() const { return m_flags & IS_NEW; }
inline bool IsMoving() const { return m_Flags & IS_MOVED; } inline bool IsMoving() const { return m_flags & IS_MOVED; }
inline bool IsDragging() const { return m_Flags & IS_DRAGGED; } inline bool IsDragging() const { return m_flags & IS_DRAGGED; }
inline bool IsWireImage() const { return m_Flags & IS_WIRE_IMAGE; } inline bool IsWireImage() const { return m_flags & IS_WIRE_IMAGE; }
inline bool IsSelected() const { return m_Flags & SELECTED; } inline bool IsSelected() const { return m_flags & SELECTED; }
inline bool IsResized() const { return m_Flags & IS_RESIZED; } inline bool IsResized() const { return m_flags & IS_RESIZED; }
inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } inline bool IsBrightened() const { return m_flags & BRIGHTENED; }
inline void SetWireImage() { SetFlags( IS_WIRE_IMAGE ); } inline void SetWireImage() { SetFlags( IS_WIRE_IMAGE ); }
inline void SetSelected() { SetFlags( SELECTED ); } inline void SetSelected() { SetFlags( SELECTED ); }
@ -204,31 +202,31 @@ public:
int GetState( int type ) const int GetState( int type ) const
{ {
return m_Status & type; return m_status & type;
} }
void SetState( int type, int state ) void SetState( int type, int state )
{ {
if( state ) if( state )
m_Status |= type; // state = ON or OFF m_status |= type; // state = ON or OFF
else else
m_Status &= ~type; m_status &= ~type;
} }
STATUS_FLAGS GetStatus() const { return m_Status; } STATUS_FLAGS GetStatus() const { return m_status; }
void SetStatus( STATUS_FLAGS aStatus ) { m_Status = aStatus; } void SetStatus( STATUS_FLAGS aStatus ) { m_status = aStatus; }
void SetFlags( STATUS_FLAGS aMask ) { m_Flags |= aMask; } void SetFlags( STATUS_FLAGS aMask ) { m_flags |= aMask; }
void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_Flags &= ~aMask; } void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_flags &= ~aMask; }
STATUS_FLAGS GetFlags() const { return m_Flags; } STATUS_FLAGS GetFlags() const { return m_flags; }
bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_Flags & aFlag ) == aFlag; } bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_flags & aFlag ) == aFlag; }
STATUS_FLAGS GetEditFlags() const STATUS_FLAGS GetEditFlags() const
{ {
constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVED | IS_RESIZED | IS_DRAGGED | constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVED | IS_RESIZED | IS_DRAGGED |
IS_WIRE_IMAGE | STRUCT_DELETED ); IS_WIRE_IMAGE | STRUCT_DELETED );
return m_Flags & mask; return m_flags & mask;
} }
void ClearTempFlags() void ClearTempFlags()
@ -255,7 +253,7 @@ public:
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p ) for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
{ {
if( m_StructType == *p ) if( m_structType == *p )
return true; return true;
} }

View File

@ -44,16 +44,16 @@
class EDA_RECT class EDA_RECT
{ {
private: private:
wxPoint m_Pos; // Rectangle Origin wxPoint m_pos; // Rectangle Origin
wxSize m_Size; // Rectangle Size wxSize m_size; // Rectangle Size
bool m_init; // Is the rectangle initialized bool m_init; // Is the rectangle initialized
public: public:
EDA_RECT() : m_init( false ) { }; EDA_RECT() : m_init( false ) { };
EDA_RECT( const wxPoint& aPos, const wxSize& aSize ) : EDA_RECT( const wxPoint& aPos, const wxSize& aSize ) :
m_Pos( aPos ), m_pos( aPos ),
m_Size( aSize ), m_size( aSize ),
m_init( true ) m_init( true )
{ } { }
@ -61,8 +61,8 @@ public:
wxPoint Centre() const wxPoint Centre() const
{ {
return wxPoint( m_Pos.x + ( m_Size.x >> 1 ), return wxPoint( m_pos.x + ( m_size.x >> 1 ),
m_Pos.y + ( m_Size.y >> 1 ) ); m_pos.y + ( m_size.y >> 1 ) );
} }
/** /**
@ -100,28 +100,28 @@ public:
*/ */
bool Contains( const EDA_RECT& aRect ) const; bool Contains( const EDA_RECT& aRect ) const;
const wxSize GetSize() const { return m_Size; } const wxSize GetSize() const { return m_size; }
/** /**
* @brief GetSizeMax * @brief GetSizeMax
* @return the max size dimension * @return the max size dimension
*/ */
int GetSizeMax() const { return ( m_Size.x > m_Size.y ) ? m_Size.x : m_Size.y; } int GetSizeMax() const { return ( m_size.x > m_size.y ) ? m_size.x : m_size.y; }
int GetX() const { return m_Pos.x; } int GetX() const { return m_pos.x; }
int GetY() const { return m_Pos.y; } int GetY() const { return m_pos.y; }
const wxPoint GetOrigin() const { return m_Pos; } const wxPoint GetOrigin() const { return m_pos; }
const wxPoint GetPosition() const { return m_Pos; } const wxPoint GetPosition() const { return m_pos; }
const wxPoint GetEnd() const { return wxPoint( m_Pos.x + m_Size.x, m_Pos.y + m_Size.y ); } const wxPoint GetEnd() const { return wxPoint( m_pos.x + m_size.x, m_pos.y + m_size.y ); }
const wxPoint GetCenter() const { return wxPoint( m_Pos.x + ( m_Size.x / 2 ), m_Pos.y + ( m_Size.y / 2 ) ); } const wxPoint GetCenter() const { return wxPoint( m_pos.x + ( m_size.x / 2 ), m_pos.y + ( m_size.y / 2 ) ); }
int GetWidth() const { return m_Size.x; } int GetWidth() const { return m_size.x; }
int GetHeight() const { return m_Size.y; } int GetHeight() const { return m_size.y; }
int GetRight() const { return m_Pos.x + m_Size.x; } int GetRight() const { return m_pos.x + m_size.x; }
int GetLeft() const { return m_Pos.x; } int GetLeft() const { return m_pos.x; }
int GetTop() const { return m_Pos.y; } int GetTop() const { return m_pos.y; }
int GetBottom() const { return m_Pos.y + m_Size.y; } // Y axis from top to bottom int GetBottom() const { return m_pos.y + m_size.y; } // Y axis from top to bottom
bool IsValid() const bool IsValid() const
{ {
@ -130,62 +130,62 @@ public:
void SetOrigin( const wxPoint &pos ) void SetOrigin( const wxPoint &pos )
{ {
m_Pos = pos; m_pos = pos;
m_init = true; m_init = true;
} }
void SetOrigin( int x, int y ) void SetOrigin( int x, int y )
{ {
m_Pos.x = x; m_pos.x = x;
m_Pos.y = y; m_pos.y = y;
m_init = true; m_init = true;
} }
void SetSize( const wxSize &size ) void SetSize( const wxSize &size )
{ {
m_Size = size; m_size = size;
m_init = true; m_init = true;
} }
void SetSize( int w, int h ) void SetSize( int w, int h )
{ {
m_Size.x = w; m_size.x = w;
m_Size.y = h; m_size.y = h;
m_init = true; m_init = true;
} }
void Offset( int dx, int dy ) void Offset( int dx, int dy )
{ {
m_Pos.x += dx; m_pos.x += dx;
m_Pos.y += dy; m_pos.y += dy;
} }
void Offset( const wxPoint &offset ) void Offset( const wxPoint &offset )
{ {
m_Pos += offset; m_pos += offset;
} }
void SetX( int val ) void SetX( int val )
{ {
m_Pos.x = val; m_pos.x = val;
m_init = true; m_init = true;
} }
void SetY( int val ) void SetY( int val )
{ {
m_Pos.y = val; m_pos.y = val;
m_init = true; m_init = true;
} }
void SetWidth( int val ) void SetWidth( int val )
{ {
m_Size.x = val; m_size.x = val;
m_init = true; m_init = true;
} }
void SetHeight( int val ) void SetHeight( int val )
{ {
m_Size.y = val; m_size.y = val;
m_init = true; m_init = true;
} }
@ -197,8 +197,8 @@ public:
void SetEnd( const wxPoint &pos ) void SetEnd( const wxPoint &pos )
{ {
m_Size.x = pos.x - m_Pos.x; m_size.x = pos.x - m_pos.x;
m_Size.y = pos.y - m_Pos.y; m_size.y = pos.y - m_pos.y;
m_init = true; m_init = true;
} }
@ -208,8 +208,8 @@ public:
*/ */
void RevertYAxis() void RevertYAxis()
{ {
m_Pos.y = -m_Pos.y; m_pos.y = -m_pos.y;
m_Size.y = -m_Size.y; m_size.y = -m_size.y;
Normalize(); Normalize();
} }
@ -291,9 +291,9 @@ public:
*/ */
operator wxRect() const operator wxRect() const
{ {
EDA_RECT rect( m_Pos, m_Size ); EDA_RECT rect( m_pos, m_size );
rect.Normalize(); rect.Normalize();
return wxRect( rect.m_Pos, rect.m_Size ); return wxRect( rect.m_pos, rect.m_size );
} }
/** /**
@ -303,7 +303,7 @@ public:
*/ */
operator BOX2I() const operator BOX2I() const
{ {
EDA_RECT rect( m_Pos, m_Size ); EDA_RECT rect( m_pos, m_size );
rect.Normalize(); rect.Normalize();
return BOX2I( rect.GetOrigin(), rect.GetSize() ); return BOX2I( rect.GetOrigin(), rect.GetSize() );
} }

View File

@ -66,7 +66,7 @@ protected:
m_peer = aPeer; m_peer = aPeer;
m_index = aIndex; m_index = aIndex;
m_penWidth = 0; m_penWidth = 0;
m_Flags = 0; m_flags = 0;
} }
public: public:

View File

@ -36,7 +36,7 @@
#define CLASS_PCB_GROUP_H_ #define CLASS_PCB_GROUP_H_
#include <board_commit.h> #include <board_commit.h>
#include <class_board_item.h> #include <board_item.h>
#include <unordered_set> #include <unordered_set>
namespace KIGFX namespace KIGFX

View File

@ -27,7 +27,7 @@
#include <base_screen.h> #include <base_screen.h>
#include <class_board_item.h> #include <board_item.h>
/* Handle info to display a board */ /* Handle info to display a board */

View File

@ -78,7 +78,7 @@ enum class UNDO_REDO {
class ITEM_PICKER class ITEM_PICKER
{ {
private: private:
STATUS_FLAGS m_pickerFlags; /* a copy of m_Flags member. useful in mode/drag STATUS_FLAGS m_pickerFlags; /* a copy of m_flags member. useful in mode/drag
* undo/redo commands */ * undo/redo commands */
UNDO_REDO m_undoRedoStatus; /* type of operation to undo/redo for this item */ UNDO_REDO m_undoRedoStatus; /* type of operation to undo/redo for this item */
EDA_ITEM* m_pickedItem; /* Pointer on the schematic or board item that is concerned EDA_ITEM* m_pickedItem; /* Pointer on the schematic or board item that is concerned
@ -288,7 +288,7 @@ public:
/** /**
* Function SetPickerFlags * Function SetPickerFlags
* set the flags of the picker (usually to the picked item m_Flags value) * set the flags of the picker (usually to the picked item m_flags value)
* @param aFlags The flag value to save in picker * @param aFlags The flag value to save in picker
* @param aIdx Index of the picker in the picked list * @param aIdx Index of the picker in the picked list
* @return True if the picker exists or false if does not exist * @return True if the picker exists or false if does not exist

View File

@ -39,7 +39,7 @@
class PL_EDITOR_LAYOUT class PL_EDITOR_LAYOUT
{ {
private: private:
EDA_RECT m_BoundingBox; EDA_RECT m_boundingBox;
PAGE_INFO m_paper; PAGE_INFO m_paper;
TITLE_BLOCK m_titles; TITLE_BLOCK m_titles;
@ -80,9 +80,9 @@ public:
* may be called soon after ComputeBoundingBox() to return the same EDA_RECT, * may be called soon after ComputeBoundingBox() to return the same EDA_RECT,
* as long as the CLASS_PL_EDITOR_LAYOUT has not changed. * as long as the CLASS_PL_EDITOR_LAYOUT has not changed.
*/ */
const EDA_RECT GetBoundingBox() const { return m_BoundingBox; } const EDA_RECT GetBoundingBox() const { return m_boundingBox; }
void SetBoundingBox( const EDA_RECT& aBox ) { m_BoundingBox = aBox; } void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; void Show( int nestLevel, std::ostream& os ) const;

View File

@ -36,22 +36,15 @@ public:
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override; virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
int m_CornerOrigin; int m_CornerOrigin;
int m_PropertiesFrameWidth; int m_PropertiesFrameWidth;
wxString m_LastPaperSize; wxString m_LastPaperSize;
int m_LastCustomWidth; int m_LastCustomWidth;
int m_LastCustomHeight; int m_LastCustomHeight;
bool m_LastWasPortrait; bool m_LastWasPortrait;
bool m_BlackBackground; bool m_BlackBackground;
protected: protected:
virtual std::string getLegacyFrameName() const override { return "PlEditorFrame"; } virtual std::string getLegacyFrameName() const override { return "PlEditorFrame"; }
}; };

View File

@ -29,7 +29,7 @@
#include <board.h> #include <board.h>
#include <footprint.h> #include <footprint.h>
#include <class_board_item.h> #include <board_item.h>
#include <tools/pcbnew_selection.h> #include <tools/pcbnew_selection.h>
/*! /*!

View File

@ -35,7 +35,7 @@
#include <footprint.h> #include <footprint.h>
#include <track.h> #include <track.h>
#include <zone.h> #include <zone.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <pcb_target.h> #include <pcb_target.h>
#include <core/kicad_algo.h> #include <core/kicad_algo.h>
#include <connectivity/connectivity_data.h> #include <connectivity/connectivity_data.h>
@ -51,9 +51,8 @@
#include <tool/selection_conditions.h> #include <tool/selection_conditions.h>
#include <convert_drawsegment_list_to_polygon.h> #include <convert_drawsegment_list_to_polygon.h>
/* This is an odd place for this, but CvPcb won't link if it is // This is an odd place for this, but CvPcb won't link if it's in board_item.cpp like I first
* in class_board_item.cpp like I first tried it. // tried it.
*/
wxPoint BOARD_ITEM::ZeroOffset( 0, 0 ); wxPoint BOARD_ITEM::ZeroOffset( 0, 0 );
@ -180,9 +179,9 @@ void BOARD::ClearProject()
} }
std::vector<MARKER_PCB*> BOARD::ResolveDRCExclusions() std::vector<PCB_MARKER*> BOARD::ResolveDRCExclusions()
{ {
for( MARKER_PCB* marker : GetBoard()->Markers() ) for( PCB_MARKER* marker : GetBoard()->Markers() )
{ {
auto i = m_designSettings->m_DrcExclusions.find( marker->Serialize() ); auto i = m_designSettings->m_DrcExclusions.find( marker->Serialize() );
@ -193,11 +192,11 @@ std::vector<MARKER_PCB*> BOARD::ResolveDRCExclusions()
} }
} }
std::vector<MARKER_PCB*> newMarkers; std::vector<PCB_MARKER*> newMarkers;
for( const wxString& exclusionData : m_designSettings->m_DrcExclusions ) for( const wxString& exclusionData : m_designSettings->m_DrcExclusions )
{ {
MARKER_PCB* marker = MARKER_PCB::Deserialize( exclusionData ); PCB_MARKER* marker = PCB_MARKER::Deserialize( exclusionData );
if( marker ) if( marker )
{ {
@ -565,7 +564,7 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
// this one uses a vector // this one uses a vector
case PCB_MARKER_T: case PCB_MARKER_T:
m_markers.push_back( (MARKER_PCB*) aBoardItem ); m_markers.push_back( (PCB_MARKER*) aBoardItem );
break; break;
// this one uses a vector // this one uses a vector
@ -727,8 +726,8 @@ wxString BOARD::GetSelectMenuText( EDA_UNITS aUnits ) const
void BOARD::DeleteMARKERs() void BOARD::DeleteMARKERs()
{ {
// the vector does not know how to delete the MARKER_PCB, it holds pointers // the vector does not know how to delete the PCB_MARKER, it holds pointers
for( MARKER_PCB* marker : m_markers ) for( PCB_MARKER* marker : m_markers )
delete marker; delete marker;
m_markers.clear(); m_markers.clear();
@ -740,7 +739,7 @@ void BOARD::DeleteMARKERs( bool aWarningsAndErrors, bool aExclusions )
// Deleting lots of items from a vector can be very slow. Copy remaining items instead. // Deleting lots of items from a vector can be very slow. Copy remaining items instead.
MARKERS remaining; MARKERS remaining;
for( MARKER_PCB* marker : m_markers ) for( PCB_MARKER* marker : m_markers )
{ {
if( ( marker->IsExcluded() && aExclusions ) if( ( marker->IsExcluded() && aExclusions )
|| ( !marker->IsExcluded() && aWarningsAndErrors ) ) || ( !marker->IsExcluded() && aWarningsAndErrors ) )
@ -816,7 +815,7 @@ BOARD_ITEM* BOARD::GetItem( const KIID& aID ) const
return drawing; return drawing;
} }
for( MARKER_PCB* marker : m_markers ) for( PCB_MARKER* marker : m_markers )
{ {
if( marker->m_Uuid == aID ) if( marker->m_Uuid == aID )
return marker; return marker;
@ -864,7 +863,7 @@ void BOARD::FillItemMap( std::map<KIID, EDA_ITEM*>& aMap )
for( BOARD_ITEM* drawing : Drawings() ) for( BOARD_ITEM* drawing : Drawings() )
aMap[ drawing->m_Uuid ] = drawing; aMap[ drawing->m_Uuid ] = drawing;
for( MARKER_PCB* marker : m_markers ) for( PCB_MARKER* marker : m_markers )
aMap[ marker->m_Uuid ] = marker; aMap[ marker->m_Uuid ] = marker;
for( PCB_GROUP* group : m_groups ) for( PCB_GROUP* group : m_groups )
@ -1189,7 +1188,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
break; break;
case PCB_MARKER_T: case PCB_MARKER_T:
for( MARKER_PCB* marker : m_markers ) for( PCB_MARKER* marker : m_markers )
{ {
result = marker->Visit( inspector, testData, p ); result = marker->Visit( inspector, testData, p );

View File

@ -44,7 +44,7 @@ class BOARD;
class ZONE; class ZONE;
class TRACK; class TRACK;
class PAD; class PAD;
class MARKER_PCB; class PCB_MARKER;
class MSG_PANEL_ITEM; class MSG_PANEL_ITEM;
class NETLIST; class NETLIST;
class REPORTER; class REPORTER;
@ -164,7 +164,7 @@ public:
}; };
DECL_VEC_FOR_SWIG( MARKERS, MARKER_PCB* ) DECL_VEC_FOR_SWIG( MARKERS, PCB_MARKER* )
DECL_VEC_FOR_SWIG( ZONES, ZONE* ) DECL_VEC_FOR_SWIG( ZONES, ZONE* )
DECL_DEQ_FOR_SWIG( TRACKS, TRACK* ) DECL_DEQ_FOR_SWIG( TRACKS, TRACK* )
// Dequeue rather than Vector just so we can use moveUnflaggedItems in pcbnew_control.cpp // Dequeue rather than Vector just so we can use moveUnflaggedItems in pcbnew_control.cpp
@ -408,7 +408,7 @@ public:
/** /**
* Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS. * Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.
*/ */
std::vector<MARKER_PCB*> ResolveDRCExclusions(); std::vector<PCB_MARKER*> ResolveDRCExclusions();
/** /**
* Reset all high light data to the init state * Reset all high light data to the init state

View File

@ -24,7 +24,7 @@
*/ */
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <connectivity/connectivity_data.h> #include <connectivity/connectivity_data.h>
#include <drc/drc_engine.h> #include <drc/drc_engine.h>
#include <kicad_string.h> #include <kicad_string.h>

View File

@ -26,7 +26,7 @@
#ifndef BOARD_CONNECTED_ITEM_H #ifndef BOARD_CONNECTED_ITEM_H
#define BOARD_CONNECTED_ITEM_H #define BOARD_CONNECTED_ITEM_H
#include <class_board_item.h> #include <board_item.h>
#include <netinfo.h> #include <netinfo.h>
#include <reporter.h> #include <reporter.h>

View File

@ -27,7 +27,7 @@
#ifndef BOARD_ITEM_CONTAINER_H #ifndef BOARD_ITEM_CONTAINER_H
#define BOARD_ITEM_CONTAINER_H #define BOARD_ITEM_CONTAINER_H
#include <class_board_item.h> #include <board_item.h>
#include <zone_settings.h> #include <zone_settings.h>
enum class ADD_MODE enum class ADD_MODE

View File

@ -23,13 +23,13 @@
*/ */
#include <collectors.h> #include <collectors.h>
#include <class_board_item.h> // class BOARD_ITEM #include <board_item.h> // class BOARD_ITEM
#include <footprint.h> #include <footprint.h>
#include <fp_shape.h> #include <fp_shape.h>
#include <pad.h> #include <pad.h>
#include <track.h> #include <track.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <dimension.h> #include <dimension.h>
#include <zone.h> #include <zone.h>
#include <pcb_shape.h> #include <pcb_shape.h>
@ -194,7 +194,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
PAD* pad = nullptr; PAD* pad = nullptr;
bool pad_through = false; bool pad_through = false;
VIA* via = nullptr; VIA* via = nullptr;
MARKER_PCB* marker = nullptr; PCB_MARKER* marker = nullptr;
ZONE* zone = nullptr; ZONE* zone = nullptr;
PCB_SHAPE* shape = nullptr; PCB_SHAPE* shape = nullptr;
DIMENSION_BASE* dimension = nullptr; DIMENSION_BASE* dimension = nullptr;
@ -381,7 +381,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
break; break;
case PCB_MARKER_T: case PCB_MARKER_T:
marker = static_cast<MARKER_PCB*>( item ); marker = static_cast<PCB_MARKER*>( item );
break; break;
default: default:

View File

@ -35,7 +35,7 @@
#include <collector.h> #include <collector.h>
#include <layers_id_colors_and_visibility.h> // LAYER_COUNT, layer defs #include <layers_id_colors_and_visibility.h> // LAYER_COUNT, layer defs
#include <view/view.h> #include <view/view.h>
#include <class_board_item.h> #include <board_item.h>

View File

@ -26,8 +26,8 @@
*/ */
#ifndef PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ #ifndef PCBNEW_CONNECTIVITY_ITEMS_H
#define PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ #define PCBNEW_CONNECTIVITY_ITEMS_H
#include <board.h> #include <board.h>
#include <pad.h> #include <pad.h>
@ -175,32 +175,21 @@ public:
private: private:
BOARD_CONNECTED_ITEM* m_parent; BOARD_CONNECTED_ITEM* m_parent;
///> list of items physically connected (touching) CONNECTED_ITEMS m_connected; ///> list of items physically connected (touching)
CONNECTED_ITEMS m_connected;
CN_ANCHORS m_anchors; CN_ANCHORS m_anchors;
///> visited flag for the BFS scan bool m_canChangeNet; ///> can the net propagator modify the netcode?
bool m_visited;
///> can the net propagator modify the netcode? bool m_visited; ///> visited flag for the BFS scan
bool m_canChangeNet; bool m_valid; ///> used to identify garbage items (we use lazy removal)
///> valid flag, used to identify garbage items (we use lazy removal)
bool m_valid;
///> mutex protecting this item's connected_items set to allow parallel connection threads
std::mutex m_listLock;
std::mutex m_listLock; ///> mutex protecting this item's connected_items set to
///> allow parallel connection threads
protected: protected:
///> dirty flag, used to identify recently added item not yet scanned into the connectivity search bool m_dirty; ///> used to identify recently added item not yet
bool m_dirty; ///> scanned into the connectivity search
LAYER_RANGE m_layers; ///> layer range over which the item exists
///> layer range over which the item exists BOX2I m_bbox; ///> bounding box for the item
LAYER_RANGE m_layers;
///> bounding box for the item
BOX2I m_bbox;
public: public:
void Dump(); void Dump();
@ -224,30 +213,13 @@ public:
m_anchors.emplace_back( std::make_shared<CN_ANCHOR>( aPos, this ) ); m_anchors.emplace_back( std::make_shared<CN_ANCHOR>( aPos, this ) );
} }
CN_ANCHORS& Anchors() CN_ANCHORS& Anchors() { return m_anchors; }
{
return m_anchors;
}
void SetValid( bool aValid ) void SetValid( bool aValid ) { m_valid = aValid; }
{ bool Valid() const { return m_valid; }
m_valid = aValid;
}
bool Valid() const void SetDirty( bool aDirty ) { m_dirty = aDirty; }
{ bool Dirty() const { return m_dirty; }
return m_valid;
}
void SetDirty( bool aDirty )
{
m_dirty = aDirty;
}
bool Dirty() const
{
return m_dirty;
}
/** /**
* Function SetLayers() * Function SetLayers()
@ -304,30 +276,13 @@ public:
return m_parent; return m_parent;
} }
const CONNECTED_ITEMS& ConnectedItems() const const CONNECTED_ITEMS& ConnectedItems() const { return m_connected; }
{ void ClearConnections() { m_connected.clear(); }
return m_connected;
}
void ClearConnections() void SetVisited( bool aVisited ) { m_visited = aVisited; }
{ bool Visited() const { return m_visited; }
m_connected.clear();
}
void SetVisited( bool aVisited ) bool CanChangeNet() const { return m_canChangeNet; }
{
m_visited = aVisited;
}
bool Visited() const
{
return m_visited;
}
bool CanChangeNet() const
{
return m_canChangeNet;
}
void Connect( CN_ITEM* b ) void Connect( CN_ITEM* b )
{ {
@ -382,7 +337,7 @@ public:
bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const
{ {
auto zone = static_cast<ZONE*>( Parent() ); ZONE* zone = static_cast<ZONE*>( Parent() );
int clearance = aAccuracy; int clearance = aAccuracy;
if( zone->GetFilledPolysUseThickness() ) if( zone->GetFilledPolysUseThickness() )
@ -465,20 +420,10 @@ public:
m_index.Query( aItem->BBox(), aItem->Layers(), aFunc ); m_index.Query( aItem->BBox(), aItem->Layers(), aFunc );
} }
void SetHasInvalid( bool aInvalid = true ) void SetHasInvalid( bool aInvalid = true ) { m_hasInvalid = aInvalid; }
{
m_hasInvalid = aInvalid;
}
void SetDirty( bool aDirty = true ) void SetDirty( bool aDirty = true ) { m_dirty = aDirty; }
{ bool IsDirty() const { return m_dirty; }
m_dirty = aDirty;
}
bool IsDirty() const
{
return m_dirty;
}
void RemoveInvalidItems( std::vector<CN_ITEM*>& aGarbage ); void RemoveInvalidItems( std::vector<CN_ITEM*>& aGarbage );
@ -517,7 +462,6 @@ public:
class CN_CLUSTER class CN_CLUSTER
{ {
private: private:
bool m_conflicting = false; bool m_conflicting = false;
int m_originNet = 0; int m_originNet = 0;
CN_ITEM* m_originPad = nullptr; CN_ITEM* m_originPad = nullptr;
@ -527,15 +471,8 @@ public:
CN_CLUSTER(); CN_CLUSTER();
~CN_CLUSTER(); ~CN_CLUSTER();
bool HasValidNet() const bool HasValidNet() const { return m_originNet > 0; }
{ int OriginNet() const { return m_originNet; }
return m_originNet > 0;
}
int OriginNet() const
{
return m_originNet;
}
wxString OriginNetName() const; wxString OriginNetName() const;
@ -543,25 +480,11 @@ public:
bool Contains( const BOARD_CONNECTED_ITEM* aItem ); bool Contains( const BOARD_CONNECTED_ITEM* aItem );
void Dump(); void Dump();
int Size() const int Size() const { return m_items.size(); }
{
return m_items.size();
}
bool HasNet() const bool IsOrphaned() const { return m_originPad == nullptr; }
{
return m_originNet > 0;
}
bool IsOrphaned() const bool IsConflicting() const { return m_conflicting; }
{
return m_originPad == nullptr;
}
bool IsConflicting() const
{
return m_conflicting;
}
void Add( CN_ITEM* item ); void Add( CN_ITEM* item );
@ -574,4 +497,4 @@ public:
typedef std::shared_ptr<CN_CLUSTER> CN_CLUSTER_PTR; typedef std::shared_ptr<CN_CLUSTER> CN_CLUSTER_PTR;
#endif /* PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ */ #endif /* PCBNEW_CONNECTIVITY_ITEMS_H */

View File

@ -29,7 +29,7 @@
#include <dialog_create_array_base.h> #include <dialog_create_array_base.h>
#include <array_options.h> #include <array_options.h>
#include <class_board_item.h> #include <board_item.h>
#include <pcb_base_frame.h> #include <pcb_base_frame.h>
#include <widgets/unit_binder.h> #include <widgets/unit_binder.h>

View File

@ -33,7 +33,7 @@
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
#include <tools/pcb_actions.h> #include <tools/pcb_actions.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <wx/wupdlock.h> #include <wx/wupdlock.h>
#include <widgets/appearance_controls.h> #include <widgets/appearance_controls.h>
#include <widgets/number_badge.h> #include <widgets/number_badge.h>
@ -428,7 +428,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
{ {
case 1: case 1:
{ {
MARKER_PCB* marker = dynamic_cast<MARKER_PCB*>( node->m_RcItem->GetParent() ); PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
if( marker ) if( marker )
{ {
@ -444,7 +444,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
case 2: case 2:
{ {
MARKER_PCB* marker = dynamic_cast<MARKER_PCB*>( node->m_RcItem->GetParent() ); PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
if( marker ) if( marker )
{ {
@ -465,7 +465,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
case 3: case 3:
bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR; bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR;
for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() ) for( PCB_MARKER* marker : m_brdEditor->GetBoard()->Markers() )
{ {
if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() ) if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
m_brdEditor->GetCanvas()->GetView()->Update( marker ); m_brdEditor->GetCanvas()->GetView()->Update( marker );
@ -479,7 +479,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
case 4: case 4:
bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING; bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING;
for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() ) for( PCB_MARKER* marker : m_brdEditor->GetBoard()->Markers() )
{ {
if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() ) if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
m_brdEditor->GetCanvas()->GetView()->Update( marker ); m_brdEditor->GetCanvas()->GetView()->Update( marker );
@ -494,7 +494,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
{ {
bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE; bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
std::vector<MARKER_PCB*>& markers = m_brdEditor->GetBoard()->Markers(); std::vector<PCB_MARKER*>& markers = m_brdEditor->GetBoard()->Markers();
for( unsigned i = 0; i < markers.size(); ) for( unsigned i = 0; i < markers.size(); )
{ {

View File

@ -29,7 +29,7 @@
#include <wx/htmllbox.h> #include <wx/htmllbox.h>
#include <rc_item.h> #include <rc_item.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <board.h> #include <board.h>
#include <dialog_drc_base.h> #include <dialog_drc_base.h>
#include <widgets/progress_reporter.h> #include <widgets/progress_reporter.h>

View File

@ -24,7 +24,7 @@
*/ */
#include <board.h> #include <board.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <footprint.h> #include <footprint.h>
#include <pcb_text.h> #include <pcb_text.h>
#include <fp_text.h> #include <fp_text.h>
@ -260,7 +260,7 @@ void DIALOG_FIND::search( bool aDirection )
if( FindIncludeMarkers ) if( FindIncludeMarkers )
{ {
for( MARKER_PCB* marker : m_frame->GetBoard()->Markers() ) for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
{ {
if( marker->Matches( m_frame->GetFindReplaceData(), nullptr ) ) if( marker->Matches( m_frame->GetFindReplaceData(), nullptr ) )
m_hitList.push_back( marker ); m_hitList.push_back( marker );

View File

@ -31,7 +31,7 @@
#include <wx/event.h> #include <wx/event.h>
#include <deque> #include <deque>
#include <class_board_item.h> #include <board_item.h>
#include <dialog_find_base.h> #include <dialog_find_base.h>

View File

@ -229,7 +229,7 @@ void DIALOG_PLOT::reInitDialog()
int knownViolations = 0; int knownViolations = 0;
int exclusions = 0; int exclusions = 0;
for( MARKER_PCB* marker : m_parent->GetBoard()->Markers() ) for( PCB_MARKER* marker : m_parent->GetBoard()->Markers() )
{ {
if( marker->IsExcluded() ) if( marker->IsExcluded() )
exclusions++; exclusions++;

View File

@ -305,7 +305,7 @@ void DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
// for now, display only the text within the DIMENSION using class PCB_TEXT. // for now, display only the text within the DIMENSION using class PCB_TEXT.
wxString msg; wxString msg;
wxCHECK_RET( m_Parent != NULL, wxT( "PCB_TEXT::GetMsgPanelInfo() m_Parent is NULL." ) ); wxCHECK_RET( m_parent != NULL, wxT( "PCB_TEXT::GetMsgPanelInfo() m_Parent is NULL." ) );
aList.emplace_back( _( "Dimension" ), m_text.GetShownText(), DARKGREEN ); aList.emplace_back( _( "Dimension" ), m_text.GetShownText(), DARKGREEN );

View File

@ -26,7 +26,7 @@
#define DIMENSION_H #define DIMENSION_H
#include <class_board_item.h> #include <board_item.h>
#include <pcb_text.h> #include <pcb_text.h>
#include <geometry/shape.h> #include <geometry/shape.h>

View File

@ -36,7 +36,7 @@ class DRC_TEST_PROVIDER;
class PCB_EDIT_FRAME; class PCB_EDIT_FRAME;
class BOARD_ITEM; class BOARD_ITEM;
class BOARD; class BOARD;
class MARKER_PCB; class PCB_MARKER;
class NETCLASS; class NETCLASS;
class NETLIST; class NETLIST;
class NETINFO_ITEM; class NETINFO_ITEM;

View File

@ -26,7 +26,7 @@
#define DRC_PROVIDER__H #define DRC_PROVIDER__H
#include <board.h> #include <board.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <pcb_base_frame.h> #include <pcb_base_frame.h>
#include <drc/drc_item.h> #include <drc/drc_item.h>
#include <widgets/ui_common.h> #include <widgets/ui_common.h>
@ -44,7 +44,7 @@ private:
BOARD* m_board; BOARD* m_board;
int m_severities; int m_severities;
std::vector<MARKER_PCB*> m_filteredMarkers; std::vector<PCB_MARKER*> m_filteredMarkers;
public: public:
BOARD_DRC_ITEMS_PROVIDER( BOARD* aBoard ) : BOARD_DRC_ITEMS_PROVIDER( BOARD* aBoard ) :
@ -61,7 +61,7 @@ public:
m_filteredMarkers.clear(); m_filteredMarkers.clear();
for( MARKER_PCB* marker : m_board->Markers() ) for( PCB_MARKER* marker : m_board->Markers() )
{ {
int markerSeverity; int markerSeverity;
@ -84,7 +84,7 @@ public:
int count = 0; int count = 0;
for( MARKER_PCB* marker : m_board->Markers() ) for( PCB_MARKER* marker : m_board->Markers() )
{ {
int markerSeverity; int markerSeverity;
@ -102,14 +102,14 @@ public:
std::shared_ptr<RC_ITEM> GetItem( int aIndex ) override std::shared_ptr<RC_ITEM> GetItem( int aIndex ) override
{ {
MARKER_PCB* marker = m_filteredMarkers[ aIndex ]; PCB_MARKER* marker = m_filteredMarkers[ aIndex ];
return marker ? marker->GetRCItem() : nullptr; return marker ? marker->GetRCItem() : nullptr;
} }
void DeleteItem( int aIndex, bool aDeep ) override void DeleteItem( int aIndex, bool aDeep ) override
{ {
MARKER_PCB* marker = m_filteredMarkers[ aIndex ]; PCB_MARKER* marker = m_filteredMarkers[ aIndex ];
m_filteredMarkers.erase( m_filteredMarkers.begin() + aIndex ); m_filteredMarkers.erase( m_filteredMarkers.begin() + aIndex );
if( aDeep ) if( aDeep )

View File

@ -26,7 +26,7 @@
#define DRC_RTREE_H_ #define DRC_RTREE_H_
#include <eda_rect.h> #include <eda_rect.h>
#include <class_board_item.h> #include <board_item.h>
#include <track.h> #include <track.h>
#include <unordered_set> #include <unordered_set>
#include <set> #include <set>

View File

@ -23,7 +23,7 @@
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <drc/drc_rule.h> #include <drc/drc_rule.h>
#include <drc/drc_rule_condition.h> #include <drc/drc_rule_condition.h>

View File

@ -22,7 +22,7 @@
*/ */
#include <class_board_item.h> #include <board_item.h>
#include <reporter.h> #include <reporter.h>
#include <drc/drc_rule_condition.h> #include <drc/drc_rule_condition.h>
#include <pcb_expr_evaluator.h> #include <pcb_expr_evaluator.h>

View File

@ -26,7 +26,7 @@
#define DRC_TEST_PROVIDER__H #define DRC_TEST_PROVIDER__H
#include <board.h> #include <board.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <functional> #include <functional>
#include <set> #include <set>

View File

@ -24,7 +24,7 @@
#include <kiface_i.h> #include <kiface_i.h>
#include <pcb_edit_frame.h> #include <pcb_edit_frame.h>
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <footprint.h> #include <footprint.h>
#include <track.h> #include <track.h>
#include <zone.h> #include <zone.h>

View File

@ -28,7 +28,7 @@
#include <deque> #include <deque>
#include <board_item_container.h> #include <board_item_container.h>
#include <class_board_item.h> #include <board_item.h>
#include <collectors.h> #include <collectors.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>
#include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition. #include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition.

View File

@ -191,7 +191,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* aParent
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) ); m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6)
.BestSize( -1, m_MsgFrameHeight ) ); .BestSize( -1, m_msgFrameHeight ) );
m_auimgr.AddPane( m_parametersPanel, EDA_PANE().Palette().Name( "Params" ).Left().Position(0) m_auimgr.AddPane( m_parametersPanel, EDA_PANE().Palette().Name( "Params" ).Left().Position(0)
.Caption( _( "Parameters" ) ).MinSize( 360, 180 ) ); .Caption( _( "Parameters" ) ).MinSize( 360, 180 ) );

View File

@ -51,7 +51,7 @@ FP_SHAPE::~FP_SHAPE()
void FP_SHAPE::SetLocalCoord() void FP_SHAPE::SetLocalCoord()
{ {
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
if( fp == NULL ) if( fp == NULL )
{ {
@ -79,7 +79,7 @@ void FP_SHAPE::SetLocalCoord()
void FP_SHAPE::SetDrawCoord() void FP_SHAPE::SetDrawCoord()
{ {
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
m_start = m_Start0; m_start = m_Start0;
m_end = m_End0; m_end = m_End0;
@ -108,7 +108,7 @@ void FP_SHAPE::SetDrawCoord()
std::shared_ptr<SHAPE> FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const std::shared_ptr<SHAPE> FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
{ {
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
std::vector<SHAPE*> shapes = MakeEffectiveShapes(); std::vector<SHAPE*> shapes = MakeEffectiveShapes();
for( SHAPE* shape : shapes ) for( SHAPE* shape : shapes )
@ -125,7 +125,7 @@ std::shared_ptr<SHAPE> FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{ {
wxString msg; wxString msg;
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
if( !fp ) if( !fp )
return; return;

View File

@ -35,7 +35,7 @@ FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) :
BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ), BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ),
EDA_TEXT() EDA_TEXT()
{ {
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
m_Type = text_type; m_Type = text_type;
m_keepUpright = true; m_keepUpright = true;
@ -197,7 +197,7 @@ int FP_TEXT::GetLength() const
void FP_TEXT::SetDrawCoord() void FP_TEXT::SetDrawCoord()
{ {
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_Parent ); const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_parent );
SetTextPos( m_Pos0 ); SetTextPos( m_Pos0 );
@ -216,7 +216,7 @@ void FP_TEXT::SetDrawCoord()
void FP_TEXT::SetLocalCoord() void FP_TEXT::SetLocalCoord()
{ {
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_Parent ); const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_parent );
if( parentFootprint ) if( parentFootprint )
{ {
@ -246,7 +246,7 @@ const EDA_RECT FP_TEXT::GetBoundingBox() const
double FP_TEXT::GetDrawRotation() const double FP_TEXT::GetDrawRotation() const
{ {
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
double rotation = GetTextAngle(); double rotation = GetTextAngle();
if( parentFootprint ) if( parentFootprint )
@ -273,7 +273,7 @@ double FP_TEXT::GetDrawRotation() const
// see class_text_mod.h // see class_text_mod.h
void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{ {
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
if( parentFootprint == NULL ) // Happens in modedit, and for new texts if( parentFootprint == NULL ) // Happens in modedit, and for new texts
return; return;

View File

@ -26,7 +26,7 @@
#define FP_TEXT_H #define FP_TEXT_H
#include <eda_text.h> #include <eda_text.h>
#include <class_board_item.h> #include <board_item.h>
class LINE_READER; class LINE_READER;
class EDA_RECT; class EDA_RECT;

View File

@ -31,7 +31,7 @@
#define KICAD_CLIPBOARD_H #define KICAD_CLIPBOARD_H
#include <plugins/kicad/kicad_plugin.h> #include <plugins/kicad/kicad_plugin.h>
#include <class_board_item.h> #include <board_item.h>
#include <footprint.h> #include <footprint.h>
#include <plugins/kicad/pcb_parser.h> #include <plugins/kicad/pcb_parser.h>
#include <memory.h> #include <memory.h>

View File

@ -23,7 +23,7 @@
#include <bitmaps.h> #include <bitmaps.h>
#include <board_commit.h> #include <board_commit.h>
#include <class_board_item.h> #include <board_item.h>
#include <class_draw_panel_gal.h> #include <class_draw_panel_gal.h>
#include <footprint.h> #include <footprint.h>
#include <confirm.h> #include <confirm.h>

View File

@ -32,7 +32,7 @@
#include <macros_swig.h> #include <macros_swig.h>
#include <gr_basic.h> #include <gr_basic.h>
#include <netclass.h> #include <netclass.h>
#include <class_board_item.h> #include <board_item.h>

View File

@ -53,7 +53,7 @@ PAD::PAD( FOOTPRINT* parent ) :
m_orient = 0; // Pad rotation in 1/10 degrees. m_orient = 0; // Pad rotation in 1/10 degrees.
m_lengthPadToDie = 0; m_lengthPadToDie = 0;
if( m_Parent && m_Parent->Type() == PCB_FOOTPRINT_T ) if( m_parent && m_parent->Type() == PCB_FOOTPRINT_T )
{ {
m_pos = GetParent()->GetPosition(); m_pos = GetParent()->GetPosition();
} }
@ -477,7 +477,7 @@ const EDA_RECT PAD::GetBoundingBox() const
void PAD::SetDrawCoord() void PAD::SetDrawCoord()
{ {
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
m_pos = m_pos0; m_pos = m_pos0;
@ -495,7 +495,7 @@ void PAD::SetDrawCoord()
void PAD::SetLocalCoord() void PAD::SetLocalCoord()
{ {
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
if( parentFootprint == NULL ) if( parentFootprint == NULL )
{ {
@ -805,7 +805,7 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
wxString msg, msg2; wxString msg, msg2;
BOARD* board = GetBoard(); BOARD* board = GetBoard();
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent ); FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
if( parentFootprint ) if( parentFootprint )
aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference(), DARKCYAN ); aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference(), DARKCYAN );
@ -1240,7 +1240,7 @@ const BOX2I PAD::ViewBBox() const
FOOTPRINT* PAD::GetParent() const FOOTPRINT* PAD::GetParent() const
{ {
return dynamic_cast<FOOTPRINT*>( m_Parent ); return dynamic_cast<FOOTPRINT*>( m_parent );
} }

View File

@ -27,7 +27,7 @@
#include <zones.h> #include <zones.h>
#include <board_connected_item.h> #include <board_connected_item.h>
#include <class_board_item.h> #include <board_item.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>
#include <geometry/shape_compound.h> #include <geometry/shape_compound.h>

View File

@ -23,7 +23,7 @@
*/ */
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <pcb_shape.h> #include <pcb_shape.h>
#include <pad.h> #include <pad.h>
#include <convert_basic_shapes_to_polygon.h> #include <convert_basic_shapes_to_polygon.h>

View File

@ -634,7 +634,7 @@ void PCB_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
if( cfg ) if( cfg )
{ {
m_displayOptions = cfg->m_Display; m_displayOptions = cfg->m_Display;
m_PolarCoords = cfg->m_PolarCoords; m_polarCoords = cfg->m_PolarCoords;
} }
wxASSERT( GetCanvas() ); wxASSERT( GetCanvas() );
@ -674,7 +674,7 @@ void PCB_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
if( cfg ) if( cfg )
{ {
cfg->m_Display = m_displayOptions; cfg->m_Display = m_displayOptions;
cfg->m_PolarCoords = m_PolarCoords; cfg->m_PolarCoords = m_polarCoords;
} }
} }

View File

@ -32,7 +32,7 @@
#include <board.h> #include <board.h>
#include <footprint.h> #include <footprint.h>
#include <track.h> #include <track.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <pcb_base_frame.h> #include <pcb_base_frame.h>
#include <pcbnew_settings.h> #include <pcbnew_settings.h>
#include <ratsnest/ratsnest_data.h> #include <ratsnest/ratsnest_data.h>
@ -201,7 +201,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard )
m_view->Add( footprint ); m_view->Add( footprint );
// DRC markers // DRC markers
for( MARKER_PCB* marker : aBoard->Markers() ) for( PCB_MARKER* marker : aBoard->Markers() )
m_view->Add( marker ); m_view->Add( marker );
// Finalize the triangulation threads // Finalize the triangulation threads

View File

@ -725,7 +725,7 @@ void PCB_EDIT_FRAME::RecordDRCExclusions()
BOARD_DESIGN_SETTINGS& bds = GetBoard()->GetDesignSettings(); BOARD_DESIGN_SETTINGS& bds = GetBoard()->GetDesignSettings();
bds.m_DrcExclusions.clear(); bds.m_DrcExclusions.clear();
for( MARKER_PCB* marker : GetBoard()->Markers() ) for( PCB_MARKER* marker : GetBoard()->Markers() )
{ {
if( marker->IsExcluded() ) if( marker->IsExcluded() )
bds.m_DrcExclusions.insert( marker->Serialize() ); bds.m_DrcExclusions.insert( marker->Serialize() );
@ -737,12 +737,12 @@ void PCB_EDIT_FRAME::ResolveDRCExclusions()
{ {
BOARD_COMMIT commit( this ); BOARD_COMMIT commit( this );
for( MARKER_PCB* marker : GetBoard()->ResolveDRCExclusions() ) for( PCB_MARKER* marker : GetBoard()->ResolveDRCExclusions() )
commit.Add( marker ); commit.Add( marker );
commit.Push( wxEmptyString, false, false ); commit.Push( wxEmptyString, false, false );
for( MARKER_PCB* marker : GetBoard()->Markers() ) for( PCB_MARKER* marker : GetBoard()->Markers() )
{ {
if( marker->IsExcluded() ) if( marker->IsExcluded() )
{ {

View File

@ -49,7 +49,7 @@ class ZONE;
class GENERAL_COLLECTOR; class GENERAL_COLLECTOR;
class GENERAL_COLLECTORS_GUIDE; class GENERAL_COLLECTORS_GUIDE;
class SELECTION; class SELECTION;
class MARKER_PCB; class PCB_MARKER;
class BOARD_ITEM; class BOARD_ITEM;
class PCB_LAYER_BOX_SELECTOR; class PCB_LAYER_BOX_SELECTOR;
class NETLIST; class NETLIST;

View File

@ -23,7 +23,7 @@
*/ */
#include <bitmaps.h> #include <bitmaps.h>
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <pcb_group.h> #include <pcb_group.h>
#include <confirm.h> #include <confirm.h>
#include <widgets/msgpanel.h> #include <widgets/msgpanel.h>

View File

@ -27,7 +27,7 @@
#include <base_units.h> #include <base_units.h>
#include <pcb_base_frame.h> #include <pcb_base_frame.h>
#include <board.h> #include <board.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
#include <settings/color_settings.h> #include <settings/color_settings.h>
#include <settings/settings_manager.h> #include <settings/settings_manager.h>
@ -42,7 +42,7 @@
MARKER_PCB::MARKER_PCB( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition ) : PCB_MARKER::PCB_MARKER( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition ) :
BOARD_ITEM( nullptr, PCB_MARKER_T ), // parent set during BOARD::Add() BOARD_ITEM( nullptr, PCB_MARKER_T ), // parent set during BOARD::Add()
MARKER_BASE( SCALING_FACTOR, aItem ) MARKER_BASE( SCALING_FACTOR, aItem )
{ {
@ -54,12 +54,12 @@ MARKER_PCB::MARKER_PCB( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition
/* destructor */ /* destructor */
MARKER_PCB::~MARKER_PCB() PCB_MARKER::~PCB_MARKER()
{ {
} }
wxString MARKER_PCB::Serialize() const wxString PCB_MARKER::Serialize() const
{ {
return wxString::Format( wxT( "%s|%d|%d|%s|%s" ), return wxString::Format( wxT( "%s|%d|%d|%s|%s" ),
m_rcItem->GetSettingsKey(), m_rcItem->GetSettingsKey(),
@ -70,7 +70,7 @@ wxString MARKER_PCB::Serialize() const
} }
MARKER_PCB* MARKER_PCB::Deserialize( const wxString& data ) PCB_MARKER* PCB_MARKER::Deserialize( const wxString& data )
{ {
wxArrayString props = wxSplit( data, '|' ); wxArrayString props = wxSplit( data, '|' );
wxPoint markerPos( (int) strtol( props[1].c_str(), nullptr, 10 ), wxPoint markerPos( (int) strtol( props[1].c_str(), nullptr, 10 ),
@ -83,11 +83,11 @@ MARKER_PCB* MARKER_PCB::Deserialize( const wxString& data )
drcItem->SetItems( KIID( props[3] ), KIID( props[4] ) ); drcItem->SetItems( KIID( props[3] ), KIID( props[4] ) );
return new MARKER_PCB( drcItem, markerPos ); return new PCB_MARKER( drcItem, markerPos );
} }
void MARKER_PCB::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) void PCB_MARKER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{ {
aList.emplace_back( _( "Type" ), _( "Marker" ), DARKCYAN ); aList.emplace_back( _( "Type" ), _( "Marker" ), DARKCYAN );
aList.emplace_back( _( "Violation" ), m_rcItem->GetErrorMessage(), RED ); aList.emplace_back( _( "Violation" ), m_rcItem->GetErrorMessage(), RED );
@ -113,13 +113,13 @@ void MARKER_PCB::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
} }
void MARKER_PCB::Rotate(const wxPoint& aRotCentre, double aAngle) void PCB_MARKER::Rotate( const wxPoint& aRotCentre, double aAngle)
{ {
RotatePoint( &m_Pos, aRotCentre, aAngle ); RotatePoint( &m_Pos, aRotCentre, aAngle );
} }
void MARKER_PCB::Flip(const wxPoint& aCentre, bool aFlipLeftRight ) void PCB_MARKER::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
{ {
if( aFlipLeftRight ) if( aFlipLeftRight )
m_Pos.x = aCentre.x - ( m_Pos.x - aCentre.x ); m_Pos.x = aCentre.x - ( m_Pos.x - aCentre.x );
@ -128,7 +128,7 @@ void MARKER_PCB::Flip(const wxPoint& aCentre, bool aFlipLeftRight )
} }
wxString MARKER_PCB::GetSelectMenuText( EDA_UNITS aUnits ) const wxString PCB_MARKER::GetSelectMenuText( EDA_UNITS aUnits ) const
{ {
// m_rcItem->GetErrorMessage() could be used instead, but is probably too long // m_rcItem->GetErrorMessage() could be used instead, but is probably too long
// for menu duty. // for menu duty.
@ -136,13 +136,13 @@ wxString MARKER_PCB::GetSelectMenuText( EDA_UNITS aUnits ) const
} }
BITMAP_DEF MARKER_PCB::GetMenuImage() const BITMAP_DEF PCB_MARKER::GetMenuImage() const
{ {
return drc_xpm; return drc_xpm;
} }
void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const void PCB_MARKER::ViewGetLayers( int aLayers[], int& aCount ) const
{ {
aCount = 2; aCount = 2;
@ -170,7 +170,7 @@ void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const
} }
GAL_LAYER_ID MARKER_PCB::GetColorLayer() const GAL_LAYER_ID PCB_MARKER::GetColorLayer() const
{ {
if( IsExcluded() ) if( IsExcluded() )
return LAYER_DRC_EXCLUSION; return LAYER_DRC_EXCLUSION;
@ -191,14 +191,14 @@ GAL_LAYER_ID MARKER_PCB::GetColorLayer() const
} }
KIGFX::COLOR4D MARKER_PCB::getColor() const KIGFX::COLOR4D PCB_MARKER::getColor() const
{ {
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings(); COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
return colors->GetColor( GetColorLayer() ); return colors->GetColor( GetColorLayer() );
} }
const EDA_RECT MARKER_PCB::GetBoundingBox() const const EDA_RECT PCB_MARKER::GetBoundingBox() const
{ {
EDA_RECT bbox = m_shapeBoundingBox; EDA_RECT bbox = m_shapeBoundingBox;
@ -211,7 +211,7 @@ const EDA_RECT MARKER_PCB::GetBoundingBox() const
} }
const BOX2I MARKER_PCB::ViewBBox() const const BOX2I PCB_MARKER::ViewBBox() const
{ {
EDA_RECT bbox = GetBoundingBox(); EDA_RECT bbox = GetBoundingBox();
return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), bbox.GetHeight() ) ); return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), bbox.GetHeight() ) );

View File

@ -22,16 +22,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** #ifndef PCB_MARKER_H
* @file class_marker_pcb.h #define PCB_MARKER_H
* @brief Markers used to show a drc problem on boards.
*/
#ifndef CLASS_MARKER_PCB_H
#define CLASS_MARKER_PCB_H
#include <class_board_item.h> #include <board_item.h>
#include <drc/drc_item.h> #include <drc/drc_item.h>
#include <marker_base.h> #include <marker_base.h>
@ -43,11 +38,11 @@ class DRC_ITEM;
class MSG_PANEL_ITEM; class MSG_PANEL_ITEM;
class MARKER_PCB : public BOARD_ITEM, public MARKER_BASE class PCB_MARKER : public BOARD_ITEM, public MARKER_BASE
{ {
public: public:
MARKER_PCB( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition ); PCB_MARKER( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition );
~MARKER_PCB(); ~PCB_MARKER();
static inline bool ClassOf( const EDA_ITEM* aItem ) static inline bool ClassOf( const EDA_ITEM* aItem )
{ {
@ -58,7 +53,7 @@ public:
wxString Serialize() const; wxString Serialize() const;
static MARKER_PCB* Deserialize( const wxString& data ); static PCB_MARKER* Deserialize( const wxString& data );
void Move(const wxPoint& aMoveVector) override void Move(const wxPoint& aMoveVector) override
{ {
@ -106,15 +101,15 @@ public:
#endif #endif
/** Get class name /** Get class name
* @return string "MARKER_PCB" * @return string "PCB_MARKER"
*/ */
virtual wxString GetClass() const override virtual wxString GetClass() const override
{ {
return wxT( "MARKER_PCB" ); return wxT( "PCB_MARKER" );
} }
protected: protected:
KIGFX::COLOR4D getColor() const override; KIGFX::COLOR4D getColor() const override;
}; };
#endif // CLASS_MARKER_PCB_H #endif // PCB_MARKER_H

View File

@ -32,7 +32,7 @@
#include <kicad_string.h> #include <kicad_string.h>
#include <zone.h> #include <zone.h>
#include <pcb_text.h> #include <pcb_text.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <dimension.h> #include <dimension.h>
#include <pcb_target.h> #include <pcb_target.h>
@ -467,7 +467,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
break; break;
case PCB_MARKER_T: case PCB_MARKER_T:
draw( static_cast<const MARKER_PCB*>( item ), aLayer ); draw( static_cast<const PCB_MARKER*>( item ), aLayer );
break; break;
default: default:
@ -1636,7 +1636,7 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget )
} }
void PCB_PAINTER::draw( const MARKER_PCB* aMarker, int aLayer ) void PCB_PAINTER::draw( const PCB_MARKER* aMarker, int aLayer )
{ {
bool isShadow = aLayer == LAYER_MARKER_SHADOWS; bool isShadow = aLayer == LAYER_MARKER_SHADOWS;

View File

@ -49,7 +49,7 @@ class PCB_TEXT;
class FP_TEXT; class FP_TEXT;
class DIMENSION_BASE; class DIMENSION_BASE;
class PCB_TARGET; class PCB_TARGET;
class MARKER_PCB; class PCB_MARKER;
class NET_SETTINGS; class NET_SETTINGS;
class NETINFO_LIST; class NETINFO_LIST;
@ -293,7 +293,7 @@ protected:
void draw( const ZONE* aZone, int aLayer ); void draw( const ZONE* aZone, int aLayer );
void draw( const DIMENSION_BASE* aDimension, int aLayer ); void draw( const DIMENSION_BASE* aDimension, int aLayer );
void draw( const PCB_TARGET* aTarget ); void draw( const PCB_TARGET* aTarget );
void draw( const MARKER_PCB* aMarker, int aLayer ); void draw( const PCB_MARKER* aMarker, int aLayer );
/** /**
* Function getLineThickness() * Function getLineThickness()

View File

@ -47,7 +47,7 @@ PCB_SHAPE::PCB_SHAPE( BOARD_ITEM* aParent, KICAD_T idtype ) :
{ {
m_angle = 0; m_angle = 0;
m_filled = false; m_filled = false;
m_Flags = 0; m_flags = 0;
m_shape = S_SEGMENT; m_shape = S_SEGMENT;
m_width = Millimeter2iu( DEFAULT_LINE_WIDTH ); m_width = Millimeter2iu( DEFAULT_LINE_WIDTH );
} }
@ -456,10 +456,10 @@ void PCB_SHAPE::SetAngle( double aAngle, bool aUpdateEnd )
FOOTPRINT* PCB_SHAPE::GetParentFootprint() const FOOTPRINT* PCB_SHAPE::GetParentFootprint() const
{ {
if( !m_Parent || m_Parent->Type() != PCB_FOOTPRINT_T ) if( !m_parent || m_parent->Type() != PCB_FOOTPRINT_T )
return NULL; return NULL;
return (FOOTPRINT*) m_Parent; return (FOOTPRINT*) m_parent;
} }
@ -1223,9 +1223,9 @@ void PCB_SHAPE::SwapData( BOARD_ITEM* aImage )
std::swap( m_bezierPoints, image->m_bezierPoints ); std::swap( m_bezierPoints, image->m_bezierPoints );
std::swap( m_poly, image->m_poly ); std::swap( m_poly, image->m_poly );
std::swap( m_layer, image->m_layer ); std::swap( m_layer, image->m_layer );
std::swap( m_Flags, image->m_Flags ); std::swap( m_flags, image->m_flags );
std::swap( m_Status, image->m_Status ); std::swap( m_status, image->m_status );
std::swap( m_Parent, image->m_Parent ); std::swap( m_parent, image->m_parent );
std::swap( m_forceVisible, image->m_forceVisible ); std::swap( m_forceVisible, image->m_forceVisible );
} }

View File

@ -25,7 +25,7 @@
#ifndef PCB_SHAPE_H #ifndef PCB_SHAPE_H
#define PCB_SHAPE_H #define PCB_SHAPE_H
#include <class_board_item.h> #include <board_item.h>
#include <eda_units.h> #include <eda_units.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>
#include <math/util.h> // for KiROUND #include <math/util.h> // for KiROUND

View File

@ -25,7 +25,7 @@
#ifndef PCB_TARGET_H #ifndef PCB_TARGET_H
#define PCB_TARGET_H #define PCB_TARGET_H
#include <class_board_item.h> #include <board_item.h>
class EDA_RECT; class EDA_RECT;

View File

@ -107,7 +107,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
{ {
wxString msg; wxString msg;
wxCHECK_RET( m_Parent != NULL, wxT( "PCB_TEXT::GetMsgPanelInfo() m_Parent is NULL." ) ); wxCHECK_RET( m_parent != NULL, wxT( "PCB_TEXT::GetMsgPanelInfo() m_Parent is NULL." ) );
aList.emplace_back( _( "PCB Text" ), GetShownText(), DARKGREEN ); aList.emplace_back( _( "PCB Text" ), GetShownText(), DARKGREEN );

View File

@ -26,7 +26,7 @@
#define PCB_TEXT_H #define PCB_TEXT_H
#include <eda_text.h> #include <eda_text.h>
#include <class_board_item.h> #include <board_item.h>
class LINE_READER; class LINE_READER;

View File

@ -27,7 +27,7 @@
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
#include <view/view.h> #include <view/view.h>
#include <class_board_item.h> #include <board_item.h>
class PCB_DISPLAY_OPTIONS; class PCB_DISPLAY_OPTIONS;

View File

@ -52,7 +52,7 @@
#include <pcb_plot_params.h> // for PCB_PLOT_PARAMS, PCB_PL... #include <pcb_plot_params.h> // for PCB_PLOT_PARAMS, PCB_PL...
#include <board.h> #include <board.h>
#include <class_board_item.h> // for BOARD_ITEM, S_CIRCLE #include <board_item.h> // for BOARD_ITEM, S_CIRCLE
#include <dimension.h> #include <dimension.h>
#include <pcb_shape.h> #include <pcb_shape.h>
#include <fp_shape.h> #include <fp_shape.h>

View File

@ -649,7 +649,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
if( sorted_drawings.size() ) if( sorted_drawings.size() )
m_out->Print( 0, "\n" ); m_out->Print( 0, "\n" );
// Do not save MARKER_PCBs, they can be regenerated easily. // Do not save PCB_MARKERs, they can be regenerated easily.
// Save the tracks and vias. // Save the tracks and vias.
for( TRACK* track : sorted_tracks ) for( TRACK* track : sorted_tracks )

View File

@ -57,7 +57,7 @@ class PCB_GROUP;
class PCB_TARGET; class PCB_TARGET;
class VIA; class VIA;
class ZONE; class ZONE;
class MARKER_PCB; class PCB_MARKER;
class FP_3DMODEL; class FP_3DMODEL;
struct LAYER; struct LAYER;
@ -176,7 +176,7 @@ class PCB_PARSER : public PCB_LEXER
VIA* parseVIA(); VIA* parseVIA();
ZONE* parseZONE( BOARD_ITEM_CONTAINER* aParent ); ZONE* parseZONE( BOARD_ITEM_CONTAINER* aParent );
PCB_TARGET* parsePCB_TARGET(); PCB_TARGET* parsePCB_TARGET();
MARKER_PCB* parseMARKER( BOARD_ITEM_CONTAINER* aParent ); PCB_MARKER* parseMARKER( BOARD_ITEM_CONTAINER* aParent );
BOARD* parseBOARD(); BOARD* parseBOARD();
void parseGROUP( BOARD_ITEM* aParent ); void parseGROUP( BOARD_ITEM* aParent );

View File

@ -20,7 +20,7 @@
*/ */
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <netinfo.h> #include <netinfo.h>
#include "pns_node.h" #include "pns_node.h"

View File

@ -31,7 +31,7 @@
#include "pns_utils.h" #include "pns_utils.h"
#include "pns_walkaround.h" #include "pns_walkaround.h"
#include <class_board_item.h> #include <board_item.h>
#include <memory> #include <memory>

View File

@ -23,7 +23,7 @@
#include <functional> #include <functional>
using namespace std::placeholders; using namespace std::placeholders;
#include <board.h> #include <board.h>
#include <class_board_item.h> #include <board_item.h>
#include <footprint.h> #include <footprint.h>
#include <fp_shape.h> #include <fp_shape.h>
#include <pad.h> #include <pad.h>

View File

@ -30,12 +30,12 @@
%include class_board_item.h // generate code for this interface %include board_item.h // generate code for this interface
%rename(Get) operator BOARD_ITEM*; %rename(Get) operator BOARD_ITEM*;
%{ %{
#include <class_board_item.h> #include <board_item.h>
%} %}
@ -81,7 +81,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* );
static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* ); static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* );
static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* ); static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* );
static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* ); static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* );
static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* ); static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* );
static BOARD* Cast_to_BOARD( BOARD_ITEM* ); static BOARD* Cast_to_BOARD( BOARD_ITEM* );
static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* ); static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* );
static PAD* Cast_to_PAD( BOARD_ITEM* ); static PAD* Cast_to_PAD( BOARD_ITEM* );
@ -106,7 +106,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* );
static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* ); static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* );
static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* ); static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* );
static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* ); static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* );
static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* ); static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* );
static BOARD* Cast_to_BOARD( BOARD_ITEM* ); static BOARD* Cast_to_BOARD( BOARD_ITEM* );
static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* ); static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* );
static PAD* Cast_to_PAD( BOARD_ITEM* ); static PAD* Cast_to_PAD( BOARD_ITEM* );
@ -194,7 +194,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* self ) {
static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* self ) { return dynamic_cast<PCB_GROUP*>(self); } static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* self ) { return dynamic_cast<PCB_GROUP*>(self); }
static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* self ) { return dynamic_cast<FP_TEXT*>(self); } static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* self ) { return dynamic_cast<FP_TEXT*>(self); }
static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* self ) { return dynamic_cast<PCB_SHAPE*>(self); } static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* self ) { return dynamic_cast<PCB_SHAPE*>(self); }
static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* self ) { return dynamic_cast<MARKER_PCB*>(self); } static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* self ) { return dynamic_cast<PCB_MARKER*>(self); }
static BOARD* Cast_to_BOARD( BOARD_ITEM* self ) { return dynamic_cast<BOARD*>(self); } static BOARD* Cast_to_BOARD( BOARD_ITEM* self ) { return dynamic_cast<BOARD*>(self); }
static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* self ) { return dynamic_cast<FP_SHAPE*>(self); } static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* self ) { return dynamic_cast<FP_SHAPE*>(self); }
static PAD* Cast_to_PAD( BOARD_ITEM* self ) { return dynamic_cast<PAD*>(self); } static PAD* Cast_to_PAD( BOARD_ITEM* self ) { return dynamic_cast<PAD*>(self); }

View File

@ -1,6 +1,6 @@
%include class_marker_pcb.h %include pcb_marker.h
%{ %{
#include <class_marker_pcb.h> #include <pcb_marker.h>
%} %}

View File

@ -32,7 +32,7 @@
#include <action_plugin.h> #include <action_plugin.h>
#include <board.h> #include <board.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <cstdlib> #include <cstdlib>
#include <drc/drc_engine.h> #include <drc/drc_engine.h>
#include <drc/drc_item.h> #include <drc/drc_item.h>
@ -163,7 +163,7 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat )
// Best efforts... // Best efforts...
} }
for( MARKER_PCB* marker : brd->ResolveDRCExclusions() ) for( PCB_MARKER* marker : brd->ResolveDRCExclusions() )
brd->Add( marker ); brd->Add( marker );
brd->BuildConnectivity(); brd->BuildConnectivity();

View File

@ -194,7 +194,7 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones
} }
else else
{ {
MARKER_PCB* marker = new MARKER_PCB( aItem, aPos ); PCB_MARKER* marker = new PCB_MARKER( aItem, aPos );
commit.Add( marker ); commit.Add( marker );
} }
} ); } );

View File

@ -27,7 +27,7 @@
#include <board_commit.h> #include <board_commit.h>
#include <board.h> #include <board.h>
#include <track.h> #include <track.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <geometry/seg.h> #include <geometry/seg.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>
#include <memory> #include <memory>

View File

@ -28,7 +28,7 @@
#include <view/view.h> #include <view/view.h>
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <class_board_item.h> #include <board_item.h>
#include <footprint.h> #include <footprint.h>
#include <fp_shape.h> #include <fp_shape.h>
#include <board_commit.h> #include <board_commit.h>

View File

@ -37,7 +37,7 @@
#include <pcb_target.h> #include <pcb_target.h>
#include <track.h> #include <track.h>
#include <zone.h> #include <zone.h>
#include <class_marker_pcb.h> #include <pcb_marker.h>
#include <collectors.h> #include <collectors.h>
#include <confirm.h> #include <confirm.h>
#include <cstdint> #include <cstdint>
@ -449,7 +449,7 @@ int PCB_EDITOR_CONTROL::RepairBoard( const TOOL_EVENT& aEvent )
for( ZONE* zone : board()->Zones() ) for( ZONE* zone : board()->Zones() )
processItem( zone ); processItem( zone );
for( MARKER_PCB* marker : board()->Markers() ) for( PCB_MARKER* marker : board()->Markers() )
processItem( marker ); processItem( marker );
for( PCB_GROUP* group : board()->Groups() ) for( PCB_GROUP* group : board()->Groups() )

Some files were not shown because too many files have changed in this diff Show More