KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BLOCK_DRAG_VALIDATION Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BLOCK_DRAG_VALIDATION()

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.

Member Function Documentation

◆ CaptureBaseline()

void BLOCK_DRAG_VALIDATION::CaptureBaseline ( const std::vector< BOARD_ITEM * > & aCarriedItems)

◆ outlineIsValid()

bool BLOCK_DRAG_VALIDATION::outlineIsValid ( ) const
private

Definition at line 124 of file block_drag_validation.cpp.

References m_board.

Referenced by CaptureBaseline(), and Validate().

◆ Validate()

Member Data Documentation

◆ m_board

BOARD* BLOCK_DRAG_VALIDATION::m_board
private

Definition at line 61 of file block_drag_validation.h.

Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and outlineIsValid().

◆ m_outlineAffected

bool BLOCK_DRAG_VALIDATION::m_outlineAffected
private

Definition at line 63 of file block_drag_validation.h.

Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and Validate().

◆ m_outlineWasValid

bool BLOCK_DRAG_VALIDATION::m_outlineWasValid
private

Definition at line 64 of file block_drag_validation.h.

Referenced by BLOCK_DRAG_VALIDATION(), CaptureBaseline(), and Validate().

◆ m_zones

std::vector<std::pair<ZONE*, bool> > BLOCK_DRAG_VALIDATION::m_zones
private

Definition at line 62 of file block_drag_validation.h.

Referenced by CaptureBaseline(), and Validate().


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