Naming conventions.
This commit is contained in:
parent
2d001796a3
commit
7bd31d5237
|
@ -33,7 +33,7 @@
|
|||
#include "cbbox2d.h"
|
||||
#include <cstring>
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
enum class INTERSECTION_RESULT
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "../hitinfo.h"
|
||||
#include "../cmaterial.h"
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
enum class OBJECT3D_TYPE
|
||||
{
|
||||
|
|
|
@ -502,12 +502,12 @@ set( PCB_COMMON_SRCS
|
|||
${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.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/pcb_shape.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.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/netinfo_item.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
|
||||
|
|
|
@ -79,7 +79,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
|||
m_gridSelectBox = NULL;
|
||||
m_zoomSelectBox = NULL;
|
||||
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_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:
|
||||
// BLACK for Pcbnew, BLACK or WHITE for Eeschema
|
||||
m_colorSettings = nullptr;
|
||||
m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
|
||||
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
|
||||
m_userUnits = EDA_UNITS::MILLIMETRES;
|
||||
m_PolarCoords = false;
|
||||
m_polarCoords = false;
|
||||
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
|
||||
|
||||
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.
|
||||
GetClientSize( &m_FrameSize.x, &m_FrameSize.y );
|
||||
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 ),
|
||||
wxSize( m_FrameSize.x, m_MsgFrameHeight ) );
|
||||
wxSize( m_FrameSize.x, m_msgFrameHeight ) );
|
||||
|
||||
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
|
||||
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_galDisplayOptions.ReadConfig( *cmnCfg, *window, this );
|
||||
|
|
|
@ -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 ) :
|
||||
m_StructType( idType ),
|
||||
m_Status( 0 ),
|
||||
m_Parent( parent ),
|
||||
m_structType( idType ),
|
||||
m_status( 0 ),
|
||||
m_parent( parent ),
|
||||
m_forceVisible( false ),
|
||||
m_Flags( 0 )
|
||||
m_flags( 0 )
|
||||
{ }
|
||||
|
||||
|
||||
EDA_ITEM::EDA_ITEM( KICAD_T idType ) :
|
||||
m_StructType( idType ),
|
||||
m_Status( 0 ),
|
||||
m_Parent( nullptr ),
|
||||
m_structType( idType ),
|
||||
m_status( 0 ),
|
||||
m_parent( nullptr ),
|
||||
m_forceVisible( false ),
|
||||
m_Flags( 0 )
|
||||
m_flags( 0 )
|
||||
{ }
|
||||
|
||||
|
||||
EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) :
|
||||
m_Uuid( base.m_Uuid ),
|
||||
m_StructType( base.m_StructType ),
|
||||
m_Status( base.m_Status ),
|
||||
m_Parent( base.m_Parent ),
|
||||
m_structType( base.m_structType ),
|
||||
m_status( base.m_status ),
|
||||
m_parent( base.m_parent ),
|
||||
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 );
|
||||
|
||||
// If this a child object, then the parent modification state also needs to be set.
|
||||
if( m_Parent )
|
||||
m_Parent->SetModified();
|
||||
if( m_parent )
|
||||
m_parent->SetModified();
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,10 +194,10 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem )
|
|||
{
|
||||
// do not call initVars()
|
||||
|
||||
m_StructType = aItem.m_StructType;
|
||||
m_Flags = aItem.m_Flags;
|
||||
m_Status = aItem.m_Status;
|
||||
m_Parent = aItem.m_Parent;
|
||||
m_structType = aItem.m_structType;
|
||||
m_flags = aItem.m_flags;
|
||||
m_status = aItem.m_status;
|
||||
m_parent = aItem.m_parent;
|
||||
m_forceVisible = aItem.m_forceVisible;
|
||||
|
||||
return *this;
|
||||
|
|
|
@ -34,30 +34,30 @@
|
|||
|
||||
void EDA_RECT::Normalize()
|
||||
{
|
||||
if( m_Size.y < 0 )
|
||||
if( m_size.y < 0 )
|
||||
{
|
||||
m_Size.y = -m_Size.y;
|
||||
m_Pos.y -= m_Size.y;
|
||||
m_size.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_Pos.x -= m_Size.x;
|
||||
m_size.x = -m_size.x;
|
||||
m_pos.x -= m_size.x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EDA_RECT::Move( const wxPoint& aMoveVector )
|
||||
{
|
||||
m_Pos += aMoveVector;
|
||||
m_pos += aMoveVector;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_RECT::Contains( const wxPoint& aPoint ) const
|
||||
{
|
||||
wxPoint rel_pos = aPoint - m_Pos;
|
||||
wxSize size = m_Size;
|
||||
wxPoint rel_pos = aPoint - m_pos;
|
||||
wxSize size = m_size;
|
||||
|
||||
if( size.x < 0 )
|
||||
{
|
||||
|
@ -160,13 +160,13 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const
|
|||
rect.Normalize(); // ensure size is >= 0
|
||||
|
||||
// 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:
|
||||
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:
|
||||
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:
|
||||
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( 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? */
|
||||
|
||||
corners[0] = m_Pos;
|
||||
corners[1] = m_Pos + wxPoint( m_Size.x, 0 );
|
||||
corners[2] = m_Pos + wxPoint( m_Size.x, m_Size.y );
|
||||
corners[3] = m_Pos + wxPoint( 0, m_Size.y );
|
||||
corners[0] = m_pos;
|
||||
corners[1] = m_pos + wxPoint( m_size.x, 0 );
|
||||
corners[2] = m_pos + wxPoint( m_size.x, m_size.y );
|
||||
corners[3] = m_pos + wxPoint( 0, m_size.y );
|
||||
|
||||
wxPoint rCentre = aRect.Centre();
|
||||
|
||||
|
@ -362,65 +362,65 @@ EDA_RECT& EDA_RECT::Inflate( int aDelta )
|
|||
|
||||
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,
|
||||
m_Pos.x += m_Size.x / 2;
|
||||
m_Size.x = 0;
|
||||
m_pos.x += m_size.x / 2;
|
||||
m_size.x = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The inflate is valid.
|
||||
m_Pos.x -= dx;
|
||||
m_Size.x += 2 * dx;
|
||||
m_pos.x -= dx;
|
||||
m_size.x += 2 * dx;
|
||||
}
|
||||
}
|
||||
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,
|
||||
m_Pos.x -= m_Size.x / 2;
|
||||
m_Size.x = 0;
|
||||
m_pos.x -= m_size.x / 2;
|
||||
m_size.x = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The inflate is valid.
|
||||
m_Pos.x += dx;
|
||||
m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0
|
||||
m_pos.x += dx;
|
||||
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,
|
||||
m_Pos.y += m_Size.y / 2;
|
||||
m_Size.y = 0;
|
||||
m_pos.y += m_size.y / 2;
|
||||
m_size.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The inflate is valid.
|
||||
m_Pos.y -= dy;
|
||||
m_Size.y += 2 * dy;
|
||||
m_pos.y -= dy;
|
||||
m_size.y += 2 * dy;
|
||||
}
|
||||
}
|
||||
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,
|
||||
m_Pos.y -= m_Size.y / 2;
|
||||
m_Size.y = 0;
|
||||
m_pos.y -= m_size.y / 2;
|
||||
m_size.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The inflate is valid.
|
||||
m_Pos.y += dy;
|
||||
m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0
|
||||
m_pos.y += dy;
|
||||
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() )
|
||||
{
|
||||
m_Pos = aRect.GetPosition();
|
||||
m_Size = aRect.GetSize();
|
||||
m_pos = aRect.GetPosition();
|
||||
m_size = aRect.GetSize();
|
||||
m_init = true;
|
||||
}
|
||||
return;
|
||||
|
@ -448,8 +448,8 @@ void EDA_RECT::Merge( const EDA_RECT& aRect )
|
|||
wxPoint rect_end = rect.GetEnd();
|
||||
|
||||
// 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.y = std::min( m_Pos.y, rect.m_Pos.y );
|
||||
m_pos.x = std::min( m_pos.x, rect.m_pos.x );
|
||||
m_pos.y = std::min( m_pos.y, rect.m_pos.y );
|
||||
end.x = std::max( end.x, rect_end.x );
|
||||
end.y = std::max( end.y, rect_end.y );
|
||||
SetEnd( end );
|
||||
|
@ -460,8 +460,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint )
|
|||
{
|
||||
if( !m_init )
|
||||
{
|
||||
m_Pos = aPoint;
|
||||
m_Size = wxSize( 0, 0 );
|
||||
m_pos = aPoint;
|
||||
m_size = wxSize( 0, 0 );
|
||||
m_init = true;
|
||||
return;
|
||||
}
|
||||
|
@ -470,8 +470,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint )
|
|||
|
||||
wxPoint end = GetEnd();
|
||||
// Change origin and size in order to contain the given rect
|
||||
m_Pos.x = std::min( m_Pos.x, aPoint.x );
|
||||
m_Pos.y = std::min( m_Pos.y, aPoint.y );
|
||||
m_pos.x = std::min( m_pos.x, aPoint.x );
|
||||
m_pos.y = std::min( m_pos.y, aPoint.y );
|
||||
end.x = std::max( end.x, aPoint.x );
|
||||
end.y = std::max( end.y, aPoint.y );
|
||||
SetEnd( end );
|
||||
|
|
|
@ -266,7 +266,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* aComponent )
|
|||
|
||||
TestDanglingEnds();
|
||||
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( aComponent->IsSelected() )
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() );
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
EDA_RECT sel = aRect;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() );
|
||||
|
|
|
@ -73,7 +73,7 @@ LIB_FIELD& LIB_FIELD::operator=( const LIB_FIELD& field )
|
|||
{
|
||||
m_id = field.m_id;
|
||||
m_name = field.m_name;
|
||||
m_Parent = field.m_Parent;
|
||||
m_parent = field.m_parent;
|
||||
|
||||
SetText( field.GetText() );
|
||||
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)
|
||||
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();
|
||||
extended_text.Append('?');
|
||||
|
@ -169,7 +169,7 @@ void LIB_FIELD::Copy( LIB_FIELD* aTarget ) const
|
|||
|
||||
aTarget->CopyText( *this );
|
||||
aTarget->SetEffects( *this );
|
||||
aTarget->SetParent( m_Parent );
|
||||
aTarget->SetParent( m_parent );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ LIB_ITEM::LIB_ITEM( KICAD_T aType,
|
|||
m_Unit = aUnit;
|
||||
m_Convert = aConvert;
|
||||
m_Fill = aFillType;
|
||||
m_Parent = (EDA_ITEM*) aComponent;
|
||||
m_parent = (EDA_ITEM*) aComponent;
|
||||
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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
EDA_RECT sel = aRect;
|
||||
|
|
|
@ -182,7 +182,7 @@ public:
|
|||
|
||||
LIB_PART* GetParent() const
|
||||
{
|
||||
return (LIB_PART*) m_Parent;
|
||||
return (LIB_PART*) m_parent;
|
||||
}
|
||||
|
||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
EDA_RECT sel = aRect;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
EDA_RECT sel = aRect;
|
||||
|
|
|
@ -80,7 +80,7 @@ EDA_ITEM* LIB_TEXT::Clone() const
|
|||
|
||||
newitem->m_Unit = m_Unit;
|
||||
newitem->m_Convert = m_Convert;
|
||||
newitem->m_Flags = m_Flags;
|
||||
newitem->m_flags = m_flags;
|
||||
|
||||
newitem->SetText( GetText() );
|
||||
newitem->SetEffects( *this );
|
||||
|
|
|
@ -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_ITEM( aComponent )
|
||||
{
|
||||
m_Parent = aComponent.m_Parent;
|
||||
m_parent = aComponent.m_parent;
|
||||
m_Pos = aComponent.m_Pos;
|
||||
m_unit = aComponent.m_unit;
|
||||
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
|
||||
{
|
||||
if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT )
|
||||
if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT )
|
||||
return false;
|
||||
|
||||
EDA_RECT rect = aRect;
|
||||
|
|
|
@ -75,7 +75,7 @@ void SCH_FIELD::SetId( int 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 )
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
|
|||
}
|
||||
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 ) )
|
||||
return true;
|
||||
|
@ -127,7 +127,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
|
|||
std::function<bool( wxString* )> sheetResolver =
|
||||
[&]( 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 );
|
||||
};
|
||||
|
||||
|
@ -142,9 +142,9 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
|
|||
|
||||
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 );
|
||||
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 );
|
||||
else
|
||||
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
|
||||
// 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 )
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
|
|||
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 )
|
||||
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.
|
||||
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.
|
||||
{
|
||||
|
@ -263,9 +263,9 @@ const EDA_RECT SCH_FIELD::GetBoundingBox() const
|
|||
// Now, apply the component transform (mirror/rot)
|
||||
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,
|
||||
// relative to the text position:
|
||||
|
@ -326,12 +326,12 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
|||
if( !IsVisible() && !searchHiddenFields )
|
||||
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 )
|
||||
return false;
|
||||
|
||||
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_Parent );
|
||||
SCH_COMPONENT* parentComponent = static_cast<SCH_COMPONENT*>( m_parent );
|
||||
wxASSERT( aAuxData );
|
||||
|
||||
// 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
|
||||
{
|
||||
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 )
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ bool SCH_FIELD::IsReplaceable() const
|
|||
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.
|
||||
if( m_id == SHEETFILENAME )
|
||||
|
@ -381,9 +381,9 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData )
|
|||
{
|
||||
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 )
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData )
|
|||
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 );
|
||||
|
||||
|
@ -443,9 +443,9 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) const
|
|||
return m_name;
|
||||
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 );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) 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 )
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ wxString SCH_FIELD::GetCanonicalName() const
|
|||
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 )
|
||||
{
|
||||
|
@ -480,7 +480,7 @@ wxString SCH_FIELD::GetCanonicalName() 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 )
|
||||
{
|
||||
|
@ -543,9 +543,9 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter )
|
|||
// Calculate the text orientation, according to the component orientation/mirror
|
||||
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.
|
||||
{
|
||||
|
@ -582,9 +582,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition )
|
|||
// Actual positions are calculated by the rotation/mirror transform of the
|
||||
// parent component of the field. The inverse transform is used to calculate
|
||||
// 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();
|
||||
|
||||
relativePos = parentComponent->GetTransform().
|
||||
|
@ -600,9 +600,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition )
|
|||
|
||||
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();
|
||||
|
||||
relativePos = parentComponent->GetTransform().TransformCoordinate( relativePos );
|
||||
|
@ -616,7 +616,7 @@ wxPoint SCH_FIELD::GetPosition() const
|
|||
|
||||
wxPoint SCH_FIELD::GetParentPosition() const
|
||||
{
|
||||
return m_Parent ? m_Parent->GetPosition() : wxPoint( 0, 0 );
|
||||
return m_parent ? m_parent->GetPosition() : wxPoint( 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ void SCH_ITEM::ViewGetLayers( int aLayers[], int& aCount ) 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 doIsConnected( aPosition );
|
||||
|
|
|
@ -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
|
||||
{
|
||||
if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT )
|
||||
if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT )
|
||||
return false;
|
||||
|
||||
if( aContained )
|
||||
|
|
|
@ -634,10 +634,10 @@ std::vector<wxPoint> SCH_LINE::GetConnectionPoints() const
|
|||
|
||||
void SCH_LINE::GetSelectedPoints( std::vector< wxPoint >& aPoints ) const
|
||||
{
|
||||
if( m_Flags & STARTPOINT )
|
||||
if( m_flags & STARTPOINT )
|
||||
aPoints.push_back( m_start );
|
||||
|
||||
if( m_Flags & ENDPOINT )
|
||||
if( m_flags & ENDPOINT )
|
||||
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
|
||||
{
|
||||
if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
EDA_RECT rect = aRect;
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
* @return The sheet that is the parent of this sheet pin or NULL if it does
|
||||
* 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)
|
||||
void Show( int nestLevel, std::ostream& os ) const override;
|
||||
|
|
|
@ -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 )
|
||||
aVars->push_back( wxT( "CONNECTION_TYPE" ) );
|
||||
|
||||
if( Type() == SCH_SHEET_PIN_T && m_Parent )
|
||||
static_cast<SCH_SHEET*>( m_Parent )->GetContextualTextVars( aVars );
|
||||
if( Type() == SCH_SHEET_PIN_T && m_parent )
|
||||
static_cast<SCH_SHEET*>( m_parent )->GetContextualTextVars( aVars );
|
||||
}
|
||||
|
||||
|
||||
|
@ -497,9 +497,9 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const
|
|||
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 ) )
|
||||
return true;
|
||||
|
|
|
@ -919,12 +919,12 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
|
|||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
||||
" shape=\"" << m_Shape << '"' <<
|
||||
" addr=\"" << std::hex << this << std::dec << '"' <<
|
||||
" layer=\"" << GetLayer() << '"' <<
|
||||
" size=\"" << m_Size << '"' <<
|
||||
" flags=\"" << m_Flags << '"' <<
|
||||
" status=\"" << GetStatus() << '"' <<
|
||||
" shape=\"" << m_Shape << '"' <<
|
||||
" addr=\"" << std::hex << this << std::dec << '"' <<
|
||||
" layer=\"" << GetLayer() << '"' <<
|
||||
" size=\"" << m_Size << '"' <<
|
||||
" flags=\"" << m_flags << '"' <<
|
||||
" status=\"" << GetStatus() << '"' <<
|
||||
"<start" << m_Start << "/>" <<
|
||||
"<end" << m_End << "/>";
|
||||
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
* 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
|
||||
#define BOARD_ITEM_STRUCT_H
|
||||
|
||||
|
@ -181,7 +176,7 @@ public:
|
|||
*/
|
||||
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
|
|
@ -57,16 +57,16 @@ protected:
|
|||
std::vector<EDA_ITEM*> m_list; // Primary list of most likely items
|
||||
std::vector<EDA_ITEM*> m_backupList; // Secondary list with items removed by heuristics
|
||||
|
||||
const KICAD_T* m_scanTypes;
|
||||
INSPECTOR_FUNC m_inspector;
|
||||
wxPoint m_refPos; // Reference position used to generate the collection.
|
||||
EDA_RECT m_refBox; // Selection rectangle used to generate the collection.
|
||||
const KICAD_T* m_scanTypes;
|
||||
INSPECTOR_FUNC m_inspector;
|
||||
wxPoint m_refPos; // Reference position used to generate the collection.
|
||||
EDA_RECT m_refBox; // Selection rectangle used to generate the collection.
|
||||
|
||||
public:
|
||||
int m_Threshold; // Hit-test threshold in internal units.
|
||||
int m_Threshold; // Hit-test threshold in internal units.
|
||||
|
||||
wxString m_MenuTitle; // The title of selection disambiguation menu (if needed)
|
||||
bool m_MenuCancelled; // Indicates selection disambiguation menu was cancelled
|
||||
wxString m_MenuTitle; // The title of selection disambiguation menu (if needed)
|
||||
bool m_MenuCancelled; // Indicates selection disambiguation menu was cancelled
|
||||
|
||||
public:
|
||||
COLLECTOR() :
|
||||
|
|
|
@ -147,14 +147,9 @@ public:
|
|||
protected:
|
||||
struct COMMIT_LINE
|
||||
{
|
||||
///> Main item that is added/deleted/modified
|
||||
EDA_ITEM* m_item;
|
||||
|
||||
///> Optional copy of the item
|
||||
EDA_ITEM* m_copy;
|
||||
|
||||
///> Modification type
|
||||
CHANGE_TYPE m_type;
|
||||
EDA_ITEM* m_item; ///> Main item that is added/deleted/modified
|
||||
EDA_ITEM* m_copy; ///> Optional copy of the item
|
||||
CHANGE_TYPE m_type; ///> Modification type
|
||||
};
|
||||
|
||||
// Should be called in Push() & Revert() methods
|
||||
|
|
|
@ -73,7 +73,7 @@ class EDA_ITEM;
|
|||
|
||||
/**
|
||||
* 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
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ class EDA_DRAW_FRAME : public KIWAY_PLAYER
|
|||
KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions;
|
||||
|
||||
/// Default display origin transforms object
|
||||
ORIGIN_TRANSFORMS m_OriginTransforms;
|
||||
ORIGIN_TRANSFORMS m_originTransforms;
|
||||
|
||||
protected:
|
||||
wxSocketServer* m_socketServer;
|
||||
|
@ -85,9 +85,9 @@ protected:
|
|||
COLOR4D m_gridColor; // Grid color
|
||||
COLOR4D m_drawBgColor; // The background color of the draw canvas; BLACK for
|
||||
// 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
|
||||
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).
|
||||
long m_firstRunDialogSetting; // Show first run dialog on startup
|
||||
|
@ -105,7 +105,7 @@ protected:
|
|||
wxArrayString m_replaceStringHistoryList;
|
||||
|
||||
EDA_MSG_PANEL* m_messagePanel;
|
||||
int m_MsgFrameHeight;
|
||||
int m_msgFrameHeight;
|
||||
|
||||
COLOR_SETTINGS* m_colorSettings;
|
||||
|
||||
|
@ -188,8 +188,8 @@ public:
|
|||
/**
|
||||
* For those frames that support polar coordinates.
|
||||
*/
|
||||
bool GetShowPolarCoords() const { return m_PolarCoords; }
|
||||
void SetShowPolarCoords( bool aShow ) { m_PolarCoords = aShow; }
|
||||
bool GetShowPolarCoords() const { return m_polarCoords; }
|
||||
void SetShowPolarCoords( bool aShow ) { m_polarCoords = aShow; }
|
||||
|
||||
void ToggleUserUnits() override;
|
||||
|
||||
|
@ -220,7 +220,7 @@ public:
|
|||
* Return a reference to the default ORIGIN_TRANSFORMS object
|
||||
*/
|
||||
virtual ORIGIN_TRANSFORMS& GetOriginTransforms()
|
||||
{ return m_OriginTransforms; }
|
||||
{ return m_originTransforms; }
|
||||
|
||||
|
||||
virtual const TITLE_BLOCK& GetTitleBlock() const = 0;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
// 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
|
||||
//
|
||||
// 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
|
||||
* is a base class for most all the KiCad significant classes, used in
|
||||
* schematics and boards.
|
||||
* is a base class for most all the KiCad significant classes used in schematics and boards.
|
||||
*/
|
||||
class EDA_ITEM : public KIGFX::VIEW_ITEM
|
||||
{
|
||||
|
@ -152,17 +151,16 @@ public:
|
|||
|
||||
private:
|
||||
/**
|
||||
* Run time identification, _keep private_ so it can never be changed after
|
||||
* a constructor sets it. See comment near SetType() regarding virtual
|
||||
* functions.
|
||||
* Run time identification, _keep private_ so it can never be changed after a ctor
|
||||
* sets it. See comment near SetType() regarding virtual functions.
|
||||
*/
|
||||
KICAD_T m_StructType;
|
||||
KICAD_T m_structType;
|
||||
|
||||
protected:
|
||||
STATUS_FLAGS m_Status;
|
||||
EDA_ITEM* m_Parent; ///< Linked list: Link (parent struct)
|
||||
STATUS_FLAGS m_status;
|
||||
EDA_ITEM* m_parent; ///< Linked list: Link (parent struct)
|
||||
bool m_forceVisible;
|
||||
STATUS_FLAGS m_Flags;
|
||||
STATUS_FLAGS m_flags;
|
||||
|
||||
protected:
|
||||
EDA_ITEM( EDA_ITEM* parent, KICAD_T idType );
|
||||
|
@ -175,23 +173,23 @@ public:
|
|||
/**
|
||||
* Function Type()
|
||||
*
|
||||
* returns the type of object. This attribute should never be changed
|
||||
* after a constructor sets it, so there is no public "setter" method.
|
||||
* returns the type of object. This attribute should never be changed after a ctor sets
|
||||
* it, so there is no public "setter" method.
|
||||
* @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; }
|
||||
virtual void SetParent( EDA_ITEM* aParent ) { m_Parent = aParent; }
|
||||
EDA_ITEM* GetParent() const { return m_parent; }
|
||||
virtual void SetParent( EDA_ITEM* aParent ) { m_parent = aParent; }
|
||||
|
||||
inline bool IsModified() const { return m_Flags & IS_CHANGED; }
|
||||
inline bool IsNew() const { return m_Flags & IS_NEW; }
|
||||
inline bool IsMoving() const { return m_Flags & IS_MOVED; }
|
||||
inline bool IsDragging() const { return m_Flags & IS_DRAGGED; }
|
||||
inline bool IsWireImage() const { return m_Flags & IS_WIRE_IMAGE; }
|
||||
inline bool IsSelected() const { return m_Flags & SELECTED; }
|
||||
inline bool IsResized() const { return m_Flags & IS_RESIZED; }
|
||||
inline bool IsBrightened() const { return m_Flags & BRIGHTENED; }
|
||||
inline bool IsModified() const { return m_flags & IS_CHANGED; }
|
||||
inline bool IsNew() const { return m_flags & IS_NEW; }
|
||||
inline bool IsMoving() const { return m_flags & IS_MOVED; }
|
||||
inline bool IsDragging() const { return m_flags & IS_DRAGGED; }
|
||||
inline bool IsWireImage() const { return m_flags & IS_WIRE_IMAGE; }
|
||||
inline bool IsSelected() const { return m_flags & SELECTED; }
|
||||
inline bool IsResized() const { return m_flags & IS_RESIZED; }
|
||||
inline bool IsBrightened() const { return m_flags & BRIGHTENED; }
|
||||
|
||||
inline void SetWireImage() { SetFlags( IS_WIRE_IMAGE ); }
|
||||
inline void SetSelected() { SetFlags( SELECTED ); }
|
||||
|
@ -204,31 +202,31 @@ public:
|
|||
|
||||
int GetState( int type ) const
|
||||
{
|
||||
return m_Status & type;
|
||||
return m_status & type;
|
||||
}
|
||||
|
||||
void SetState( int type, int state )
|
||||
{
|
||||
if( state )
|
||||
m_Status |= type; // state = ON or OFF
|
||||
m_status |= type; // state = ON or OFF
|
||||
else
|
||||
m_Status &= ~type;
|
||||
m_status &= ~type;
|
||||
}
|
||||
|
||||
STATUS_FLAGS GetStatus() const { return m_Status; }
|
||||
void SetStatus( STATUS_FLAGS aStatus ) { m_Status = aStatus; }
|
||||
STATUS_FLAGS GetStatus() const { return m_status; }
|
||||
void SetStatus( STATUS_FLAGS aStatus ) { m_status = aStatus; }
|
||||
|
||||
void SetFlags( STATUS_FLAGS aMask ) { m_Flags |= aMask; }
|
||||
void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_Flags &= ~aMask; }
|
||||
STATUS_FLAGS GetFlags() const { return m_Flags; }
|
||||
bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_Flags & aFlag ) == aFlag; }
|
||||
void SetFlags( STATUS_FLAGS aMask ) { m_flags |= aMask; }
|
||||
void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_flags &= ~aMask; }
|
||||
STATUS_FLAGS GetFlags() const { return m_flags; }
|
||||
bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_flags & aFlag ) == aFlag; }
|
||||
|
||||
STATUS_FLAGS GetEditFlags() const
|
||||
{
|
||||
constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVED | IS_RESIZED | IS_DRAGGED |
|
||||
IS_WIRE_IMAGE | STRUCT_DELETED );
|
||||
|
||||
return m_Flags & mask;
|
||||
return m_flags & mask;
|
||||
}
|
||||
|
||||
void ClearTempFlags()
|
||||
|
@ -255,7 +253,7 @@ public:
|
|||
|
||||
for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
|
||||
{
|
||||
if( m_StructType == *p )
|
||||
if( m_structType == *p )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,25 +44,25 @@
|
|||
class EDA_RECT
|
||||
{
|
||||
private:
|
||||
wxPoint m_Pos; // Rectangle Origin
|
||||
wxSize m_Size; // Rectangle Size
|
||||
wxPoint m_pos; // Rectangle Origin
|
||||
wxSize m_size; // Rectangle Size
|
||||
bool m_init; // Is the rectangle initialized
|
||||
|
||||
public:
|
||||
EDA_RECT() : m_init( false ) { };
|
||||
|
||||
EDA_RECT( const wxPoint& aPos, const wxSize& aSize ) :
|
||||
m_Pos( aPos ),
|
||||
m_Size( aSize ),
|
||||
m_init( true )
|
||||
m_pos( aPos ),
|
||||
m_size( aSize ),
|
||||
m_init( true )
|
||||
{ }
|
||||
|
||||
virtual ~EDA_RECT() { };
|
||||
|
||||
wxPoint Centre() const
|
||||
{
|
||||
return wxPoint( m_Pos.x + ( m_Size.x >> 1 ),
|
||||
m_Pos.y + ( m_Size.y >> 1 ) );
|
||||
return wxPoint( m_pos.x + ( m_size.x >> 1 ),
|
||||
m_pos.y + ( m_size.y >> 1 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,28 +100,28 @@ public:
|
|||
*/
|
||||
bool Contains( const EDA_RECT& aRect ) const;
|
||||
|
||||
const wxSize GetSize() const { return m_Size; }
|
||||
const wxSize GetSize() const { return m_size; }
|
||||
|
||||
/**
|
||||
* @brief GetSizeMax
|
||||
* @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 GetY() const { return m_Pos.y; }
|
||||
int GetX() const { return m_pos.x; }
|
||||
int GetY() const { return m_pos.y; }
|
||||
|
||||
const wxPoint GetOrigin() 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 GetCenter() const { return wxPoint( m_Pos.x + ( m_Size.x / 2 ), m_Pos.y + ( m_Size.y / 2 ) ); }
|
||||
const wxPoint GetOrigin() 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 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 GetHeight() const { return m_Size.y; }
|
||||
int GetRight() const { return m_Pos.x + m_Size.x; }
|
||||
int GetLeft() const { return m_Pos.x; }
|
||||
int GetTop() const { return m_Pos.y; }
|
||||
int GetBottom() const { return m_Pos.y + m_Size.y; } // Y axis from top to bottom
|
||||
int GetWidth() const { return m_size.x; }
|
||||
int GetHeight() const { return m_size.y; }
|
||||
int GetRight() const { return m_pos.x + m_size.x; }
|
||||
int GetLeft() const { return m_pos.x; }
|
||||
int GetTop() const { return m_pos.y; }
|
||||
int GetBottom() const { return m_pos.y + m_size.y; } // Y axis from top to bottom
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
|
@ -130,62 +130,62 @@ public:
|
|||
|
||||
void SetOrigin( const wxPoint &pos )
|
||||
{
|
||||
m_Pos = pos;
|
||||
m_pos = pos;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetOrigin( int x, int y )
|
||||
{
|
||||
m_Pos.x = x;
|
||||
m_Pos.y = y;
|
||||
m_pos.x = x;
|
||||
m_pos.y = y;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetSize( const wxSize &size )
|
||||
{
|
||||
m_Size = size;
|
||||
m_size = size;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetSize( int w, int h )
|
||||
{
|
||||
m_Size.x = w;
|
||||
m_Size.y = h;
|
||||
m_size.x = w;
|
||||
m_size.y = h;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void Offset( int dx, int dy )
|
||||
{
|
||||
m_Pos.x += dx;
|
||||
m_Pos.y += dy;
|
||||
m_pos.x += dx;
|
||||
m_pos.y += dy;
|
||||
}
|
||||
|
||||
void Offset( const wxPoint &offset )
|
||||
{
|
||||
m_Pos += offset;
|
||||
m_pos += offset;
|
||||
}
|
||||
|
||||
void SetX( int val )
|
||||
{
|
||||
m_Pos.x = val;
|
||||
m_pos.x = val;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetY( int val )
|
||||
{
|
||||
m_Pos.y = val;
|
||||
m_pos.y = val;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetWidth( int val )
|
||||
{
|
||||
m_Size.x = val;
|
||||
m_size.x = val;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SetHeight( int val )
|
||||
{
|
||||
m_Size.y = val;
|
||||
m_size.y = val;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
|
@ -197,8 +197,8 @@ public:
|
|||
|
||||
void SetEnd( const wxPoint &pos )
|
||||
{
|
||||
m_Size.x = pos.x - m_Pos.x;
|
||||
m_Size.y = pos.y - m_Pos.y;
|
||||
m_size.x = pos.x - m_pos.x;
|
||||
m_size.y = pos.y - m_pos.y;
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,8 @@ public:
|
|||
*/
|
||||
void RevertYAxis()
|
||||
{
|
||||
m_Pos.y = -m_Pos.y;
|
||||
m_Size.y = -m_Size.y;
|
||||
m_pos.y = -m_pos.y;
|
||||
m_size.y = -m_size.y;
|
||||
Normalize();
|
||||
}
|
||||
|
||||
|
@ -291,9 +291,9 @@ public:
|
|||
*/
|
||||
operator wxRect() const
|
||||
{
|
||||
EDA_RECT rect( m_Pos, m_Size );
|
||||
EDA_RECT rect( m_pos, m_size );
|
||||
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
|
||||
{
|
||||
EDA_RECT rect( m_Pos, m_Size );
|
||||
EDA_RECT rect( m_pos, m_size );
|
||||
rect.Normalize();
|
||||
return BOX2I( rect.GetOrigin(), rect.GetSize() );
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
m_peer = aPeer;
|
||||
m_index = aIndex;
|
||||
m_penWidth = 0;
|
||||
m_Flags = 0;
|
||||
m_flags = 0;
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define CLASS_PCB_GROUP_H_
|
||||
|
||||
#include <board_commit.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace KIGFX
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
#include <base_screen.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
|
||||
/* Handle info to display a board */
|
||||
|
|
|
@ -78,9 +78,9 @@ enum class UNDO_REDO {
|
|||
class ITEM_PICKER
|
||||
{
|
||||
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 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
|
||||
* (picked), or in undo redo commands, the copy of an
|
||||
* edited item. */
|
||||
|
@ -288,7 +288,7 @@ public:
|
|||
|
||||
/**
|
||||
* 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 aIdx Index of the picker in the picked list
|
||||
* @return True if the picker exists or false if does not exist
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
class PL_EDITOR_LAYOUT
|
||||
{
|
||||
private:
|
||||
EDA_RECT m_BoundingBox;
|
||||
EDA_RECT m_boundingBox;
|
||||
PAGE_INFO m_paper;
|
||||
TITLE_BLOCK m_titles;
|
||||
|
||||
|
@ -80,9 +80,9 @@ public:
|
|||
* may be called soon after ComputeBoundingBox() to return the same EDA_RECT,
|
||||
* 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)
|
||||
void Show( int nestLevel, std::ostream& os ) const;
|
||||
|
|
|
@ -35,23 +35,16 @@ public:
|
|||
|
||||
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
|
||||
|
||||
int m_CornerOrigin;
|
||||
|
||||
int m_PropertiesFrameWidth;
|
||||
|
||||
int m_CornerOrigin;
|
||||
int m_PropertiesFrameWidth;
|
||||
wxString m_LastPaperSize;
|
||||
|
||||
int m_LastCustomWidth;
|
||||
|
||||
int m_LastCustomHeight;
|
||||
|
||||
bool m_LastWasPortrait;
|
||||
|
||||
bool m_BlackBackground;
|
||||
int m_LastCustomWidth;
|
||||
int m_LastCustomHeight;
|
||||
bool m_LastWasPortrait;
|
||||
bool m_BlackBackground;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual std::string getLegacyFrameName() const override { return "PlEditorFrame"; }
|
||||
};
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <tools/pcbnew_selection.h>
|
||||
|
||||
/*!
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <footprint.h>
|
||||
#include <track.h>
|
||||
#include <zone.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <pcb_target.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
|
@ -51,9 +51,8 @@
|
|||
#include <tool/selection_conditions.h>
|
||||
#include <convert_drawsegment_list_to_polygon.h>
|
||||
|
||||
/* This is an odd place for this, but CvPcb won't link if it is
|
||||
* in class_board_item.cpp like I first tried it.
|
||||
*/
|
||||
// This is an odd place for this, but CvPcb won't link if it's in board_item.cpp like I first
|
||||
// tried it.
|
||||
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() );
|
||||
|
||||
|
@ -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 )
|
||||
{
|
||||
MARKER_PCB* marker = MARKER_PCB::Deserialize( exclusionData );
|
||||
PCB_MARKER* marker = PCB_MARKER::Deserialize( exclusionData );
|
||||
|
||||
if( marker )
|
||||
{
|
||||
|
@ -565,7 +564,7 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
|
|||
|
||||
// this one uses a vector
|
||||
case PCB_MARKER_T:
|
||||
m_markers.push_back( (MARKER_PCB*) aBoardItem );
|
||||
m_markers.push_back( (PCB_MARKER*) aBoardItem );
|
||||
break;
|
||||
|
||||
// this one uses a vector
|
||||
|
@ -727,8 +726,8 @@ wxString BOARD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|||
|
||||
void BOARD::DeleteMARKERs()
|
||||
{
|
||||
// the vector does not know how to delete the MARKER_PCB, it holds pointers
|
||||
for( MARKER_PCB* marker : m_markers )
|
||||
// the vector does not know how to delete the PCB_MARKER, it holds pointers
|
||||
for( PCB_MARKER* marker : m_markers )
|
||||
delete marker;
|
||||
|
||||
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.
|
||||
MARKERS remaining;
|
||||
|
||||
for( MARKER_PCB* marker : m_markers )
|
||||
for( PCB_MARKER* marker : m_markers )
|
||||
{
|
||||
if( ( marker->IsExcluded() && aExclusions )
|
||||
|| ( !marker->IsExcluded() && aWarningsAndErrors ) )
|
||||
|
@ -816,7 +815,7 @@ BOARD_ITEM* BOARD::GetItem( const KIID& aID ) const
|
|||
return drawing;
|
||||
}
|
||||
|
||||
for( MARKER_PCB* marker : m_markers )
|
||||
for( PCB_MARKER* marker : m_markers )
|
||||
{
|
||||
if( marker->m_Uuid == aID )
|
||||
return marker;
|
||||
|
@ -864,7 +863,7 @@ void BOARD::FillItemMap( std::map<KIID, EDA_ITEM*>& aMap )
|
|||
for( BOARD_ITEM* drawing : Drawings() )
|
||||
aMap[ drawing->m_Uuid ] = drawing;
|
||||
|
||||
for( MARKER_PCB* marker : m_markers )
|
||||
for( PCB_MARKER* marker : m_markers )
|
||||
aMap[ marker->m_Uuid ] = marker;
|
||||
|
||||
for( PCB_GROUP* group : m_groups )
|
||||
|
@ -1189,7 +1188,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
|
|||
break;
|
||||
|
||||
case PCB_MARKER_T:
|
||||
for( MARKER_PCB* marker : m_markers )
|
||||
for( PCB_MARKER* marker : m_markers )
|
||||
{
|
||||
result = marker->Visit( inspector, testData, p );
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class BOARD;
|
|||
class ZONE;
|
||||
class TRACK;
|
||||
class PAD;
|
||||
class MARKER_PCB;
|
||||
class PCB_MARKER;
|
||||
class MSG_PANEL_ITEM;
|
||||
class NETLIST;
|
||||
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_DEQ_FOR_SWIG( TRACKS, TRACK* )
|
||||
// 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.
|
||||
*/
|
||||
std::vector<MARKER_PCB*> ResolveDRCExclusions();
|
||||
std::vector<PCB_MARKER*> ResolveDRCExclusions();
|
||||
|
||||
/**
|
||||
* Reset all high light data to the init state
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
#include <drc/drc_engine.h>
|
||||
#include <kicad_string.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef BOARD_CONNECTED_ITEM_H
|
||||
#define BOARD_CONNECTED_ITEM_H
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <netinfo.h>
|
||||
#include <reporter.h>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef BOARD_ITEM_CONTAINER_H
|
||||
#define BOARD_ITEM_CONTAINER_H
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <zone_settings.h>
|
||||
|
||||
enum class ADD_MODE
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
*/
|
||||
|
||||
#include <collectors.h>
|
||||
#include <class_board_item.h> // class BOARD_ITEM
|
||||
#include <board_item.h> // class BOARD_ITEM
|
||||
|
||||
#include <footprint.h>
|
||||
#include <fp_shape.h>
|
||||
#include <pad.h>
|
||||
#include <track.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <dimension.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_shape.h>
|
||||
|
@ -194,7 +194,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
PAD* pad = nullptr;
|
||||
bool pad_through = false;
|
||||
VIA* via = nullptr;
|
||||
MARKER_PCB* marker = nullptr;
|
||||
PCB_MARKER* marker = nullptr;
|
||||
ZONE* zone = nullptr;
|
||||
PCB_SHAPE* shape = nullptr;
|
||||
DIMENSION_BASE* dimension = nullptr;
|
||||
|
@ -381,7 +381,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
break;
|
||||
|
||||
case PCB_MARKER_T:
|
||||
marker = static_cast<MARKER_PCB*>( item );
|
||||
marker = static_cast<PCB_MARKER*>( item );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <collector.h>
|
||||
#include <layers_id_colors_and_visibility.h> // LAYER_COUNT, layer defs
|
||||
#include <view/view.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_
|
||||
#define PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_
|
||||
#ifndef PCBNEW_CONNECTIVITY_ITEMS_H
|
||||
#define PCBNEW_CONNECTIVITY_ITEMS_H
|
||||
|
||||
#include <board.h>
|
||||
#include <pad.h>
|
||||
|
@ -175,32 +175,21 @@ public:
|
|||
private:
|
||||
BOARD_CONNECTED_ITEM* m_parent;
|
||||
|
||||
///> list of items physically connected (touching)
|
||||
CONNECTED_ITEMS m_connected;
|
||||
CONNECTED_ITEMS m_connected; ///> list of items physically connected (touching)
|
||||
CN_ANCHORS m_anchors;
|
||||
|
||||
CN_ANCHORS m_anchors;
|
||||
bool m_canChangeNet; ///> can the net propagator modify the netcode?
|
||||
|
||||
///> visited flag for the BFS scan
|
||||
bool m_visited;
|
||||
|
||||
///> can the net propagator modify the netcode?
|
||||
bool m_canChangeNet;
|
||||
|
||||
///> 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;
|
||||
bool m_visited; ///> visited flag for the BFS scan
|
||||
bool m_valid; ///> used to identify garbage items (we use lazy removal)
|
||||
|
||||
std::mutex m_listLock; ///> mutex protecting this item's connected_items set to
|
||||
///> allow parallel connection threads
|
||||
protected:
|
||||
///> dirty flag, used to identify recently added item not yet scanned into the connectivity search
|
||||
bool m_dirty;
|
||||
|
||||
///> layer range over which the item exists
|
||||
LAYER_RANGE m_layers;
|
||||
|
||||
///> bounding box for the item
|
||||
BOX2I m_bbox;
|
||||
bool m_dirty; ///> used to identify recently added item not yet
|
||||
///> scanned into the connectivity search
|
||||
LAYER_RANGE m_layers; ///> layer range over which the item exists
|
||||
BOX2I m_bbox; ///> bounding box for the item
|
||||
|
||||
public:
|
||||
void Dump();
|
||||
|
@ -224,30 +213,13 @@ public:
|
|||
m_anchors.emplace_back( std::make_shared<CN_ANCHOR>( aPos, this ) );
|
||||
}
|
||||
|
||||
CN_ANCHORS& Anchors()
|
||||
{
|
||||
return m_anchors;
|
||||
}
|
||||
CN_ANCHORS& Anchors() { return m_anchors; }
|
||||
|
||||
void SetValid( bool aValid )
|
||||
{
|
||||
m_valid = aValid;
|
||||
}
|
||||
void SetValid( bool aValid ) { m_valid = aValid; }
|
||||
bool Valid() const { return m_valid; }
|
||||
|
||||
bool Valid() const
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
void SetDirty( bool aDirty )
|
||||
{
|
||||
m_dirty = aDirty;
|
||||
}
|
||||
|
||||
bool Dirty() const
|
||||
{
|
||||
return m_dirty;
|
||||
}
|
||||
void SetDirty( bool aDirty ) { m_dirty = aDirty; }
|
||||
bool Dirty() const { return m_dirty; }
|
||||
|
||||
/**
|
||||
* Function SetLayers()
|
||||
|
@ -304,30 +276,13 @@ public:
|
|||
return m_parent;
|
||||
}
|
||||
|
||||
const CONNECTED_ITEMS& ConnectedItems() const
|
||||
{
|
||||
return m_connected;
|
||||
}
|
||||
const CONNECTED_ITEMS& ConnectedItems() const { return m_connected; }
|
||||
void ClearConnections() { m_connected.clear(); }
|
||||
|
||||
void ClearConnections()
|
||||
{
|
||||
m_connected.clear();
|
||||
}
|
||||
void SetVisited( bool aVisited ) { m_visited = aVisited; }
|
||||
bool Visited() const { return m_visited; }
|
||||
|
||||
void SetVisited( bool aVisited )
|
||||
{
|
||||
m_visited = aVisited;
|
||||
}
|
||||
|
||||
bool Visited() const
|
||||
{
|
||||
return m_visited;
|
||||
}
|
||||
|
||||
bool CanChangeNet() const
|
||||
{
|
||||
return m_canChangeNet;
|
||||
}
|
||||
bool CanChangeNet() const { return m_canChangeNet; }
|
||||
|
||||
void Connect( CN_ITEM* b )
|
||||
{
|
||||
|
@ -343,8 +298,8 @@ public:
|
|||
|
||||
void RemoveInvalidRefs();
|
||||
|
||||
virtual int AnchorCount() const;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const;
|
||||
virtual int AnchorCount() const;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const;
|
||||
|
||||
int Net() const
|
||||
{
|
||||
|
@ -358,9 +313,9 @@ class CN_ZONE_LAYER : public CN_ITEM
|
|||
{
|
||||
public:
|
||||
CN_ZONE_LAYER( ZONE* aParent, PCB_LAYER_ID aLayer, bool aCanChangeNet, int aSubpolyIndex ) :
|
||||
CN_ITEM( aParent, aCanChangeNet ),
|
||||
m_subpolyIndex( aSubpolyIndex ),
|
||||
m_layer( aLayer )
|
||||
CN_ITEM( aParent, aCanChangeNet ),
|
||||
m_subpolyIndex( aSubpolyIndex ),
|
||||
m_layer( aLayer )
|
||||
{
|
||||
SHAPE_LINE_CHAIN outline = aParent->GetFilledPolysList( aLayer ).COutline( aSubpolyIndex );
|
||||
|
||||
|
@ -382,7 +337,7 @@ public:
|
|||
|
||||
bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const
|
||||
{
|
||||
auto zone = static_cast<ZONE*>( Parent() );
|
||||
ZONE* zone = static_cast<ZONE*>( Parent() );
|
||||
int clearance = aAccuracy;
|
||||
|
||||
if( zone->GetFilledPolysUseThickness() )
|
||||
|
@ -399,23 +354,23 @@ public:
|
|||
return m_bbox;
|
||||
}
|
||||
|
||||
virtual int AnchorCount() const override;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const override;
|
||||
virtual int AnchorCount() const override;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const override;
|
||||
|
||||
private:
|
||||
std::vector<VECTOR2I> m_testOutlinePoints;
|
||||
std::vector<VECTOR2I> m_testOutlinePoints;
|
||||
std::unique_ptr<POLY_GRID_PARTITION> m_cachedPoly;
|
||||
int m_subpolyIndex;
|
||||
PCB_LAYER_ID m_layer;
|
||||
int m_subpolyIndex;
|
||||
PCB_LAYER_ID m_layer;
|
||||
};
|
||||
|
||||
class CN_LIST
|
||||
{
|
||||
private:
|
||||
bool m_dirty;
|
||||
bool m_hasInvalid;
|
||||
bool m_dirty;
|
||||
bool m_hasInvalid;
|
||||
|
||||
CN_RTREE<CN_ITEM*> m_index;
|
||||
CN_RTREE<CN_ITEM*> m_index;
|
||||
|
||||
protected:
|
||||
std::vector<CN_ITEM*> m_items;
|
||||
|
@ -465,20 +420,10 @@ public:
|
|||
m_index.Query( aItem->BBox(), aItem->Layers(), aFunc );
|
||||
}
|
||||
|
||||
void SetHasInvalid( bool aInvalid = true )
|
||||
{
|
||||
m_hasInvalid = aInvalid;
|
||||
}
|
||||
void SetHasInvalid( bool aInvalid = true ) { m_hasInvalid = aInvalid; }
|
||||
|
||||
void SetDirty( bool aDirty = true )
|
||||
{
|
||||
m_dirty = aDirty;
|
||||
}
|
||||
|
||||
bool IsDirty() const
|
||||
{
|
||||
return m_dirty;
|
||||
}
|
||||
void SetDirty( bool aDirty = true ) { m_dirty = aDirty; }
|
||||
bool IsDirty() const { return m_dirty; }
|
||||
|
||||
void RemoveInvalidItems( std::vector<CN_ITEM*>& aGarbage );
|
||||
|
||||
|
@ -517,25 +462,17 @@ public:
|
|||
class CN_CLUSTER
|
||||
{
|
||||
private:
|
||||
|
||||
bool m_conflicting = false;
|
||||
int m_originNet = 0;
|
||||
CN_ITEM* m_originPad = nullptr;
|
||||
bool m_conflicting = false;
|
||||
int m_originNet = 0;
|
||||
CN_ITEM* m_originPad = nullptr;
|
||||
std::vector<CN_ITEM*> m_items;
|
||||
|
||||
public:
|
||||
CN_CLUSTER();
|
||||
~CN_CLUSTER();
|
||||
|
||||
bool HasValidNet() const
|
||||
{
|
||||
return m_originNet > 0;
|
||||
}
|
||||
|
||||
int OriginNet() const
|
||||
{
|
||||
return m_originNet;
|
||||
}
|
||||
bool HasValidNet() const { return m_originNet > 0; }
|
||||
int OriginNet() const { return m_originNet; }
|
||||
|
||||
wxString OriginNetName() const;
|
||||
|
||||
|
@ -543,25 +480,11 @@ public:
|
|||
bool Contains( const BOARD_CONNECTED_ITEM* aItem );
|
||||
void Dump();
|
||||
|
||||
int Size() const
|
||||
{
|
||||
return m_items.size();
|
||||
}
|
||||
int Size() const { return m_items.size(); }
|
||||
|
||||
bool HasNet() const
|
||||
{
|
||||
return m_originNet > 0;
|
||||
}
|
||||
bool IsOrphaned() const { return m_originPad == nullptr; }
|
||||
|
||||
bool IsOrphaned() const
|
||||
{
|
||||
return m_originPad == nullptr;
|
||||
}
|
||||
|
||||
bool IsConflicting() const
|
||||
{
|
||||
return m_conflicting;
|
||||
}
|
||||
bool IsConflicting() const { return m_conflicting; }
|
||||
|
||||
void Add( CN_ITEM* item );
|
||||
|
||||
|
@ -574,4 +497,4 @@ public:
|
|||
typedef std::shared_ptr<CN_CLUSTER> CN_CLUSTER_PTR;
|
||||
|
||||
|
||||
#endif /* PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ */
|
||||
#endif /* PCBNEW_CONNECTIVITY_ITEMS_H */
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <dialog_create_array_base.h>
|
||||
|
||||
#include <array_options.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <pcb_base_frame.h>
|
||||
|
||||
#include <widgets/unit_binder.h>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <wx/wupdlock.h>
|
||||
#include <widgets/appearance_controls.h>
|
||||
#include <widgets/number_badge.h>
|
||||
|
@ -428,7 +428,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
{
|
||||
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 )
|
||||
{
|
||||
|
@ -444,7 +444,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
|
||||
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 )
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
case 3:
|
||||
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() )
|
||||
m_brdEditor->GetCanvas()->GetView()->Update( marker );
|
||||
|
@ -479,7 +479,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
case 4:
|
||||
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() )
|
||||
m_brdEditor->GetCanvas()->GetView()->Update( marker );
|
||||
|
@ -494,7 +494,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
{
|
||||
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(); )
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <wx/htmllbox.h>
|
||||
#include <rc_item.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <board.h>
|
||||
#include <dialog_drc_base.h>
|
||||
#include <widgets/progress_reporter.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#include <board.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <footprint.h>
|
||||
#include <pcb_text.h>
|
||||
#include <fp_text.h>
|
||||
|
@ -260,7 +260,7 @@ void DIALOG_FIND::search( bool aDirection )
|
|||
|
||||
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 ) )
|
||||
m_hitList.push_back( marker );
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <wx/event.h>
|
||||
#include <deque>
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
#include <dialog_find_base.h>
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ void DIALOG_PLOT::reInitDialog()
|
|||
int knownViolations = 0;
|
||||
int exclusions = 0;
|
||||
|
||||
for( MARKER_PCB* marker : m_parent->GetBoard()->Markers() )
|
||||
for( PCB_MARKER* marker : m_parent->GetBoard()->Markers() )
|
||||
{
|
||||
if( marker->IsExcluded() )
|
||||
exclusions++;
|
||||
|
|
|
@ -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.
|
||||
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 );
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define DIMENSION_H
|
||||
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <pcb_text.h>
|
||||
#include <geometry/shape.h>
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class DRC_TEST_PROVIDER;
|
|||
class PCB_EDIT_FRAME;
|
||||
class BOARD_ITEM;
|
||||
class BOARD;
|
||||
class MARKER_PCB;
|
||||
class PCB_MARKER;
|
||||
class NETCLASS;
|
||||
class NETLIST;
|
||||
class NETINFO_ITEM;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define DRC_PROVIDER__H
|
||||
|
||||
#include <board.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
@ -44,7 +44,7 @@ private:
|
|||
BOARD* m_board;
|
||||
|
||||
int m_severities;
|
||||
std::vector<MARKER_PCB*> m_filteredMarkers;
|
||||
std::vector<PCB_MARKER*> m_filteredMarkers;
|
||||
|
||||
public:
|
||||
BOARD_DRC_ITEMS_PROVIDER( BOARD* aBoard ) :
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
m_filteredMarkers.clear();
|
||||
|
||||
for( MARKER_PCB* marker : m_board->Markers() )
|
||||
for( PCB_MARKER* marker : m_board->Markers() )
|
||||
{
|
||||
int markerSeverity;
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
int count = 0;
|
||||
|
||||
for( MARKER_PCB* marker : m_board->Markers() )
|
||||
for( PCB_MARKER* marker : m_board->Markers() )
|
||||
{
|
||||
int markerSeverity;
|
||||
|
||||
|
@ -102,14 +102,14 @@ public:
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
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 );
|
||||
|
||||
if( aDeep )
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define DRC_RTREE_H_
|
||||
|
||||
#include <eda_rect.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <track.h>
|
||||
#include <unordered_set>
|
||||
#include <set>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <drc/drc_rule.h>
|
||||
#include <drc/drc_rule_condition.h>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <reporter.h>
|
||||
#include <drc/drc_rule_condition.h>
|
||||
#include <pcb_expr_evaluator.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define DRC_TEST_PROVIDER__H
|
||||
|
||||
#include <board.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
|
||||
#include <functional>
|
||||
#include <set>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <kiface_i.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <footprint.h>
|
||||
#include <track.h>
|
||||
#include <zone.h>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <deque>
|
||||
|
||||
#include <board_item_container.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <collectors.h>
|
||||
#include <convert_to_biu.h>
|
||||
#include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition.
|
||||
|
|
|
@ -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_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)
|
||||
.Caption( _( "Parameters" ) ).MinSize( 360, 180 ) );
|
||||
|
|
|
@ -51,7 +51,7 @@ FP_SHAPE::~FP_SHAPE()
|
|||
|
||||
void FP_SHAPE::SetLocalCoord()
|
||||
{
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
if( fp == NULL )
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ void FP_SHAPE::SetLocalCoord()
|
|||
|
||||
void FP_SHAPE::SetDrawCoord()
|
||||
{
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
m_start = m_Start0;
|
||||
m_end = m_End0;
|
||||
|
@ -108,7 +108,7 @@ void FP_SHAPE::SetDrawCoord()
|
|||
|
||||
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();
|
||||
|
||||
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 )
|
||||
{
|
||||
wxString msg;
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
if( !fp )
|
||||
return;
|
||||
|
|
|
@ -35,7 +35,7 @@ FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) :
|
|||
BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ),
|
||||
EDA_TEXT()
|
||||
{
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
m_Type = text_type;
|
||||
m_keepUpright = true;
|
||||
|
@ -197,7 +197,7 @@ int FP_TEXT::GetLength() const
|
|||
|
||||
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 );
|
||||
|
||||
|
@ -216,7 +216,7 @@ void FP_TEXT::SetDrawCoord()
|
|||
|
||||
void FP_TEXT::SetLocalCoord()
|
||||
{
|
||||
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_Parent );
|
||||
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_parent );
|
||||
|
||||
if( parentFootprint )
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ const EDA_RECT FP_TEXT::GetBoundingBox() const
|
|||
|
||||
double FP_TEXT::GetDrawRotation() const
|
||||
{
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||
double rotation = GetTextAngle();
|
||||
|
||||
if( parentFootprint )
|
||||
|
@ -273,7 +273,7 @@ double FP_TEXT::GetDrawRotation() const
|
|||
// see class_text_mod.h
|
||||
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
|
||||
return;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define FP_TEXT_H
|
||||
|
||||
#include <eda_text.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
class LINE_READER;
|
||||
class EDA_RECT;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define KICAD_CLIPBOARD_H
|
||||
|
||||
#include <plugins/kicad/kicad_plugin.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <footprint.h>
|
||||
#include <plugins/kicad/pcb_parser.h>
|
||||
#include <memory.h>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <bitmaps.h>
|
||||
#include <board_commit.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <class_draw_panel_gal.h>
|
||||
#include <footprint.h>
|
||||
#include <confirm.h>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <macros_swig.h>
|
||||
#include <gr_basic.h>
|
||||
#include <netclass.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ PAD::PAD( FOOTPRINT* parent ) :
|
|||
m_orient = 0; // Pad rotation in 1/10 degrees.
|
||||
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();
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ const EDA_RECT PAD::GetBoundingBox() const
|
|||
|
||||
void PAD::SetDrawCoord()
|
||||
{
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
m_pos = m_pos0;
|
||||
|
||||
|
@ -495,7 +495,7 @@ void PAD::SetDrawCoord()
|
|||
|
||||
void PAD::SetLocalCoord()
|
||||
{
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
if( parentFootprint == NULL )
|
||||
{
|
||||
|
@ -805,7 +805,7 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||
wxString msg, msg2;
|
||||
BOARD* board = GetBoard();
|
||||
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_Parent );
|
||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
if( parentFootprint )
|
||||
aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference(), DARKCYAN );
|
||||
|
@ -1240,7 +1240,7 @@ const BOX2I PAD::ViewBBox() const
|
|||
|
||||
FOOTPRINT* PAD::GetParent() const
|
||||
{
|
||||
return dynamic_cast<FOOTPRINT*>( m_Parent );
|
||||
return dynamic_cast<FOOTPRINT*>( m_parent );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <zones.h>
|
||||
#include <board_connected_item.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <convert_to_biu.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <geometry/shape_compound.h>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pad.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
|
|
@ -634,7 +634,7 @@ void PCB_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
if( cfg )
|
||||
{
|
||||
m_displayOptions = cfg->m_Display;
|
||||
m_PolarCoords = cfg->m_PolarCoords;
|
||||
m_polarCoords = cfg->m_PolarCoords;
|
||||
}
|
||||
|
||||
wxASSERT( GetCanvas() );
|
||||
|
@ -674,7 +674,7 @@ void PCB_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
if( cfg )
|
||||
{
|
||||
cfg->m_Display = m_displayOptions;
|
||||
cfg->m_PolarCoords = m_PolarCoords;
|
||||
cfg->m_PolarCoords = m_polarCoords;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <track.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <ratsnest/ratsnest_data.h>
|
||||
|
@ -201,7 +201,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard )
|
|||
m_view->Add( footprint );
|
||||
|
||||
// DRC markers
|
||||
for( MARKER_PCB* marker : aBoard->Markers() )
|
||||
for( PCB_MARKER* marker : aBoard->Markers() )
|
||||
m_view->Add( marker );
|
||||
|
||||
// Finalize the triangulation threads
|
||||
|
|
|
@ -725,7 +725,7 @@ void PCB_EDIT_FRAME::RecordDRCExclusions()
|
|||
BOARD_DESIGN_SETTINGS& bds = GetBoard()->GetDesignSettings();
|
||||
bds.m_DrcExclusions.clear();
|
||||
|
||||
for( MARKER_PCB* marker : GetBoard()->Markers() )
|
||||
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
||||
{
|
||||
if( marker->IsExcluded() )
|
||||
bds.m_DrcExclusions.insert( marker->Serialize() );
|
||||
|
@ -737,12 +737,12 @@ void PCB_EDIT_FRAME::ResolveDRCExclusions()
|
|||
{
|
||||
BOARD_COMMIT commit( this );
|
||||
|
||||
for( MARKER_PCB* marker : GetBoard()->ResolveDRCExclusions() )
|
||||
for( PCB_MARKER* marker : GetBoard()->ResolveDRCExclusions() )
|
||||
commit.Add( marker );
|
||||
|
||||
commit.Push( wxEmptyString, false, false );
|
||||
|
||||
for( MARKER_PCB* marker : GetBoard()->Markers() )
|
||||
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
||||
{
|
||||
if( marker->IsExcluded() )
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ class ZONE;
|
|||
class GENERAL_COLLECTOR;
|
||||
class GENERAL_COLLECTORS_GUIDE;
|
||||
class SELECTION;
|
||||
class MARKER_PCB;
|
||||
class PCB_MARKER;
|
||||
class BOARD_ITEM;
|
||||
class PCB_LAYER_BOX_SELECTOR;
|
||||
class NETLIST;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
#include <bitmaps.h>
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <pcb_group.h>
|
||||
#include <confirm.h>
|
||||
#include <widgets/msgpanel.h>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <base_units.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <board.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <settings/color_settings.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()
|
||||
MARKER_BASE( SCALING_FACTOR, aItem )
|
||||
{
|
||||
|
@ -54,12 +54,12 @@ MARKER_PCB::MARKER_PCB( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition
|
|||
|
||||
|
||||
/* 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" ),
|
||||
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, '|' );
|
||||
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] ) );
|
||||
|
||||
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( _( "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 );
|
||||
}
|
||||
|
||||
|
||||
void MARKER_PCB::Flip(const wxPoint& aCentre, bool aFlipLeftRight )
|
||||
void PCB_MARKER::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
||||
{
|
||||
if( aFlipLeftRight )
|
||||
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
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
void PCB_MARKER::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
{
|
||||
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() )
|
||||
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();
|
||||
return colors->GetColor( GetColorLayer() );
|
||||
}
|
||||
|
||||
|
||||
const EDA_RECT MARKER_PCB::GetBoundingBox() const
|
||||
const EDA_RECT PCB_MARKER::GetBoundingBox() const
|
||||
{
|
||||
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();
|
||||
return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), bbox.GetHeight() ) );
|
|
@ -22,16 +22,11 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_marker_pcb.h
|
||||
* @brief Markers used to show a drc problem on boards.
|
||||
*/
|
||||
|
||||
#ifndef CLASS_MARKER_PCB_H
|
||||
#define CLASS_MARKER_PCB_H
|
||||
#ifndef PCB_MARKER_H
|
||||
#define PCB_MARKER_H
|
||||
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <marker_base.h>
|
||||
|
||||
|
@ -43,11 +38,11 @@ class DRC_ITEM;
|
|||
class MSG_PANEL_ITEM;
|
||||
|
||||
|
||||
class MARKER_PCB : public BOARD_ITEM, public MARKER_BASE
|
||||
class PCB_MARKER : public BOARD_ITEM, public MARKER_BASE
|
||||
{
|
||||
public:
|
||||
MARKER_PCB( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition );
|
||||
~MARKER_PCB();
|
||||
PCB_MARKER( std::shared_ptr<RC_ITEM> aItem, const wxPoint& aPosition );
|
||||
~PCB_MARKER();
|
||||
|
||||
static inline bool ClassOf( const EDA_ITEM* aItem )
|
||||
{
|
||||
|
@ -58,7 +53,7 @@ public:
|
|||
|
||||
wxString Serialize() const;
|
||||
|
||||
static MARKER_PCB* Deserialize( const wxString& data );
|
||||
static PCB_MARKER* Deserialize( const wxString& data );
|
||||
|
||||
void Move(const wxPoint& aMoveVector) override
|
||||
{
|
||||
|
@ -106,15 +101,15 @@ public:
|
|||
#endif
|
||||
|
||||
/** Get class name
|
||||
* @return string "MARKER_PCB"
|
||||
* @return string "PCB_MARKER"
|
||||
*/
|
||||
virtual wxString GetClass() const override
|
||||
{
|
||||
return wxT( "MARKER_PCB" );
|
||||
return wxT( "PCB_MARKER" );
|
||||
}
|
||||
|
||||
protected:
|
||||
KIGFX::COLOR4D getColor() const override;
|
||||
};
|
||||
|
||||
#endif // CLASS_MARKER_PCB_H
|
||||
#endif // PCB_MARKER_H
|
|
@ -32,7 +32,7 @@
|
|||
#include <kicad_string.h>
|
||||
#include <zone.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <dimension.h>
|
||||
#include <pcb_target.h>
|
||||
|
||||
|
@ -467,7 +467,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
|
|||
break;
|
||||
|
||||
case PCB_MARKER_T:
|
||||
draw( static_cast<const MARKER_PCB*>( item ), aLayer );
|
||||
draw( static_cast<const PCB_MARKER*>( item ), aLayer );
|
||||
break;
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class PCB_TEXT;
|
|||
class FP_TEXT;
|
||||
class DIMENSION_BASE;
|
||||
class PCB_TARGET;
|
||||
class MARKER_PCB;
|
||||
class PCB_MARKER;
|
||||
class NET_SETTINGS;
|
||||
class NETINFO_LIST;
|
||||
|
||||
|
@ -293,7 +293,7 @@ protected:
|
|||
void draw( const ZONE* aZone, int aLayer );
|
||||
void draw( const DIMENSION_BASE* aDimension, int aLayer );
|
||||
void draw( const PCB_TARGET* aTarget );
|
||||
void draw( const MARKER_PCB* aMarker, int aLayer );
|
||||
void draw( const PCB_MARKER* aMarker, int aLayer );
|
||||
|
||||
/**
|
||||
* Function getLineThickness()
|
||||
|
|
|
@ -47,7 +47,7 @@ PCB_SHAPE::PCB_SHAPE( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
|||
{
|
||||
m_angle = 0;
|
||||
m_filled = false;
|
||||
m_Flags = 0;
|
||||
m_flags = 0;
|
||||
m_shape = S_SEGMENT;
|
||||
m_width = Millimeter2iu( DEFAULT_LINE_WIDTH );
|
||||
}
|
||||
|
@ -456,10 +456,10 @@ void PCB_SHAPE::SetAngle( double aAngle, bool aUpdateEnd )
|
|||
|
||||
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 (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_poly, image->m_poly );
|
||||
std::swap( m_layer, image->m_layer );
|
||||
std::swap( m_Flags, image->m_Flags );
|
||||
std::swap( m_Status, image->m_Status );
|
||||
std::swap( m_Parent, image->m_Parent );
|
||||
std::swap( m_flags, image->m_flags );
|
||||
std::swap( m_status, image->m_status );
|
||||
std::swap( m_parent, image->m_parent );
|
||||
std::swap( m_forceVisible, image->m_forceVisible );
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef PCB_SHAPE_H
|
||||
#define PCB_SHAPE_H
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <eda_units.h>
|
||||
#include <convert_to_biu.h>
|
||||
#include <math/util.h> // for KiROUND
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef PCB_TARGET_H
|
||||
#define PCB_TARGET_H
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
|
||||
class EDA_RECT;
|
||||
|
|
|
@ -107,7 +107,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
{
|
||||
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 );
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define PCB_TEXT_H
|
||||
|
||||
#include <eda_text.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
|
||||
class LINE_READER;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <view/view.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
class PCB_DISPLAY_OPTIONS;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include <pcb_plot_params.h> // for PCB_PLOT_PARAMS, PCB_PL...
|
||||
|
||||
#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 <pcb_shape.h>
|
||||
#include <fp_shape.h>
|
||||
|
|
|
@ -649,7 +649,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
|
|||
if( sorted_drawings.size() )
|
||||
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.
|
||||
for( TRACK* track : sorted_tracks )
|
||||
|
|
|
@ -57,7 +57,7 @@ class PCB_GROUP;
|
|||
class PCB_TARGET;
|
||||
class VIA;
|
||||
class ZONE;
|
||||
class MARKER_PCB;
|
||||
class PCB_MARKER;
|
||||
class FP_3DMODEL;
|
||||
struct LAYER;
|
||||
|
||||
|
@ -176,7 +176,7 @@ class PCB_PARSER : public PCB_LEXER
|
|||
VIA* parseVIA();
|
||||
ZONE* parseZONE( BOARD_ITEM_CONTAINER* aParent );
|
||||
PCB_TARGET* parsePCB_TARGET();
|
||||
MARKER_PCB* parseMARKER( BOARD_ITEM_CONTAINER* aParent );
|
||||
PCB_MARKER* parseMARKER( BOARD_ITEM_CONTAINER* aParent );
|
||||
BOARD* parseBOARD();
|
||||
void parseGROUP( BOARD_ITEM* aParent );
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <netinfo.h>
|
||||
|
||||
#include "pns_node.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "pns_utils.h"
|
||||
#include "pns_walkaround.h"
|
||||
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <functional>
|
||||
using namespace std::placeholders;
|
||||
#include <board.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <footprint.h>
|
||||
#include <fp_shape.h>
|
||||
#include <pad.h>
|
||||
|
|
|
@ -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*;
|
||||
|
||||
%{
|
||||
#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 FP_TEXT* Cast_to_FP_TEXT( 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 FP_SHAPE* Cast_to_FP_SHAPE( 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 FP_TEXT* Cast_to_FP_TEXT( 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 FP_SHAPE* Cast_to_FP_SHAPE( 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 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 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 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); }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
%include class_marker_pcb.h
|
||||
%include pcb_marker.h
|
||||
%{
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
%}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <action_plugin.h>
|
||||
#include <board.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <cstdlib>
|
||||
#include <drc/drc_engine.h>
|
||||
#include <drc/drc_item.h>
|
||||
|
@ -163,7 +163,7 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat )
|
|||
// Best efforts...
|
||||
}
|
||||
|
||||
for( MARKER_PCB* marker : brd->ResolveDRCExclusions() )
|
||||
for( PCB_MARKER* marker : brd->ResolveDRCExclusions() )
|
||||
brd->Add( marker );
|
||||
|
||||
brd->BuildConnectivity();
|
||||
|
|
|
@ -194,7 +194,7 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones
|
|||
}
|
||||
else
|
||||
{
|
||||
MARKER_PCB* marker = new MARKER_PCB( aItem, aPos );
|
||||
PCB_MARKER* marker = new PCB_MARKER( aItem, aPos );
|
||||
commit.Add( marker );
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <board_commit.h>
|
||||
#include <board.h>
|
||||
#include <track.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <geometry/seg.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <memory>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <view/view.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <bitmaps.h>
|
||||
#include <class_board_item.h>
|
||||
#include <board_item.h>
|
||||
#include <footprint.h>
|
||||
#include <fp_shape.h>
|
||||
#include <board_commit.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue