Pcbnew header housekeeping round 2.
This commit is contained in:
parent
2a6c7a7c0f
commit
c69c68a558
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -43,8 +43,7 @@ class FOOTPRINT;
|
|||
#define AR_SIDE_BOTTOM 1
|
||||
|
||||
/**
|
||||
* AR_MATRIX
|
||||
* handle the matrix routing that describes the actual board
|
||||
* Handle the matrix routing that describes the actual board.
|
||||
*/
|
||||
class AR_MATRIX
|
||||
{
|
||||
|
@ -52,24 +51,6 @@ public:
|
|||
typedef unsigned char MATRIX_CELL;
|
||||
typedef int DIST_CELL;
|
||||
|
||||
MATRIX_CELL* m_BoardSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides
|
||||
DIST_CELL* m_DistSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides:
|
||||
// distance to cells
|
||||
int m_RoutingLayersCount; // Number of layers for autorouting (0 or 1)
|
||||
int m_GridRouting; // Size of grid for autoplace/autoroute
|
||||
EDA_RECT m_BrdBox; // Actual board bounding box
|
||||
int m_Nrows, m_Ncols; // Matrix size
|
||||
int m_MemSize; // Memory requirement, just for statistics
|
||||
int m_RouteCount; // Number of routes
|
||||
|
||||
PCB_LAYER_ID m_routeLayerTop;
|
||||
PCB_LAYER_ID m_routeLayerBottom;
|
||||
|
||||
private:
|
||||
// a pointer to the current selected cell operation
|
||||
void ( AR_MATRIX::*m_opWriteCell )( int aRow, int aCol, int aSide, MATRIX_CELL aCell );
|
||||
|
||||
public:
|
||||
enum CELL_OP
|
||||
{
|
||||
WRITE_CELL = 0,
|
||||
|
@ -88,9 +69,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* function GetBrdCoordOrigin
|
||||
* @return the board coordinate corresponding to the
|
||||
* routing matrix origin ( board coordinate offset )
|
||||
* @return the board coordinate corresponding to the routing matrix origin ( board
|
||||
* coordinate offset ).
|
||||
*/
|
||||
wxPoint GetBrdCoordOrigin()
|
||||
{
|
||||
|
@ -98,18 +78,17 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function ComputeMatrixSize
|
||||
* calculates the number of rows and columns of dimensions of \a aPcb for routing and
|
||||
* Calculate the number of rows and columns of dimensions of \a aPcb for routing and
|
||||
* automatic calculation of area.
|
||||
* @param aPcb = the physical board
|
||||
* @param aUseBoardEdgesOnly = true to use board edges only,
|
||||
* = false to use the full board bounding box (default)
|
||||
*
|
||||
* @param aPcb is the physical board.
|
||||
* @param aUseBoardEdgesOnly set to true to use board edges only or false to use the full
|
||||
* board bounding box (default).
|
||||
*/
|
||||
bool ComputeMatrixSize( const EDA_RECT& aBoundingBox );
|
||||
|
||||
/**
|
||||
* Function InitBoard
|
||||
* initializes the data structures.
|
||||
* Initialize the data structures.
|
||||
*
|
||||
* @return the amount of memory used or -1 if default.
|
||||
*/
|
||||
|
@ -155,6 +134,24 @@ private:
|
|||
|
||||
void traceArc( int ux0, int uy0, int ux1, int uy1, double ArcAngle, int lg, LAYER_NUM layer,
|
||||
int color, AR_MATRIX::CELL_OP op_logic );
|
||||
|
||||
public:
|
||||
MATRIX_CELL* m_BoardSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides
|
||||
DIST_CELL* m_DistSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides:
|
||||
// distance to cells
|
||||
int m_RoutingLayersCount; // Number of layers for autorouting (0 or 1)
|
||||
int m_GridRouting; // Size of grid for autoplace/autoroute
|
||||
EDA_RECT m_BrdBox; // Actual board bounding box
|
||||
int m_Nrows, m_Ncols; // Matrix size
|
||||
int m_MemSize; // Memory requirement, just for statistics
|
||||
int m_RouteCount; // Number of routes
|
||||
|
||||
PCB_LAYER_ID m_routeLayerTop;
|
||||
PCB_LAYER_ID m_routeLayerBottom;
|
||||
|
||||
private:
|
||||
// a pointer to the current selected cell operation
|
||||
void ( AR_MATRIX::*m_opWriteCell )( int aRow, int aCol, int aSide, MATRIX_CELL aCell );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -171,13 +171,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
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
|
||||
DECL_DEQ_FOR_SWIG( GROUPS, PCB_GROUP* )
|
||||
|
||||
/**
|
||||
* Flags to specify how the board is being used.
|
||||
*/
|
||||
|
|
|
@ -156,32 +156,6 @@ public:
|
|||
std::list<CN_ITEM*> m_items;
|
||||
};
|
||||
|
||||
private:
|
||||
CN_LIST m_itemList;
|
||||
|
||||
std::unordered_map<const BOARD_ITEM*, ITEM_MAP_ENTRY> m_itemMap;
|
||||
|
||||
CLUSTERS m_connClusters;
|
||||
CLUSTERS m_ratsnestClusters;
|
||||
std::vector<bool> m_dirtyNets;
|
||||
PROGRESS_REPORTER* m_progressReporter = nullptr;
|
||||
|
||||
void searchConnections();
|
||||
|
||||
void propagateConnections( BOARD_COMMIT* aCommit = nullptr,
|
||||
PROPAGATE_MODE aMode = PROPAGATE_MODE::SKIP_CONFLICTS );
|
||||
|
||||
template <class Container, class BItem>
|
||||
void add( Container& c, BItem brditem )
|
||||
{
|
||||
auto item = c.Add( brditem );
|
||||
|
||||
m_itemMap[ brditem ] = ITEM_MAP_ENTRY( item );
|
||||
}
|
||||
|
||||
void markItemNetAsDirty( const BOARD_ITEM* aItem );
|
||||
|
||||
public:
|
||||
CN_CONNECTIVITY_ALGO() {}
|
||||
~CN_CONNECTIVITY_ALGO() { Clear(); }
|
||||
|
||||
|
@ -238,9 +212,9 @@ public:
|
|||
const CLUSTERS SearchClusters( CLUSTER_SEARCH_MODE aMode );
|
||||
|
||||
/**
|
||||
* Propagates nets from pads to other items in clusters
|
||||
* @param aCommit is used to store undo information for items modified by the call
|
||||
* @param aMode controls how clusters with conflicting nets are resolved
|
||||
* Propagate nets from pads to other items in clusters.
|
||||
* @param aCommit is used to store undo information for items modified by the call.
|
||||
* @param aMode controls how clusters with conflicting nets are resolved.
|
||||
*/
|
||||
void PropagateNets( BOARD_COMMIT* aCommit = nullptr,
|
||||
PROPAGATE_MODE aMode = PROPAGATE_MODE::SKIP_CONFLICTS );
|
||||
|
@ -248,10 +222,12 @@ public:
|
|||
void FindIsolatedCopperIslands( ZONE* aZone, PCB_LAYER_ID aLayer, std::vector<int>& aIslands );
|
||||
|
||||
/**
|
||||
* Finds the copper islands that are not connected to a net. These are added to
|
||||
* the m_islands vector.
|
||||
* Find the copper islands that are not connected to a net.
|
||||
*
|
||||
* These are added to the m_islands vector.
|
||||
* N.B. This must be called after aZones has been refreshed.
|
||||
* @param: aZones The set of zones to search for islands
|
||||
*
|
||||
* @param: aZones is the set of zones to search for islands.
|
||||
*/
|
||||
void FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_ISLAND_LIST>& aZones );
|
||||
|
||||
|
@ -279,9 +255,34 @@ public:
|
|||
aFunc( *item );
|
||||
}
|
||||
|
||||
|
||||
void MarkNetAsDirty( int aNet );
|
||||
void SetProgressReporter( PROGRESS_REPORTER* aReporter );
|
||||
|
||||
private:
|
||||
void searchConnections();
|
||||
|
||||
void propagateConnections( BOARD_COMMIT* aCommit = nullptr,
|
||||
PROPAGATE_MODE aMode = PROPAGATE_MODE::SKIP_CONFLICTS );
|
||||
|
||||
template <class Container, class BItem>
|
||||
void add( Container& c, BItem brditem )
|
||||
{
|
||||
auto item = c.Add( brditem );
|
||||
|
||||
m_itemMap[ brditem ] = ITEM_MAP_ENTRY( item );
|
||||
}
|
||||
|
||||
void markItemNetAsDirty( const BOARD_ITEM* aItem );
|
||||
|
||||
CN_LIST m_itemList;
|
||||
|
||||
std::unordered_map<const BOARD_ITEM*, ITEM_MAP_ENTRY> m_itemMap;
|
||||
|
||||
CLUSTERS m_connClusters;
|
||||
CLUSTERS m_ratsnestClusters;
|
||||
std::vector<bool> m_dirtyNets;
|
||||
PROGRESS_REPORTER* m_progressReporter = nullptr;
|
||||
|
||||
};
|
||||
|
||||
class CN_VISITOR
|
||||
|
|
|
@ -68,7 +68,6 @@ public:
|
|||
|
||||
bool Valid() const;
|
||||
|
||||
|
||||
CN_ITEM* Item() const
|
||||
{
|
||||
return m_item;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -34,12 +34,11 @@ class PCB_BASE_FRAME;
|
|||
|
||||
class DIALOG_CLEANUP_GRAPHICS: public DIALOG_CLEANUP_GRAPHICS_BASE
|
||||
{
|
||||
PCB_BASE_FRAME* m_parentFrame;
|
||||
bool m_isFootprintEditor;
|
||||
RC_TREE_MODEL* m_changesTreeModel;
|
||||
|
||||
std::vector<std::shared_ptr<CLEANUP_ITEM> > m_items;
|
||||
public:
|
||||
DIALOG_CLEANUP_GRAPHICS( PCB_BASE_FRAME* aParent, bool aIsFootprintEditor );
|
||||
~DIALOG_CLEANUP_GRAPHICS();
|
||||
|
||||
private:
|
||||
void doCleanup( bool aDryRun );
|
||||
|
||||
void OnCheckBox( wxCommandEvent& anEvent ) override;
|
||||
|
@ -49,9 +48,11 @@ class DIALOG_CLEANUP_GRAPHICS: public DIALOG_CLEANUP_GRAPHICS_BASE
|
|||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
public:
|
||||
DIALOG_CLEANUP_GRAPHICS( PCB_BASE_FRAME* aParent, bool aIsFootprintEditor );
|
||||
~DIALOG_CLEANUP_GRAPHICS();
|
||||
PCB_BASE_FRAME* m_parentFrame;
|
||||
bool m_isFootprintEditor;
|
||||
RC_TREE_MODEL* m_changesTreeModel;
|
||||
|
||||
std::vector<std::shared_ptr<CLEANUP_ITEM>> m_items;
|
||||
};
|
||||
|
||||
#endif // DIALOG_CLEANUP_GRAPHICS_H_
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -34,12 +34,11 @@ class PCB_EDIT_FRAME;
|
|||
|
||||
class DIALOG_CLEANUP_TRACKS_AND_VIAS: public DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE
|
||||
{
|
||||
PCB_EDIT_FRAME* m_parentFrame;
|
||||
RC_TREE_MODEL* m_changesTreeModel;
|
||||
bool m_firstRun;
|
||||
|
||||
std::vector<std::shared_ptr<CLEANUP_ITEM> > m_items;
|
||||
public:
|
||||
DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* parent );
|
||||
~DIALOG_CLEANUP_TRACKS_AND_VIAS();
|
||||
|
||||
private:
|
||||
void doCleanup( bool aDryRun );
|
||||
|
||||
void OnCheckBox( wxCommandEvent& anEvent ) override;
|
||||
|
@ -49,9 +48,11 @@ class DIALOG_CLEANUP_TRACKS_AND_VIAS: public DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE
|
|||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
public:
|
||||
DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* parent );
|
||||
~DIALOG_CLEANUP_TRACKS_AND_VIAS();
|
||||
PCB_EDIT_FRAME* m_parentFrame;
|
||||
RC_TREE_MODEL* m_changesTreeModel;
|
||||
bool m_firstRun;
|
||||
|
||||
std::vector<std::shared_ptr<CLEANUP_ITEM> > m_items;
|
||||
};
|
||||
|
||||
#endif // DIALOG_CLEANUP_TRACKS_AND_VIAS_H_
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -35,13 +35,6 @@ class LIB_ID;
|
|||
|
||||
class DIALOG_EXCHANGE_FOOTPRINTS : public DIALOG_EXCHANGE_FOOTPRINTS_BASE
|
||||
{
|
||||
private:
|
||||
BOARD_COMMIT m_commit;
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
FOOTPRINT* m_currentFootprint;
|
||||
bool m_updateMode;
|
||||
int* m_matchMode;
|
||||
|
||||
public:
|
||||
DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, FOOTPRINT* aFootprint, bool updateMode,
|
||||
bool selectedMode );
|
||||
|
@ -62,6 +55,12 @@ private:
|
|||
bool isMatch( FOOTPRINT* );
|
||||
bool processMatchingFootprints();
|
||||
bool processFootprint( FOOTPRINT* aFootprint, const LIB_ID& aNewFPID );
|
||||
|
||||
BOARD_COMMIT m_commit;
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
FOOTPRINT* m_currentFootprint;
|
||||
bool m_updateMode;
|
||||
int* m_matchMode;
|
||||
};
|
||||
|
||||
#endif // DIALOG_EXCHANGE_FOOTPRINTS_H_
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2012 Marco Mattila <marcom99@gmail.com>
|
||||
* Copyright (C) 2006 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
* Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -43,8 +43,7 @@ public:
|
|||
DIALOG_FIND( PCB_BASE_FRAME* aParent );
|
||||
|
||||
/**
|
||||
* Returns the currently found item or nullptr in the case of no items found
|
||||
* @return
|
||||
* Return the currently found item or nullptr in the case of no items found.
|
||||
*/
|
||||
inline BOARD_ITEM* GetItem() const
|
||||
{
|
||||
|
@ -55,9 +54,9 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function to be called on each found event. Must be able to handle nullptr in the
|
||||
* case where no item is found
|
||||
* @param aCallback
|
||||
* Function to be called on each found event.
|
||||
*
|
||||
* The callback function must be able to handle nullptr in the case where no item is found.
|
||||
*/
|
||||
void SetCallback( std::function<void( BOARD_ITEM* )> aCallback )
|
||||
{
|
||||
|
@ -66,19 +65,19 @@ public:
|
|||
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_frame;
|
||||
std::deque<BOARD_ITEM*> m_hitList;
|
||||
std::deque<BOARD_ITEM*>::iterator m_it;
|
||||
bool m_upToDate;
|
||||
|
||||
std::function<void( BOARD_ITEM* )> m_highlightCallback;
|
||||
|
||||
void onTextEnter( wxCommandEvent& event ) override;
|
||||
void onFindNextClick( wxCommandEvent& event ) override;
|
||||
void onFindPreviousClick( wxCommandEvent& event ) override;
|
||||
void onSearchAgainClick( wxCommandEvent& event ) override;
|
||||
void onClose( wxCommandEvent& event ) override;
|
||||
void search( bool direction );
|
||||
|
||||
PCB_BASE_FRAME* m_frame;
|
||||
std::deque<BOARD_ITEM*> m_hitList;
|
||||
std::deque<BOARD_ITEM*>::iterator m_it;
|
||||
bool m_upToDate;
|
||||
|
||||
std::function<void( BOARD_ITEM* )> m_highlightCallback;
|
||||
};
|
||||
|
||||
#endif /* DIALOG_FIND_BASE_H */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -52,37 +52,6 @@ public:
|
|||
FP_PROPS_EDIT_LIBRARY_FP
|
||||
};
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
FOOTPRINT* m_footprint;
|
||||
|
||||
static int m_page; // remember the last open page during session
|
||||
|
||||
FP_TEXT_GRID_TABLE* m_texts;
|
||||
UNIT_BINDER m_posX;
|
||||
UNIT_BINDER m_posY;
|
||||
wxFloatingPointValidator<double> m_OrientValidator;
|
||||
double m_OrientValue;
|
||||
|
||||
UNIT_BINDER m_netClearance;
|
||||
UNIT_BINDER m_solderMask;
|
||||
UNIT_BINDER m_solderPaste;
|
||||
|
||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||
PANEL_PREV_3D* m_PreviewPane;
|
||||
|
||||
wxString m_delayedErrorMessage;
|
||||
wxGrid* m_delayedFocusGrid;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
bool m_initialFocus;
|
||||
|
||||
bool m_inSelect;
|
||||
std::vector<bool> m_macHack;
|
||||
enum FP_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
|
||||
|
||||
public:
|
||||
// Constructor and destructor
|
||||
DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent, FOOTPRINT* aFootprint );
|
||||
~DIALOG_FOOTPRINT_PROPERTIES() override;
|
||||
|
||||
|
@ -91,7 +60,7 @@ public:
|
|||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// @return the value depending on the way the dialog was closed:
|
||||
///< @return the value depending on the way the dialog was closed.
|
||||
enum FP_PROPS_RETVALUE GetReturnValue() { return m_returnValue; }
|
||||
|
||||
private:
|
||||
|
@ -123,6 +92,34 @@ private:
|
|||
* event on the control (which would update the radio buttons)
|
||||
*/
|
||||
void updateOrientationControl();
|
||||
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
FOOTPRINT* m_footprint;
|
||||
|
||||
static int m_page; // remember the last open page during session
|
||||
|
||||
FP_TEXT_GRID_TABLE* m_texts;
|
||||
UNIT_BINDER m_posX;
|
||||
UNIT_BINDER m_posY;
|
||||
wxFloatingPointValidator<double> m_OrientValidator;
|
||||
double m_OrientValue;
|
||||
|
||||
UNIT_BINDER m_netClearance;
|
||||
UNIT_BINDER m_solderMask;
|
||||
UNIT_BINDER m_solderPaste;
|
||||
|
||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||
PANEL_PREV_3D* m_PreviewPane;
|
||||
|
||||
wxString m_delayedErrorMessage;
|
||||
wxGrid* m_delayedFocusGrid;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
bool m_initialFocus;
|
||||
|
||||
bool m_inSelect;
|
||||
std::vector<bool> m_macHack;
|
||||
enum FP_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -38,33 +38,7 @@ class FOOTPRINT_EDIT_FRAME;
|
|||
|
||||
class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR : public DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE
|
||||
{
|
||||
private:
|
||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||
FOOTPRINT* m_footprint;
|
||||
|
||||
static int m_page; // remember the last open page during session
|
||||
|
||||
FP_TEXT_GRID_TABLE* m_texts;
|
||||
|
||||
UNIT_BINDER m_netClearance;
|
||||
UNIT_BINDER m_solderMask;
|
||||
UNIT_BINDER m_solderPaste;
|
||||
|
||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||
PANEL_PREV_3D* m_PreviewPane;
|
||||
|
||||
wxControl* m_delayedFocusCtrl;
|
||||
int m_delayedFocusPage;
|
||||
|
||||
WX_GRID* m_delayedFocusGrid;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
wxString m_delayedErrorMessage;
|
||||
|
||||
bool m_inSelect;
|
||||
|
||||
public:
|
||||
// Constructor and destructor
|
||||
DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, FOOTPRINT* aFootprint );
|
||||
~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR() override;
|
||||
|
||||
|
@ -93,6 +67,30 @@ private:
|
|||
void select3DModel( int aModelIdx );
|
||||
|
||||
void adjustGridColumns( int aWidth );
|
||||
|
||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||
FOOTPRINT* m_footprint;
|
||||
|
||||
static int m_page; // remember the last open page during session
|
||||
|
||||
FP_TEXT_GRID_TABLE* m_texts;
|
||||
|
||||
UNIT_BINDER m_netClearance;
|
||||
UNIT_BINDER m_solderMask;
|
||||
UNIT_BINDER m_solderPaste;
|
||||
|
||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||
PANEL_PREV_3D* m_PreviewPane;
|
||||
|
||||
wxControl* m_delayedFocusCtrl;
|
||||
int m_delayedFocusPage;
|
||||
|
||||
WX_GRID* m_delayedFocusGrid;
|
||||
int m_delayedFocusRow;
|
||||
int m_delayedFocusColumn;
|
||||
wxString m_delayedErrorMessage;
|
||||
|
||||
bool m_inSelect;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2019 Jean_Pierre Charras <jp.charras@ujf-grenoble.fr>
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -32,9 +32,8 @@ class DIALOG_GENDRILL : public DIALOG_GENDRILL_BASE
|
|||
{
|
||||
public:
|
||||
/**
|
||||
* Ctor
|
||||
* @param aPcbEditFrame is the board edit frame
|
||||
* @param aParent is the parent window caller ( the board edit frame or a dialog )
|
||||
* @param aPcbEditFrame is the board edit frame.
|
||||
* @param aParent is the parent window caller ( the board edit frame or a dialog ).
|
||||
*/
|
||||
DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, wxWindow* aParent );
|
||||
~DIALOG_GENDRILL();
|
||||
|
@ -44,32 +43,7 @@ public:
|
|||
*/
|
||||
void UpdateDrillParams();
|
||||
|
||||
static int m_UnitDrillIsInch;
|
||||
static int m_ZerosFormat;
|
||||
static bool m_MinimalHeader;
|
||||
static bool m_Mirror;
|
||||
static bool m_Merge_PTH_NPTH;
|
||||
DRILL_PRECISION m_Precision; // Precision for drill files, in non decimal format
|
||||
wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordinates,
|
||||
// or origin of the auxiliary axis
|
||||
static bool m_UseRouteModeForOvalHoles; // True to use a G00 route command for oval holes
|
||||
// False to use a G85 canned mode for oval holes
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_pcbEditFrame;
|
||||
BOARD* m_board;
|
||||
PCB_PLOT_PARAMS m_plotOpts;
|
||||
bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
|
||||
// for drill origin coordinates
|
||||
int m_platedPadsHoleCount;
|
||||
int m_notplatedPadsHoleCount;
|
||||
int m_throughViasCount;
|
||||
int m_microViasCount;
|
||||
int m_blindOrBuriedViasCount;
|
||||
|
||||
static int m_mapFileType; // format of map file: HPGL, PS ...
|
||||
static int m_drillFileType; // for Excellon, Gerber
|
||||
|
||||
void initDialog();
|
||||
void InitDisplayParams();
|
||||
|
||||
|
@ -106,19 +80,44 @@ private:
|
|||
|
||||
// Specific functions:
|
||||
/**
|
||||
* Function GenDrillAndMapFiles
|
||||
* Calls the functions to create EXCELLON drill files and/or drill map files
|
||||
* >When all holes are through holes, only one excellon file is created.
|
||||
* >When there are some partial holes (some blind or buried vias),
|
||||
* one excellon file is created, for all plated through holes,
|
||||
* and one file per layer pair, which have one or more holes, excluding
|
||||
* through holes, already in the first file.
|
||||
* one file for all Not Plated through holes
|
||||
* Call the functions to create EXCELLON drill files and/or drill map files.
|
||||
*
|
||||
* When all holes are through holes, only one excellon file is created. When there are
|
||||
* some partial holes (some blind or buried vias), one excellon file is created, for all
|
||||
* plated through holes, and one file per layer pair, which have one or more holes, excluding
|
||||
* through holes, already in the first file. One file for all Not Plated through holes.
|
||||
*/
|
||||
void GenDrillAndMapFiles( bool aGenDrill, bool aGenMap );
|
||||
|
||||
void UpdatePrecisionOptions();
|
||||
void UpdateConfig();
|
||||
|
||||
public:
|
||||
static int m_UnitDrillIsInch;
|
||||
static int m_ZerosFormat;
|
||||
static bool m_MinimalHeader;
|
||||
static bool m_Mirror;
|
||||
static bool m_Merge_PTH_NPTH;
|
||||
DRILL_PRECISION m_Precision; // Precision for drill files, in non decimal format
|
||||
wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordinates,
|
||||
// or origin of the auxiliary axis
|
||||
static bool m_UseRouteModeForOvalHoles; // True to use a G00 route command for oval holes
|
||||
// False to use a G85 canned mode for oval holes
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_pcbEditFrame;
|
||||
BOARD* m_board;
|
||||
PCB_PLOT_PARAMS m_plotOpts;
|
||||
bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
|
||||
// for drill origin coordinates
|
||||
int m_platedPadsHoleCount;
|
||||
int m_notplatedPadsHoleCount;
|
||||
int m_throughViasCount;
|
||||
int m_microViasCount;
|
||||
int m_blindOrBuriedViasCount;
|
||||
|
||||
static int m_mapFileType; // format of map file: HPGL, PS ...
|
||||
static int m_drillFileType; // for Excellon, Gerber
|
||||
};
|
||||
|
||||
#endif // DIALOG_GENDRILL_H_
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -33,24 +33,24 @@ public:
|
|||
void SetCurrentLayer( LAYER_NUM aLayer );
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_Parent;
|
||||
LAYER_NUM m_currentLayer;
|
||||
|
||||
void onOkClick( wxCommandEvent& event ) override
|
||||
{
|
||||
doGlobalDeletions();
|
||||
EndModal(wxID_OK);
|
||||
EndModal( wxID_OK );
|
||||
}
|
||||
|
||||
void onCancelClick( wxCommandEvent& event ) override
|
||||
{
|
||||
EndModal(wxID_CANCEL);
|
||||
EndModal( wxID_CANCEL );
|
||||
}
|
||||
|
||||
void doGlobalDeletions();
|
||||
void onCheckDeleteTracks( wxCommandEvent& event ) override;
|
||||
void onCheckDeleteFootprints( wxCommandEvent& event ) override;
|
||||
void onCheckDeleteDrawings( wxCommandEvent& event ) override;
|
||||
|
||||
PCB_EDIT_FRAME* m_Parent;
|
||||
LAYER_NUM m_currentLayer;
|
||||
};
|
||||
|
||||
#endif // _DIALOG_GLOBAL_DELETION_H_
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -33,11 +33,6 @@ class PCB_GROUP;
|
|||
|
||||
class DIALOG_GROUP_PROPERTIES : public DIALOG_GROUP_PROPERTIES_BASE
|
||||
{
|
||||
private:
|
||||
PCB_BASE_EDIT_FRAME* m_brdEditor;
|
||||
TOOL_MANAGER* m_toolMgr;
|
||||
PCB_GROUP* m_group;
|
||||
|
||||
public:
|
||||
DIALOG_GROUP_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, PCB_GROUP* aTarget );
|
||||
~DIALOG_GROUP_PROPERTIES();
|
||||
|
@ -51,6 +46,10 @@ public:
|
|||
private:
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
PCB_BASE_EDIT_FRAME* m_brdEditor;
|
||||
TOOL_MANAGER* m_toolMgr;
|
||||
PCB_GROUP* m_group;
|
||||
};
|
||||
|
||||
#endif // DIALOG_GROUP_PROPERTIES_H
|
||||
#endif // DIALOG_GROUP_PROPERTIES_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -33,17 +33,6 @@ class PCB_EDIT_FRAME;
|
|||
|
||||
class DIALOG_IMPORT_SETTINGS : public DIALOG_IMPORT_SETTINGS_BASE
|
||||
{
|
||||
protected:
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
static wxString m_filePath;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Stores state used to toggle button between "Select All" and "Deselect All"
|
||||
*/
|
||||
bool m_showSelectAllOnBtn;
|
||||
|
||||
public:
|
||||
DIALOG_IMPORT_SETTINGS( wxWindow* aParent, PCB_EDIT_FRAME* aFrame );
|
||||
|
||||
|
@ -55,13 +44,13 @@ public:
|
|||
bool TransferDataFromWindow() override;
|
||||
|
||||
/**
|
||||
* Enables/Disables "Import Settings" button
|
||||
* Enable or disable the "Import Settings" button.
|
||||
*
|
||||
* This dialog defaults to all import selections cleared, and the "Import
|
||||
* Settings" button disabled. The user must check at least one of the import
|
||||
* selection checkboxes for the "Import Settings" button to be enabled.
|
||||
*
|
||||
* @return bool - "Import Settings" button enable state
|
||||
* @return the "Import Settings" button enable state.
|
||||
*/
|
||||
bool UpdateImportSettingsButton();
|
||||
|
||||
|
@ -71,6 +60,16 @@ public:
|
|||
void UpdateSelectAllButton();
|
||||
|
||||
wxString GetFilePath() { return m_filePath; }
|
||||
|
||||
protected:
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
static wxString m_filePath;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Store state used to toggle button between "Select All" and "Deselect All"
|
||||
*/
|
||||
bool m_showSelectAllOnBtn;
|
||||
};
|
||||
|
||||
#endif //KICAD_DIALOG_IMPORT_SETTINGS_H
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -27,14 +27,26 @@
|
|||
|
||||
class DIALOG_IMPORTED_LAYERS : public DIALOG_IMPORTED_LAYERS_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_IMPORTED_LAYERS( wxWindow* aParent, const std::vector<INPUT_LAYER_DESC>& aLayerDesc );
|
||||
|
||||
/**
|
||||
* Return a list of layers names that are required, but they are not mapped.
|
||||
*/
|
||||
std::vector<wxString> GetUnmappedRequiredLayers() const;
|
||||
|
||||
/**
|
||||
* Create and show a dialog (modal) and returns the data from it after completion. If the
|
||||
* dialog is closed or cancel is pressed, returns an empty map.
|
||||
*
|
||||
* @param aParent Parent window for the invoked dialog.
|
||||
* @param aLayerDesc
|
||||
* @return Mapped layers
|
||||
*/
|
||||
static std::map<wxString, PCB_LAYER_ID> GetMapModal( wxWindow* aParent,
|
||||
const std::vector<INPUT_LAYER_DESC>& aLayerDesc );
|
||||
|
||||
private:
|
||||
const int selected = wxLIST_STATE_SELECTED;
|
||||
const int allitems = wxLIST_STATE_DONTCARE;
|
||||
|
||||
std::vector<INPUT_LAYER_DESC> m_input_layers;
|
||||
std::vector<wxString> m_unmatched_layer_names;
|
||||
std::map<wxString, PCB_LAYER_ID> m_matched_layers_map;
|
||||
|
||||
//Helper functions
|
||||
PCB_LAYER_ID GetSelectedLayerID();
|
||||
PCB_LAYER_ID GetAutoMatchLayerID( wxString aInputLayerName );
|
||||
|
@ -57,24 +69,12 @@ private:
|
|||
void OnRemoveClicked( wxCommandEvent& event ) override { RemoveMappings( selected ); }
|
||||
void OnRemoveAllClicked( wxCommandEvent& event ) override { RemoveMappings( allitems ); }
|
||||
|
||||
public:
|
||||
DIALOG_IMPORTED_LAYERS( wxWindow* aParent, const std::vector<INPUT_LAYER_DESC>& aLayerDesc );
|
||||
const int selected = wxLIST_STATE_SELECTED;
|
||||
const int allitems = wxLIST_STATE_DONTCARE;
|
||||
|
||||
/**
|
||||
* @brief Return a list of layers names that are required, but they are not mapped
|
||||
*/
|
||||
std::vector<wxString> GetUnmappedRequiredLayers() const;
|
||||
|
||||
/**
|
||||
* @brief Creates and shows a dialog (modal) and returns the data from it
|
||||
* after completion. If the dialog is closed or cancel is pressed, returns
|
||||
* an empty map
|
||||
* @param aParent Parent window for the invoked dialog.
|
||||
* @param aLayerDesc
|
||||
* @return Mapped layers
|
||||
*/
|
||||
static std::map<wxString, PCB_LAYER_ID> GetMapModal( wxWindow* aParent,
|
||||
const std::vector<INPUT_LAYER_DESC>& aLayerDesc );
|
||||
std::vector<INPUT_LAYER_DESC> m_input_layers;
|
||||
std::vector<wxString> m_unmatched_layer_names;
|
||||
std::map<wxString, PCB_LAYER_ID> m_matched_layers_map;
|
||||
};
|
||||
|
||||
#endif // DIALOG_IMPORTED_LAYERS_H
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 John Beard, john.j.beard@gmail.com
|
||||
* Copyright (C) 2018-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -45,34 +45,15 @@ enum ROTATION_ANCHOR
|
|||
|
||||
class DIALOG_MOVE_EXACT : public DIALOG_MOVE_EXACT_BASE
|
||||
{
|
||||
private:
|
||||
wxPoint& m_translation;
|
||||
double& m_rotation;
|
||||
ROTATION_ANCHOR& m_rotationAnchor;
|
||||
const EDA_RECT& m_bbox;
|
||||
|
||||
UNIT_BINDER m_moveX;
|
||||
UNIT_BINDER m_moveY;
|
||||
UNIT_BINDER m_rotate;
|
||||
|
||||
std::vector<ROTATION_ANCHOR> m_menuIDs;
|
||||
|
||||
double m_stateX;
|
||||
double m_stateY;
|
||||
double m_stateRadius;
|
||||
double m_stateTheta;
|
||||
|
||||
|
||||
public:
|
||||
// Constructor and destructor
|
||||
DIALOG_MOVE_EXACT( PCB_BASE_FRAME *aParent, wxPoint& aTranslate, double& aRotate,
|
||||
DIALOG_MOVE_EXACT( PCB_BASE_FRAME* aParent, wxPoint& aTranslate, double& aRotate,
|
||||
ROTATION_ANCHOR& aAnchor, const EDA_RECT& aBbox );
|
||||
~DIALOG_MOVE_EXACT() { };
|
||||
|
||||
private:
|
||||
|
||||
/*!
|
||||
* Reset a text field to be 0 if it was exited while blank
|
||||
/**
|
||||
* Reset a text field to be 0 if it was exited while blank.
|
||||
*/
|
||||
void OnTextFocusLost( wxFocusEvent& event ) override;
|
||||
|
||||
|
@ -92,10 +73,11 @@ private:
|
|||
void ToPolarDeg( double x, double y, double& r, double& q );
|
||||
|
||||
/**
|
||||
* Get the (Cartesian) translation described by the text entries
|
||||
* @param val output translation vector
|
||||
* @param polar interpret as polar coords
|
||||
* @return false if error (though the text conversion functions don't report errors)
|
||||
* Get the (Cartesian) translation described by the text entries.
|
||||
*
|
||||
* @param val is the output translation vector.
|
||||
* @param polar set to true to interpret as polar coordinates.
|
||||
* @return false if error (though the text conversion functions don't report errors).
|
||||
*/
|
||||
bool GetTranslationInIU( wxRealPoint& val, bool polar );
|
||||
|
||||
|
@ -127,7 +109,23 @@ private:
|
|||
|
||||
// persistent settings
|
||||
static MOVE_EXACT_OPTIONS m_options;
|
||||
|
||||
private:
|
||||
wxPoint& m_translation;
|
||||
double& m_rotation;
|
||||
ROTATION_ANCHOR& m_rotationAnchor;
|
||||
const EDA_RECT& m_bbox;
|
||||
|
||||
UNIT_BINDER m_moveX;
|
||||
UNIT_BINDER m_moveY;
|
||||
UNIT_BINDER m_rotate;
|
||||
|
||||
std::vector<ROTATION_ANCHOR> m_menuIDs;
|
||||
|
||||
double m_stateX;
|
||||
double m_stateY;
|
||||
double m_stateRadius;
|
||||
double m_stateTheta;
|
||||
};
|
||||
|
||||
#endif // __DIALOG_MOVE_EXACT__
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,16 +37,6 @@ class NETLIST;
|
|||
|
||||
class DIALOG_NETLIST : public DIALOG_NETLIST_BASE
|
||||
{
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
wxString& m_netlistPath;
|
||||
bool m_initialized;
|
||||
bool m_runDragCommand;
|
||||
static bool m_warnForNoNetPads;
|
||||
static bool m_matchByUUID; // True to use UUID as link between symbol and footprint
|
||||
// False to use reference designator as link
|
||||
// between symbol and footprint
|
||||
|
||||
public:
|
||||
DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullFilename );
|
||||
~DIALOG_NETLIST();
|
||||
|
@ -56,14 +46,22 @@ private:
|
|||
|
||||
void loadNetlist( bool aDryRun );
|
||||
|
||||
|
||||
|
||||
// Virtual event handlers:
|
||||
void OnOpenNetlistClick( wxCommandEvent& event ) override;
|
||||
void OnUpdatePCB( wxCommandEvent& event ) override;
|
||||
void OnFilenameKillFocus( wxFocusEvent& event ) override;
|
||||
void OnMatchChanged( wxCommandEvent& event ) override;
|
||||
void OnOptionChanged( wxCommandEvent& event ) override;
|
||||
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
wxString& m_netlistPath;
|
||||
bool m_initialized;
|
||||
bool m_runDragCommand;
|
||||
static bool m_warnForNoNetPads;
|
||||
static bool m_matchByUUID; // True to use UUID as link between symbol and footprint
|
||||
// False to use reference designator as link
|
||||
// between symbol and footprint
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013 Dick Hollenbeck, dick@softplc.com
|
||||
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -53,43 +53,6 @@ public:
|
|||
DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad );
|
||||
~DIALOG_PAD_PROPERTIES();
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
PAD* m_currentPad; // pad currently being edited
|
||||
PAD* m_dummyPad; // a working copy used to show changes
|
||||
PAD* m_padMaster; // pad used to create new pads in board or footprint editor
|
||||
BOARD* m_board; // the main board: this is the board handled by the PCB
|
||||
// editor or the dummy board used by the footprint editor
|
||||
bool m_isFlipped; // indicates the parent footprint is flipped (mirrored) in
|
||||
// which case some Y coordinates values must be negated
|
||||
bool m_canUpdate;
|
||||
bool m_canEditNetName; // true only if the caller is the board editor
|
||||
bool m_isFpEditor; // true if the caller is the footprint editor
|
||||
|
||||
std::vector<std::shared_ptr<PCB_SHAPE>> m_primitives; // the custom shape primitives in
|
||||
// local coords, orient 0
|
||||
// must define a single copper area
|
||||
COLOR4D m_selectedColor; // color used to draw selected primitives when
|
||||
// editing a custom pad shape
|
||||
|
||||
std::vector<PCB_SHAPE*> m_highlight; // shapes highlighted in GAL mode
|
||||
PCB_DRAW_PANEL_GAL* m_padPreviewGAL;
|
||||
KIGFX::ORIGIN_VIEWITEM* m_axisOrigin; // origin of the preview canvas
|
||||
static bool m_sketchPreview; // session storage
|
||||
|
||||
UNIT_BINDER m_posX, m_posY;
|
||||
UNIT_BINDER m_sizeX, m_sizeY;
|
||||
UNIT_BINDER m_offsetX, m_offsetY;
|
||||
UNIT_BINDER m_padToDie;
|
||||
UNIT_BINDER m_trapDelta;
|
||||
UNIT_BINDER m_cornerRadius;
|
||||
UNIT_BINDER m_holeX, m_holeY;
|
||||
wxFloatingPointValidator<double> m_OrientValidator;
|
||||
double m_OrientValue;
|
||||
UNIT_BINDER m_clearance;
|
||||
UNIT_BINDER m_maskClearance, m_pasteClearance;
|
||||
UNIT_BINDER m_spokeWidth, m_thermalGap;
|
||||
|
||||
private:
|
||||
void prepareCanvas(); // Initialize the canvases (legacy or gal) to display the pad
|
||||
void initValues();
|
||||
|
@ -101,9 +64,8 @@ private:
|
|||
void enablePrimitivePage( bool aEnable ); ///< enable (or disable) the primitive page editor
|
||||
|
||||
/**
|
||||
* Function updatePadLayersList
|
||||
* updates the CheckBox states in pad layers list, based on the layer_mask (if non-empty)
|
||||
* or the default layers for the current pad type
|
||||
* Updates the CheckBox states in pad layers list, based on the layer_mask (if non-empty)
|
||||
* or the default layers for the current pad type.
|
||||
*/
|
||||
void updatePadLayersList( LSET layer_mask, bool remove_unconnected, bool keep_top_bottom );
|
||||
|
||||
|
@ -165,11 +127,49 @@ private:
|
|||
|
||||
/// Return the pad property currently selected
|
||||
PAD_PROP getSelectedProperty();
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
PAD* m_currentPad; // pad currently being edited
|
||||
PAD* m_dummyPad; // a working copy used to show changes
|
||||
PAD* m_padMaster; // pad used to create new pads in board or footprint editor
|
||||
BOARD* m_board; // the main board: this is the board handled by the PCB
|
||||
// editor or the dummy board used by the footprint editor
|
||||
bool m_isFlipped; // indicates the parent footprint is flipped (mirrored) in
|
||||
// which case some Y coordinates values must be negated
|
||||
bool m_canUpdate;
|
||||
bool m_canEditNetName; // true only if the caller is the board editor
|
||||
bool m_isFpEditor; // true if the caller is the footprint editor
|
||||
|
||||
std::vector<std::shared_ptr<PCB_SHAPE>> m_primitives; // the custom shape primitives in
|
||||
// local coords, orient 0
|
||||
// must define a single copper area
|
||||
COLOR4D m_selectedColor; // color used to draw selected primitives when
|
||||
// editing a custom pad shape
|
||||
|
||||
std::vector<PCB_SHAPE*> m_highlight; // shapes highlighted in GAL mode
|
||||
PCB_DRAW_PANEL_GAL* m_padPreviewGAL;
|
||||
KIGFX::ORIGIN_VIEWITEM* m_axisOrigin; // origin of the preview canvas
|
||||
static bool m_sketchPreview; // session storage
|
||||
|
||||
UNIT_BINDER m_posX, m_posY;
|
||||
UNIT_BINDER m_sizeX, m_sizeY;
|
||||
UNIT_BINDER m_offsetX, m_offsetY;
|
||||
UNIT_BINDER m_padToDie;
|
||||
UNIT_BINDER m_trapDelta;
|
||||
UNIT_BINDER m_cornerRadius;
|
||||
UNIT_BINDER m_holeX, m_holeY;
|
||||
wxFloatingPointValidator<double> m_OrientValidator;
|
||||
double m_OrientValue;
|
||||
UNIT_BINDER m_clearance;
|
||||
UNIT_BINDER m_maskClearance, m_pasteClearance;
|
||||
UNIT_BINDER m_spokeWidth, m_thermalGap;
|
||||
};
|
||||
|
||||
/**
|
||||
* a dialog to edit basics shapes parameters.
|
||||
* Polygonal shape is not handles by this dialog
|
||||
* A dialog to edit basic shape parameters.
|
||||
*
|
||||
* Polygonal shape is not handled by this dialog.
|
||||
*/
|
||||
class DIALOG_PAD_PRIMITIVES_PROPERTIES: public DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE
|
||||
{
|
||||
|
@ -178,7 +178,6 @@ public:
|
|||
PCB_SHAPE* aShape );
|
||||
|
||||
/**
|
||||
* Function TransferDataFromWindow
|
||||
* Transfer data out of the GUI.
|
||||
*/
|
||||
bool TransferDataFromWindow() override;
|
||||
|
@ -207,38 +206,28 @@ private:
|
|||
|
||||
|
||||
/**
|
||||
* a dialog to edit basic polygonal shape parameters
|
||||
* A dialog to edit basic polygonal shape parameters.
|
||||
*/
|
||||
class DIALOG_PAD_PRIMITIVE_POLY_PROPS: public DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE
|
||||
{
|
||||
// The basic shape currently edited
|
||||
PCB_SHAPE* m_shape;
|
||||
|
||||
// The working copy of the basic shape currently edited
|
||||
std::vector<wxPoint> m_currPoints;
|
||||
|
||||
UNIT_BINDER m_thickness;
|
||||
|
||||
public:
|
||||
DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aParent, PCB_BASE_FRAME* aFrame,
|
||||
PCB_SHAPE* aShape );
|
||||
~DIALOG_PAD_PRIMITIVE_POLY_PROPS();
|
||||
|
||||
/**
|
||||
* Function TransferDataFromWindow
|
||||
* Transfer data out of the GUI.
|
||||
*/
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Function TransferDataToWindow
|
||||
* Transfer data into the GUI.
|
||||
*/
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
/**
|
||||
* test for a valid polygon (a not self intersectiong polygon)
|
||||
* Test for a valid polygon (a not self intersectiong polygon).
|
||||
*/
|
||||
bool Validate() override;
|
||||
|
||||
|
@ -256,14 +245,21 @@ private:
|
|||
|
||||
bool doValidate( bool aRemoveRedundantCorners );
|
||||
|
||||
// The basic shape currently edited
|
||||
PCB_SHAPE* m_shape;
|
||||
|
||||
// The working copy of the basic shape currently edited
|
||||
std::vector<wxPoint> m_currPoints;
|
||||
|
||||
UNIT_BINDER m_thickness;
|
||||
};
|
||||
|
||||
|
||||
/** A dialog to apply geometry transforms to a shape or set of shapes
|
||||
* (move, rotate around origin, scaling factor, duplication).
|
||||
* shapes are scaled, then moved then rotated.
|
||||
* aList is a list of shapes to transform or duplicate
|
||||
* if aShowDuplicate == false, the parameter "Duplicate count" is disabled
|
||||
/**
|
||||
* A dialog to apply geometry transforms to a shape or set of shapes (move, rotate around
|
||||
* origin, scaling factor, duplication).
|
||||
*
|
||||
* Shapes are scaled then moved then rotated.
|
||||
*/
|
||||
|
||||
class DIALOG_PAD_PRIMITIVES_TRANSFORM : public DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE
|
||||
|
@ -284,7 +280,7 @@ public:
|
|||
int aDuplicateCount = 0 );
|
||||
|
||||
/**
|
||||
* @return the number of duplicate, chosen by user
|
||||
* @return the number of duplicate, chosen by user.
|
||||
*/
|
||||
int GetDuplicateCount() { return m_spinCtrlDuplicateCount->GetValue(); }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -34,8 +34,7 @@
|
|||
#define DLG_WINDOW_NAME "plot_dialog-window"
|
||||
|
||||
/**
|
||||
* DIALOG_PLOT is the dialog to set the plot options, and create plot files
|
||||
* in various formats.
|
||||
* A dialog to set the plot options and create plot files in various formats.
|
||||
*/
|
||||
class DIALOG_PLOT : public DIALOG_PLOT_BASE
|
||||
{
|
||||
|
@ -43,26 +42,6 @@ public:
|
|||
DIALOG_PLOT( PCB_EDIT_FRAME* parent );
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
LSEQ m_layerList; // List to hold CheckListBox layer numbers
|
||||
double m_XScaleAdjust; // X scale factor adjust to compensate
|
||||
// plotter X scaling error
|
||||
double m_YScaleAdjust; // X scale factor adjust to compensate
|
||||
// plotter Y scaling error
|
||||
int m_PSWidthAdjust; // Global width correction for exact line width
|
||||
// in postscript output.
|
||||
// this is a correction factor for tracks width
|
||||
// when plotted
|
||||
int m_widthAdjustMinValue; // Global track width limits
|
||||
int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
|
||||
// m_PSWidthAdjust to these limits.
|
||||
UNIT_BINDER m_defaultPenSize;
|
||||
UNIT_BINDER m_trackWidthCorrection;
|
||||
|
||||
wxString m_DRCWarningTemplate;
|
||||
|
||||
PCB_PLOT_PARAMS m_plotOpts;
|
||||
|
||||
// Event called functions
|
||||
void Plot( wxCommandEvent& event ) override;
|
||||
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
|
||||
|
@ -86,4 +65,24 @@ private:
|
|||
{
|
||||
m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
|
||||
}
|
||||
|
||||
PCB_EDIT_FRAME* m_parent;
|
||||
LSEQ m_layerList; // List to hold CheckListBox layer numbers
|
||||
double m_XScaleAdjust; // X scale factor adjust to compensate
|
||||
// plotter X scaling error
|
||||
double m_YScaleAdjust; // X scale factor adjust to compensate
|
||||
// plotter Y scaling error
|
||||
int m_PSWidthAdjust; // Global width correction for exact line width
|
||||
// in postscript output.
|
||||
// this is a correction factor for tracks width
|
||||
// when plotted
|
||||
int m_widthAdjustMinValue; // Global track width limits
|
||||
int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
|
||||
// m_PSWidthAdjust to these limits.
|
||||
UNIT_BINDER m_defaultPenSize;
|
||||
UNIT_BINDER m_trackWidthCorrection;
|
||||
|
||||
wxString m_DRCWarningTemplate;
|
||||
|
||||
PCB_PLOT_PARAMS m_plotOpts;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -34,21 +34,6 @@
|
|||
|
||||
class DIALOG_POSITION_RELATIVE : public DIALOG_POSITION_RELATIVE_BASE
|
||||
{
|
||||
private:
|
||||
|
||||
TOOL_MANAGER* m_toolMgr;
|
||||
wxPoint& m_translation;
|
||||
wxPoint& m_anchor_position;
|
||||
|
||||
UNIT_BINDER m_xOffset;
|
||||
UNIT_BINDER m_yOffset;
|
||||
|
||||
double m_stateX;
|
||||
double m_stateY;
|
||||
double m_stateRadius;
|
||||
double m_stateTheta;
|
||||
|
||||
|
||||
public:
|
||||
// Constructor and destructor
|
||||
DIALOG_POSITION_RELATIVE( PCB_BASE_FRAME* aParent, wxPoint& translation, wxPoint& anchor );
|
||||
|
@ -57,9 +42,8 @@ public:
|
|||
void UpdateAnchor( EDA_ITEM* aItem );
|
||||
|
||||
private:
|
||||
|
||||
/*!
|
||||
* Reset a text field to be 0 if it was exited while blank
|
||||
/**
|
||||
* Reset a text field to be 0 if it was exited while blank.
|
||||
*/
|
||||
void OnTextFocusLost( wxFocusEvent& event ) override;
|
||||
|
||||
|
@ -80,10 +64,11 @@ private:
|
|||
void ToPolarDeg( double x, double y, double& r, double& q );
|
||||
|
||||
/**
|
||||
* Get the (Cartesian) translation described by the text entries
|
||||
* @param val output translation vector
|
||||
* @param polar interpret as polar coords
|
||||
* @return false if error (though the text conversion functions don't report errors)
|
||||
* Get the (Cartesian) translation described by the text entries.
|
||||
*
|
||||
* @param val is the output translation vector.
|
||||
* @param set to true to interpret as polar coordinates.
|
||||
* @return false if error (though the text conversion functions don't report errors).
|
||||
*/
|
||||
bool GetTranslationInIU( wxRealPoint& val, bool polar );
|
||||
|
||||
|
@ -91,7 +76,7 @@ private:
|
|||
void updateDialogControls( bool aPolar );
|
||||
|
||||
/**
|
||||
* Persistent dialog options
|
||||
* Persistent dialog options.
|
||||
*/
|
||||
struct POSITION_RELATIVE_OPTIONS
|
||||
{
|
||||
|
@ -109,6 +94,18 @@ private:
|
|||
|
||||
// persistent settings
|
||||
static POSITION_RELATIVE_OPTIONS m_options;
|
||||
|
||||
TOOL_MANAGER* m_toolMgr;
|
||||
wxPoint& m_translation;
|
||||
wxPoint& m_anchor_position;
|
||||
|
||||
UNIT_BINDER m_xOffset;
|
||||
UNIT_BINDER m_yOffset;
|
||||
|
||||
double m_stateX;
|
||||
double m_stateY;
|
||||
double m_stateRadius;
|
||||
double m_stateTheta;
|
||||
};
|
||||
|
||||
#endif // __DIALOG_POSITION_RELATIVE__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -28,14 +28,15 @@
|
|||
|
||||
class PAD;
|
||||
class PCB_BASE_FRAME;
|
||||
/************************************/
|
||||
/* class DIALOG_PUSH_PAD_PROPERTIES */
|
||||
/************************************/
|
||||
|
||||
|
||||
class DIALOG_PUSH_PAD_PROPERTIES : public DIALOG_PUSH_PAD_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_PUSH_PAD_PROPERTIES( PCB_BASE_FRAME* aParent );
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
void PadPropertiesAccept( wxCommandEvent& event ) override;
|
||||
|
||||
public:
|
||||
static bool m_Pad_Shape_Filter;
|
||||
|
@ -43,11 +44,8 @@ public:
|
|||
static bool m_Pad_Orient_Filter;
|
||||
static bool m_Pad_Type_Filter;
|
||||
|
||||
public:
|
||||
DIALOG_PUSH_PAD_PROPERTIES( PCB_BASE_FRAME* aParent );
|
||||
|
||||
private:
|
||||
void PadPropertiesAccept( wxCommandEvent& event ) override;
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -32,12 +32,6 @@ class LAYER_GRID_TABLE;
|
|||
|
||||
class DIALOG_SWAP_LAYERS : public DIALOG_SWAP_LAYERS_BASE
|
||||
{
|
||||
private:
|
||||
PCB_BASE_EDIT_FRAME* m_parent;
|
||||
PCB_LAYER_ID* m_layerDestinations;
|
||||
|
||||
LAYER_GRID_TABLE* m_gridTable;
|
||||
|
||||
public:
|
||||
DIALOG_SWAP_LAYERS( PCB_BASE_EDIT_FRAME* aParent, PCB_LAYER_ID* aArray );
|
||||
~DIALOG_SWAP_LAYERS() override;
|
||||
|
@ -49,6 +43,11 @@ private:
|
|||
void OnSize( wxSizeEvent& event ) override;
|
||||
|
||||
void adjustGridColumns( int aWidth );
|
||||
|
||||
PCB_BASE_EDIT_FRAME* m_parent;
|
||||
PCB_LAYER_ID* m_layerDestinations;
|
||||
|
||||
LAYER_GRID_TABLE* m_gridTable;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -31,13 +31,6 @@ class PCB_EDIT_FRAME;
|
|||
|
||||
class DIALOG_UPDATE_PCB : public DIALOG_UPDATE_PCB_BASE
|
||||
{
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
NETLIST* m_netlist;
|
||||
bool m_initialized;
|
||||
bool m_runDragCommand;
|
||||
static bool m_warnForNoNetPads;
|
||||
|
||||
public:
|
||||
DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST *aNetlist );
|
||||
~DIALOG_UPDATE_PCB();
|
||||
|
@ -45,10 +38,14 @@ public:
|
|||
void PerformUpdate( bool aDryRun );
|
||||
|
||||
private:
|
||||
|
||||
void OnOptionChanged( wxCommandEvent& event ) override;
|
||||
void OnUpdateClick( wxCommandEvent& event ) override;
|
||||
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
NETLIST* m_netlist;
|
||||
bool m_initialized;
|
||||
bool m_runDragCommand;
|
||||
static bool m_warnForNoNetPads;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -29,11 +29,6 @@ class FOOTPRINT_EDIT_FRAME;
|
|||
|
||||
class PANEL_FP_EDITOR_DEFAULTS : public PANEL_FP_EDITOR_DEFAULTS_BASE
|
||||
{
|
||||
BOARD_DESIGN_SETTINGS m_brdSettings;
|
||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||
PAGED_DIALOG* m_parent;
|
||||
bool m_firstShow = true;
|
||||
|
||||
public:
|
||||
PANEL_FP_EDITOR_DEFAULTS( FOOTPRINT_EDIT_FRAME* aFrame, PAGED_DIALOG* aParent );
|
||||
~PANEL_FP_EDITOR_DEFAULTS() override;
|
||||
|
@ -50,6 +45,11 @@ private:
|
|||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
BOARD_DESIGN_SETTINGS m_brdSettings;
|
||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||
PAGED_DIALOG* m_parent;
|
||||
bool m_firstShow = true;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -64,11 +64,6 @@ private:
|
|||
/// by examining all the full_uri columns.
|
||||
void populateEnvironReadOnlyTable();
|
||||
|
||||
// caller's tables are modified only on OK button and successful verification.
|
||||
FP_LIB_TABLE* m_global;
|
||||
FP_LIB_TABLE* m_project;
|
||||
wxString m_projectBasePath;
|
||||
|
||||
FP_LIB_TABLE_GRID* global_model() const
|
||||
{
|
||||
return (FP_LIB_TABLE_GRID*) m_global_grid->GetTable();
|
||||
|
@ -84,12 +79,18 @@ private:
|
|||
return (FP_LIB_TABLE_GRID*) m_cur_grid->GetTable();
|
||||
}
|
||||
|
||||
// caller's tables are modified only on OK button and successful verification.
|
||||
FP_LIB_TABLE* m_global;
|
||||
FP_LIB_TABLE* m_project;
|
||||
wxString m_projectBasePath;
|
||||
|
||||
DIALOG_EDIT_LIBRARY_TABLES* m_parent;
|
||||
|
||||
WX_GRID* m_cur_grid; // changed based on tab choice
|
||||
static size_t m_pageNdx; // Remember last notebook page selected during a session
|
||||
|
||||
wxString m_lastProjectLibDir; //< Transient (unsaved) last browsed folder when adding a project level library
|
||||
//< Transient (unsaved) last browsed folder when adding a project level library.
|
||||
wxString m_lastProjectLibDir;
|
||||
};
|
||||
|
||||
#endif // PANEL_FP_LIB_TABLE_H
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -58,19 +58,18 @@ protected:
|
|||
ID_REVERT
|
||||
};
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
|
||||
FOOTPRINT_PREVIEW_PANEL* m_preview;
|
||||
PAGE_INFO* m_page;
|
||||
TITLE_BLOCK* m_titleBlock;
|
||||
|
||||
private:
|
||||
void createPreviewItems();
|
||||
void createSwatches();
|
||||
|
||||
void updatePreview();
|
||||
void zoomFitPreview();
|
||||
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
|
||||
FOOTPRINT_PREVIEW_PANEL* m_preview;
|
||||
PAGE_INFO* m_page;
|
||||
TITLE_BLOCK* m_titleBlock;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -32,15 +32,15 @@ class PAGED_DIALOG;
|
|||
|
||||
class PANEL_PCBNEW_DISPLAY_ORIGIN : public PANEL_PCBNEW_DISPLAY_ORIGIN_BASE
|
||||
{
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
|
||||
public:
|
||||
PANEL_PCBNEW_DISPLAY_ORIGIN( PCB_EDIT_FRAME* aFrame, PAGED_DIALOG* aWindow );
|
||||
|
||||
protected:
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,9 +37,18 @@ class wxCommandEvent;
|
|||
|
||||
class PANEL_SETUP_CONSTRAINTS : public PANEL_SETUP_CONSTRAINTS_BASE
|
||||
{
|
||||
public:
|
||||
PANEL_SETUP_CONSTRAINTS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame );
|
||||
~PANEL_SETUP_CONSTRAINTS( ) override { };
|
||||
|
||||
void ImportSettingsFrom( BOARD* aBoard );
|
||||
|
||||
private:
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
bool Show( bool aShow ) override;
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
void onChangeOutlineOpt( wxCommandEvent& event ) override;
|
||||
|
||||
public:
|
||||
UNIT_BINDER m_minClearance;
|
||||
|
@ -55,18 +64,9 @@ public:
|
|||
UNIT_BINDER m_silkClearance;
|
||||
UNIT_BINDER m_maxError;
|
||||
|
||||
public:
|
||||
PANEL_SETUP_CONSTRAINTS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame );
|
||||
~PANEL_SETUP_CONSTRAINTS( ) override { };
|
||||
|
||||
void ImportSettingsFrom( BOARD* aBoard );
|
||||
|
||||
private:
|
||||
bool Show( bool aShow ) override;
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
void onChangeOutlineOpt( wxCommandEvent& event ) override;
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
};
|
||||
|
||||
#endif //PANEL_SETUP_CONSTRAINTS_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,17 +37,6 @@ class HTML_MESSAGE_BOX;
|
|||
|
||||
class PANEL_SETUP_RULES : public PANEL_SETUP_RULES_BASE
|
||||
{
|
||||
private:
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
SCINTILLA_TRICKS* m_scintillaTricks;
|
||||
wxString m_originalText;
|
||||
|
||||
wxRegEx m_netClassRegex;
|
||||
wxRegEx m_netNameRegex;
|
||||
|
||||
HTML_MESSAGE_BOX* m_helpWindow;
|
||||
|
||||
public:
|
||||
PANEL_SETUP_RULES( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame );
|
||||
~PANEL_SETUP_RULES( ) override;
|
||||
|
@ -62,6 +51,16 @@ private:
|
|||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
SCINTILLA_TRICKS* m_scintillaTricks;
|
||||
wxString m_originalText;
|
||||
|
||||
wxRegEx m_netClassRegex;
|
||||
wxRegEx m_netNameRegex;
|
||||
|
||||
HTML_MESSAGE_BOX* m_helpWindow;
|
||||
};
|
||||
|
||||
#endif //PANEL_SETUP_RULES_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,16 +37,6 @@ class BOARD_DESIGN_SETTINGS;
|
|||
|
||||
class PANEL_SETUP_TEXT_AND_GRAPHICS : public PANEL_SETUP_TEXT_AND_GRAPHICS_BASE
|
||||
{
|
||||
private:
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
UNIT_BINDER m_arrowLength;
|
||||
UNIT_BINDER m_extensionOffset;
|
||||
|
||||
private:
|
||||
int getGridValue( int aRow, int aCol );
|
||||
|
||||
public:
|
||||
PANEL_SETUP_TEXT_AND_GRAPHICS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame );
|
||||
~PANEL_SETUP_TEXT_AND_GRAPHICS( ) override;
|
||||
|
@ -55,6 +45,15 @@ public:
|
|||
bool TransferDataFromWindow() override;
|
||||
|
||||
void ImportSettingsFrom( BOARD* aBoard );
|
||||
|
||||
private:
|
||||
int getGridValue( int aRow, int aCol );
|
||||
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
UNIT_BINDER m_arrowLength;
|
||||
UNIT_BINDER m_extensionOffset;
|
||||
};
|
||||
|
||||
#endif //PANEL_SETUP_TEXT_AND_GRAPHICS_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -38,15 +38,17 @@ class BOARD_DESIGN_SETTINGS;
|
|||
|
||||
class PANEL_SETUP_TRACKS_AND_VIAS : public PANEL_SETUP_TRACKS_AND_VIAS_BASE
|
||||
{
|
||||
private:
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD* m_Pcb;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
public:
|
||||
PANEL_SETUP_TRACKS_AND_VIAS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame,
|
||||
PANEL_SETUP_CONSTRAINTS* aConstraintsPanel );
|
||||
~PANEL_SETUP_TRACKS_AND_VIAS() override;
|
||||
|
||||
// We must validate against the current m_BrdSettings as they may have been
|
||||
// changed but not yet committed. Fetch them from the constraints panel.
|
||||
PANEL_SETUP_CONSTRAINTS* m_ConstraintsPanel;
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
bool Validate() override;
|
||||
|
||||
void ImportSettingsFrom( BOARD* aBoard );
|
||||
|
||||
protected:
|
||||
void OnAddTrackWidthsClick( wxCommandEvent& event ) override;
|
||||
|
@ -60,17 +62,15 @@ protected:
|
|||
void AppendViaSize( const int aSize, const int aDrill );
|
||||
void AppendDiffPairs( const int aWidth, const int aGap, const int aViaGap );
|
||||
|
||||
public:
|
||||
PANEL_SETUP_TRACKS_AND_VIAS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame,
|
||||
PANEL_SETUP_CONSTRAINTS* aConstraintsPanel );
|
||||
~PANEL_SETUP_TRACKS_AND_VIAS() override;
|
||||
private:
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_Frame;
|
||||
BOARD* m_Pcb;
|
||||
BOARD_DESIGN_SETTINGS* m_BrdSettings;
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
bool Validate() override;
|
||||
|
||||
void ImportSettingsFrom( BOARD* aBoard );
|
||||
// We must validate against the current m_BrdSettings as they may have been
|
||||
// changed but not yet committed. Fetch them from the constraints panel.
|
||||
PANEL_SETUP_CONSTRAINTS* m_ConstraintsPanel;
|
||||
};
|
||||
|
||||
#endif //PANEL_SETUP_TRACKS_AND_VIAS_H
|
||||
|
|
Loading…
Reference in New Issue