LibrePCB Developers Documentation
BES_DrawPolygon Class Referencefinal

The BES_DrawPolygon class. More...

#include <bes_drawpolygon.h>

+ Inheritance diagram for BES_DrawPolygon:
+ Collaboration diagram for BES_DrawPolygon:

Public Member Functions

 BES_DrawPolygon (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
 ~BES_DrawPolygon () noexcept
 
ProcRetVal process (BEE_Base *event) noexcept override
 
bool entry (BEE_Base *event) noexcept override
 
bool exit (BEE_Base *event) noexcept override
 
- Public Member Functions inherited from BES_Base
 BES_Base (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
virtual ~BES_Base ()
 

Private Types

enum  SubState
 Internal FSM States (substates) More...
 

Private Member Functions

ProcRetVal processSubStateIdle (BEE_Base *event) noexcept
 
ProcRetVal processSubStatePositioning (BEE_Base *event) noexcept
 
ProcRetVal processIdleSceneEvent (BEE_Base *event) noexcept
 
ProcRetVal processPositioningSceneEvent (BEE_Base *event) noexcept
 
bool start (Board &board, const Point &pos) noexcept
 
bool addSegment (Board &board, const Point &pos) noexcept
 
bool abort (bool showErrMsgBox) noexcept
 
void updateSegmentPosition (const Point &cursorPos) noexcept
 
void layerComboBoxLayerChanged (const GraphicsLayerName &layerName) noexcept
 
void widthEditValueChanged (const UnsignedLength &value) noexcept
 
void filledCheckBoxCheckedChanged (bool checked) noexcept
 
void makeSelectedLayerVisible () noexcept
 

Private Attributes

SubState mSubState
 
GraphicsLayerName mCurrentLayerName
 
UnsignedLength mCurrentWidth
 
bool mCurrentIsFilled
 
BI_PolygonmCurrentPolygon
 
CmdPolygonEditmCmdEditCurrentPolygon
 
Point mLastSegmentPos
 
QList< QAction * > mActionSeparators
 
QLabel * mLayerLabel
 
GraphicsLayerComboBoxmLayerComboBox
 
QLabel * mWidthLabel
 
UnsignedLengthEditmWidthEdit
 
QLabel * mFillLabel
 
QCheckBox * mFillCheckBox
 

Additional Inherited Members

- Public Types inherited from BES_Base
enum  ProcRetVal
 process() return values More...
 
- Protected Attributes inherited from BES_Base
workspace::WorkspacemWorkspace
 
ProjectmProject
 
CircuitmCircuit
 
BoardEditormEditor
 
Ui::BoardEditor & mEditorUi
 allows access to BoardEditor UI More...
 
GraphicsViewmEditorGraphicsView
 allows access to the board editor graphics view More...
 
UndoStackmUndoStack
 

Detailed Description

The BES_DrawPolygon class.

Member Enumeration Documentation

◆ SubState

enum SubState
strongprivate

Internal FSM States (substates)

Enumerator
Idle 
Positioning 

Constructor & Destructor Documentation

◆ BES_DrawPolygon()

BES_DrawPolygon ( BoardEditor editor,
Ui::BoardEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicit

◆ ~BES_DrawPolygon()

~BES_DrawPolygon ( )
noexcept

Member Function Documentation

◆ process()

BES_Base::ProcRetVal process ( BEE_Base event)
overridevirtualnoexcept

Implements BES_Base.

+ Here is the call graph for this function:

◆ entry()

bool entry ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

+ Here is the call graph for this function:

◆ exit()

bool exit ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

+ Here is the call graph for this function:

◆ processSubStateIdle()

BES_Base::ProcRetVal processSubStateIdle ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processSubStatePositioning()

BES_Base::ProcRetVal processSubStatePositioning ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processIdleSceneEvent()

BES_Base::ProcRetVal processIdleSceneEvent ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPositioningSceneEvent()

BES_Base::ProcRetVal processPositioningSceneEvent ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ start()

bool start ( Board board,
const Point pos 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSegment()

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

◆ abort()

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

◆ updateSegmentPosition()

void updateSegmentPosition ( const Point cursorPos)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ layerComboBoxLayerChanged()

void layerComboBoxLayerChanged ( const GraphicsLayerName layerName)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ widthEditValueChanged()

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

◆ filledCheckBoxCheckedChanged()

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

◆ makeSelectedLayerVisible()

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

Member Data Documentation

◆ mSubState

SubState mSubState
private

◆ mCurrentLayerName

GraphicsLayerName mCurrentLayerName
private

◆ mCurrentWidth

UnsignedLength mCurrentWidth
private

◆ mCurrentIsFilled

bool mCurrentIsFilled
private

◆ mCurrentPolygon

BI_Polygon* mCurrentPolygon
private

◆ mCmdEditCurrentPolygon

CmdPolygonEdit* mCmdEditCurrentPolygon
private

◆ mLastSegmentPos

Point mLastSegmentPos
private

◆ mActionSeparators

QList<QAction*> mActionSeparators
private

◆ mLayerLabel

QLabel* mLayerLabel
private

◆ mLayerComboBox

GraphicsLayerComboBox* mLayerComboBox
private

◆ mWidthLabel

QLabel* mWidthLabel
private

◆ mWidthEdit

UnsignedLengthEdit* mWidthEdit
private

◆ mFillLabel

QLabel* mFillLabel
private

◆ mFillCheckBox

QCheckBox* mFillCheckBox
private

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