LibrePCB Developers Documentation
Loading...
Searching...
No Matches
PackageEditorState_AddPads Class Reference

The PackageEditorState_AddPads class. More...

#include <packageeditorstate_addpads.h>

+ Inheritance diagram for PackageEditorState_AddPads:
+ Collaboration diagram for PackageEditorState_AddPads:

Public Types

enum class  PadType
 
- Public Types inherited from PackageEditorState
using Context = PackageEditorFsm::Context
 

Signals

void packagePadChanged (const std::optional< Uuid > &pad)
 
void componentSideChanged (Pad::ComponentSide side)
 
void shapeChanged (Pad::Shape shape)
 
void widthChanged (const PositiveLength &width)
 
void heightChanged (const PositiveLength &height)
 
void radiusChanged (const UnsignedLimitedRatio &radius)
 
void drillDiameterChanged (const PositiveLength &diameter)
 
void copperClearanceChanged (const UnsignedLength &clearance)
 
void stopMaskConfigChanged (const MaskConfig &cfg)
 
void functionChanged (Pad::Function function)
 
- Signals inherited from PackageEditorState
void abortRequested ()
 

Public Member Functions

 PackageEditorState_AddPads ()=delete
 
 PackageEditorState_AddPads (const PackageEditorState_AddPads &other)=delete
 
 PackageEditorState_AddPads (Context &context, PadType type, Pad::Function function) noexcept
 
virtual ~PackageEditorState_AddPads () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processRotate (const Angle &rotation) noexcept override
 
PadType getType () const noexcept
 
const std::optional< Uuid > & getPackagePad () const noexcept
 
void setPackagePad (const std::optional< Uuid > &pad) noexcept
 
Pad::ComponentSide getComponentSide () const noexcept
 
void setComponentSide (Pad::ComponentSide side) noexcept
 
Pad::Shape getShape () const noexcept
 
void setShape (Pad::Shape shape) noexcept
 
const PositiveLengthgetWidth () const noexcept
 
void setWidth (const PositiveLength &width) noexcept
 
const PositiveLengthgetHeight () const noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
const UnsignedLimitedRatiogetRadius () const noexcept
 
void setRadius (const UnsignedLimitedRatio &radius) noexcept
 
std::optional< PositiveLengthgetDrillDiameter () const noexcept
 
void setDrillDiameter (const PositiveLength &diameter) noexcept
 
const UnsignedLengthgetCopperClearance () const noexcept
 
void setCopperClearance (const UnsignedLength &clearance) noexcept
 
const MaskConfiggetStopMaskConfig () const noexcept
 
void setStopMaskConfig (const MaskConfig &cfg) noexcept
 
Pad::Function getFunction () const noexcept
 
bool getFunctionIsFiducial () const noexcept
 
void setFunction (Pad::Function function) noexcept
 
PackageEditorState_AddPadsoperator= (const PackageEditorState_AddPads &rhs)=delete
 
- Public Member Functions inherited from PackageEditorState
 PackageEditorState ()=delete
 
 PackageEditorState (const PackageEditorState &other)=delete
 
 PackageEditorState (Context &context) noexcept
 
virtual ~PackageEditorState () noexcept
 
virtual bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta)
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processMoveAlign () noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processFlip (Qt::Orientation orientation) noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processGenerateOutline () noexcept
 
virtual bool processGenerateCourtyard () noexcept
 
virtual bool processImportDxf () noexcept
 
virtual bool processAcceptCommand () noexcept
 
virtual bool processAbortCommand () noexcept
 
virtual bool processGridIntervalChanged (const PositiveLength &interval) noexcept
 
PackageEditorStateoperator= (const PackageEditorState &rhs)=delete
 

Private Member Functions

bool startAddPad (const Point &pos) noexcept
 
bool finishAddPad (const Point &pos) noexcept
 
bool abortAddPad () noexcept
 
void selectNextFreePackagePad () noexcept
 
void applyRecommendedRoundedRectRadius () noexcept
 

Private Attributes

const PadType mPadType
 
FootprintPad mCurrentProperties
 
std::shared_ptr< FootprintPadmCurrentPad
 
std::shared_ptr< FootprintPadGraphicsItemmCurrentGraphicsItem
 
std::unique_ptr< CmdFootprintPadEditmCurrentEditCmd
 

Additional Inherited Members

- Protected Member Functions inherited from PackageEditorState
GraphicsScenegetGraphicsScene () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QWidget * parentWidget () noexcept
 
- Static Protected Member Functions inherited from PackageEditorState
static const QSet< const Layer * > & getAllowedTextLayers () noexcept
 
static const QSet< const Layer * > & getAllowedCircleAndPolygonLayers () noexcept
 
