|
KiCad PCB EDA Suite
|
Checks a Block Drag's result at release and says whether it may be kept. More...
#include <block_drag_validation.h>
Public Member Functions | |
| BLOCK_DRAG_VALIDATION (BOARD &aBoard) | |
| void | CaptureBaseline (const std::vector< BOARD_ITEM * > &aCarriedItems) |
| Note whether the zones coming along, and the board outline, were valid to start with. | |
| BLOCK_DRAG_VALIDATION_RESULT | Validate () const |
Private Member Functions | |
| bool | outlineIsValid () const |
Private Attributes | |
| BOARD * | m_board |
| std::vector< std::pair< ZONE *, bool > > | m_zones |
| bool | m_outlineAffected |
| bool | m_outlineWasValid |
Checks a Block Drag's result at release and says whether it may be kept.
Call CaptureBaseline() before anything moves, then Validate() at release. Geometry that was already broken before the drag is noted at capture time, so the user can still edit a board whose outline or zone was damaged beforehand.
Definition at line 48 of file block_drag_validation.h.
| BLOCK_DRAG_VALIDATION::BLOCK_DRAG_VALIDATION | ( | BOARD & | aBoard | ) |
Definition at line 71 of file block_drag_validation.cpp.
References m_board, m_outlineAffected, and m_outlineWasValid.
| void BLOCK_DRAG_VALIDATION::CaptureBaseline | ( | const std::vector< BOARD_ITEM * > & | aCarriedItems | ) |
Note whether the zones coming along, and the board outline, were valid to start with.
Definition at line 79 of file block_drag_validation.cpp.
References Edge_Cuts, m_board, m_outlineAffected, m_outlineWasValid, m_zones, ZONE::Outline(), outlineIsValid(), and PCB_ZONE_T.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 124 of file block_drag_validation.cpp.
References m_board.
Referenced by CaptureBaseline(), and Validate().
| BLOCK_DRAG_VALIDATION_RESULT BLOCK_DRAG_VALIDATION::Validate | ( | ) | const |
Definition at line 109 of file block_drag_validation.cpp.
References INVALID_OUTLINE, INVALID_ZONE, m_outlineAffected, m_outlineWasValid, m_zones, OK, and outlineIsValid().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 61 of file block_drag_validation.h.
Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and outlineIsValid().
|
private |
Definition at line 63 of file block_drag_validation.h.
Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and Validate().
|
private |
Definition at line 64 of file block_drag_validation.h.
Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and Validate().
|
private |
Definition at line 62 of file block_drag_validation.h.
Referenced by CaptureBaseline(), and Validate().