LibrePCB Developers Documentation
Loading...
Searching...
No Matches
BoardEditorState_DrawPolygon Class Referencefinal

The "draw polygon" state/tool of the board editor. More...

#include <boardeditorstate_drawpolygon.h>

+ Inheritance diagram for BoardEditorState_DrawPolygon:
+ Collaboration diagram for BoardEditorState_DrawPolygon:

Public Member Functions

 BoardEditorState_DrawPolygon ()=delete
 
 BoardEditorState_DrawPolygon (const BoardEditorState_DrawPolygon &other)=delete
 
 BoardEditorState_DrawPolygon (const Context &context) noexcept
 
virtual ~BoardEditorState_DrawPolygon () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processAbortCommand () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processSwitchToBoard (int index) noexcept override
 
BoardEditorState_DrawPolygonoperator= (const BoardEditorState_DrawPolygon &rhs)=delete
 
- Public Member Functions inherited from BoardEditorState
 BoardEditorState ()=delete
 
 BoardEditorState (const BoardEditorState &other)=delete
 
 BoardEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~BoardEditorState () noexcept
 
virtual bool processAddDevice (ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
 
virtual bool processImportDxf () noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta) noexcept
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processFlip (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processSetLocked (bool locked) noexcept
 
virtual bool processChangeLineWidth (int step) noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processKeyPressed (const QKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const QKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
BoardEditorStateoperator= (const BoardEditorState &rhs)=delete
 

Private Member Functions

bool startAddPolygon (const Point &pos) noexcept
 
bool addSegment (const Point &pos) noexcept
 
bool updateLastVertexPosition (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 
void layerComboBoxLayerChanged (const Layer &layer) noexcept
 
void widthEditValueChanged (const UnsignedLength &value) noexcept
 
void filledCheckBoxCheckedChanged (bool checked) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
Point mLastSegmentPos
 
const LayermLastLayer
 
UnsignedLength mLastLineWidth
 
Angle mLastRotation
 
bool mLastIsFilled
 
bool mLastIsGrabArea
 
BI_PolygonmCurrentPolygon
 
std::unique_ptr< CmdBoardPolygonEditmCurrentPolygonEditCmd
 

Additional Inherited Members

- Public Types inherited from BoardEditorState
enum class  FindFlag
 
using Context = BoardEditorFsm::Context
 
- Signals inherited from BoardEditorState
void requestLeavingState ()
 Signal to indicate that the current tool should be exited.
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from BoardEditorState
BoardgetActiveBoard () noexcept
 
BoardGraphicsScenegetActiveBoardScene () noexcept
 
bool getIgnoreLocks () const noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QSet< const Layer * > getAllowedGeometryLayers () noexcept
 
void makeLayerVisible (const QString &layer) noexcept
 
void abortBlockingToolsInOtherEditors () noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
- Protected Attributes inherited from BoardEditorState
Context mContext
 

Detailed Description

The "draw polygon" state/tool of the board editor.

Constructor & Destructor Documentation

◆ BoardEditorState_DrawPolygon() [1/3]

◆ BoardEditorState_DrawPolygon() [2/3]

◆ BoardEditorState_DrawPolygon() [3/3]

BoardEditorState_DrawPolygon ( const Context context)
explicitnoexcept

◆ ~BoardEditorState_DrawPolygon()

~BoardEditorState_DrawPolygon ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ processSwitchToBoard()

bool processSwitchToBoard ( int  index)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ operator=()

BoardEditorState_DrawPolygon & operator= ( const BoardEditorState_DrawPolygon rhs)
delete

◆ startAddPolygon()

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

◆ addSegment()

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

◆ updateLastVertexPosition()

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

◆ abortCommand()

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

◆ layerComboBoxLayerChanged()

void layerComboBoxLayerChanged ( const Layer layer)
privatenoexcept
+ Here is the caller graph for this function:

◆ widthEditValueChanged()

void widthEditValueChanged ( const UnsignedLength value)
privatenoexcept
+ Here is the caller graph for this function:

◆ filledCheckBoxCheckedChanged()

void filledCheckBoxCheckedChanged ( bool  checked)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mLastSegmentPos

Point mLastSegmentPos
private

◆ mLastLayer

const Layer* mLastLayer
private

◆ mLastLineWidth

UnsignedLength mLastLineWidth
private

◆ mLastRotation

Angle mLastRotation
private

◆ mLastIsFilled

bool mLastIsFilled
private

◆ mLastIsGrabArea

bool mLastIsGrabArea
private

◆ mCurrentPolygon

BI_Polygon* mCurrentPolygon
private

◆ mCurrentPolygonEditCmd

std::unique_ptr<CmdBoardPolygonEdit> mCurrentPolygonEditCmd
private

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