- Protected Attributes inherited from PackageEditorState
ContextmContext
 
PackageEditorFsmAdaptermAdapter
 

Detailed Description

Member Enumeration Documentation

◆ PadType

enum class PadType
strong
Enumerator
THT 
SMT 

Constructor & Destructor Documentation

◆ PackageEditorState_AddPads() [1/3]

◆ PackageEditorState_AddPads() [2/3]

◆ PackageEditorState_AddPads() [3/3]

PackageEditorState_AddPads ( Context context,
PadType  type,
Pad::Function  function 
)
explicitnoexcept

◆ ~PackageEditorState_AddPads()

~PackageEditorState_AddPads ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ getType()

PadType getType ( ) const
inlinenoexcept

◆ getPackagePad()

const std::optional< Uuid > & getPackagePad ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setPackagePad()

void setPackagePad ( const std::optional< Uuid > &  pad)
noexcept
+ Here is the caller graph for this function:

◆ getComponentSide()

Pad::ComponentSide getComponentSide ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setComponentSide()

void setComponentSide ( Pad::ComponentSide  side)
noexcept
+ Here is the caller graph for this function:

◆ getShape()

Pad::Shape getShape ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setShape()

void setShape ( Pad::Shape  shape)
noexcept

◆ getWidth()

const PositiveLength & getWidth ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setWidth()

void setWidth ( const PositiveLength width)
noexcept
+ Here is the caller graph for this function:

◆ getHeight()

const PositiveLength & getHeight ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setHeight()

void setHeight ( const PositiveLength height)
noexcept
+ Here is the caller graph for this function:

◆ getRadius()

const UnsignedLimitedRatio & getRadius ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setRadius()

void setRadius ( const UnsignedLimitedRatio radius)
noexcept
+ Here is the caller graph for this function:

◆ getDrillDiameter()

std::optional< PositiveLength > getDrillDiameter ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setDrillDiameter()

void setDrillDiameter ( const PositiveLength diameter)
noexcept
+ Here is the caller graph for this function:

◆ getCopperClearance()

const UnsignedLength & getCopperClearance ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setCopperClearance()

void setCopperClearance ( const UnsignedLength clearance)
noexcept

◆ getStopMaskConfig()

const MaskConfig & getStopMaskConfig ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setStopMaskConfig()

void setStopMaskConfig ( const MaskConfig cfg)
noexcept

◆ getFunction()

Pad::Function getFunction ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ getFunctionIsFiducial()

bool getFunctionIsFiducial ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setFunction()

void setFunction ( Pad::Function  function)
noexcept

◆ operator=()

PackageEditorState_AddPads & operator= ( const PackageEditorState_AddPads rhs)
delete

◆ packagePadChanged

void packagePadChanged ( const std::optional< Uuid > &  pad)
signal
+ Here is the caller graph for this function:

◆ componentSideChanged

void componentSideChanged ( Pad::ComponentSide  side)
signal
+ Here is the caller graph for this function:

◆ shapeChanged

void shapeChanged ( Pad::Shape  shape)
signal

◆ widthChanged

void widthChanged ( const PositiveLength width)
signal
+ Here is the caller graph for this function:

◆ heightChanged

void heightChanged ( const PositiveLength height)
signal
+ Here is the caller graph for this function:

◆ radiusChanged

void radiusChanged ( const UnsignedLimitedRatio radius)
signal
+ Here is the caller graph for this function:

◆ drillDiameterChanged

void drillDiameterChanged ( const PositiveLength diameter)
signal
+ Here is the caller graph for this function:

◆ copperClearanceChanged

void copperClearanceChanged ( const UnsignedLength clearance)
signal
+ Here is the caller graph for this function:

◆ stopMaskConfigChanged

void stopMaskConfigChanged ( const MaskConfig cfg)
signal

◆ functionChanged

void functionChanged ( Pad::Function  function)
signal
+ Here is the caller graph for this function:

◆ startAddPad()

bool startAddPad ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finishAddPad()

bool finishAddPad ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:

◆ abortAddPad()

bool abortAddPad ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectNextFreePackagePad()

void selectNextFreePackagePad ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyRecommendedRoundedRectRadius()

void applyRecommendedRoundedRectRadius ( )
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mPadType

const PadType mPadType
private

◆ mCurrentProperties

FootprintPad mCurrentProperties
private

◆ mCurrentPad

std::shared_ptr<FootprintPad> mCurrentPad
private

◆ mCurrentGraphicsItem

std::shared_ptr<FootprintPadGraphicsItem> mCurrentGraphicsItem
private

◆ mCurrentEditCmd

std::unique_ptr<CmdFootprintPadEdit> mCurrentEditCmd
private

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