KiCad PCB EDA Suite
|
Namespace TOOL_EVT_UTILS. More...
Functions | |
bool | IsRotateToolEvt (const TOOL_EVENT &aEvt) |
Function isRotateToolEvt() | |
EDA_ANGLE | GetEventRotationAngle (const PCB_BASE_EDIT_FRAME &aFrame, const TOOL_EVENT &aEvent) |
Function getEventRotationAngle() | |
Namespace TOOL_EVT_UTILS.
Utility functions for dealing with various tool events. These are free functions, so they interface with any classes exclusively via the public interfaces, so they don't need to be subsumed into the "helped" classes.
EDA_ANGLE TOOL_EVT_UTILS::GetEventRotationAngle | ( | const PCB_BASE_EDIT_FRAME & | aFrame, |
const TOOL_EVENT & | aEvent | ||
) |
Function getEventRotationAngle()
Helper function to get a rotation angle based on a frame's configured angle and the direction indicated by a rotation action event
aFrame | the PCB edit frame to use to get the base rotation step value from |
aEvent | the tool event - should be a rotation action event and should have a rotation multiplier parameter |
Definition at line 36 of file tool_event_utils.cpp.
References PCB_BASE_EDIT_FRAME::GetRotationAngle(), IsRotateToolEvt(), and TOOL_EVENT::Parameter().
Referenced by PCB_TOOL_BASE::doInteractiveItemPlacement(), and EDIT_TOOL::Rotate().
bool TOOL_EVT_UTILS::IsRotateToolEvt | ( | const TOOL_EVENT & | aEvt | ) |
Function isRotateToolEvt()
aEvt | event to check |
Definition at line 29 of file tool_event_utils.cpp.
References TOOL_EVENT::IsAction(), PCB_ACTIONS::rotateCcw, and PCB_ACTIONS::rotateCw.
Referenced by PCB_TOOL_BASE::doInteractiveItemPlacement(), and GetEventRotationAngle().