LibrePCB Developers Documentation
PackageEditorState_DrawPolygonBase Class Reference

The PackageEditorState_DrawPolygonBase class. More...

#include <packageeditorstate_drawpolygonbase.h>

+ Inheritance diagram for PackageEditorState_DrawPolygonBase:
+ Collaboration diagram for PackageEditorState_DrawPolygonBase:

Public Types

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

Public Member Functions

 PackageEditorState_DrawPolygonBase ()=delete
 
 PackageEditorState_DrawPolygonBase (const PackageEditorState_DrawPolygonBase &other)=delete
 
 PackageEditorState_DrawPolygonBase (Context &context, Mode mode) noexcept
 
virtual ~PackageEditorState_DrawPolygonBase () noexcept
 
bool entry () noexcept override
 
bool exit () noexcept override
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processAbortCommand () noexcept override
 
PackageEditorState_DrawPolygonBaseoperator= (const PackageEditorState_DrawPolygonBase &rhs)=delete
 
- Public Member Functions inherited from PackageEditorState
 PackageEditorState ()=delete
 
 PackageEditorState (const PackageEditorState &other)=delete
 
 PackageEditorState (Context &context) noexcept
 
virtual ~PackageEditorState () noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processRotateCw () noexcept
 
virtual bool processRotateCcw () noexcept
 
virtual bool processMirror () noexcept
 
virtual bool processFlip () noexcept
 
virtual bool processRemove () noexcept
 
PackageEditorStateoperator= (const PackageEditorState &rhs)=delete
 

Private Member Functions

bool start (const Point &pos) noexcept
 
bool abort () noexcept
 
bool addNextSegment (const Point &pos) noexcept
 
bool updateCurrentPosition (const Point &pos) noexcept
 
void layerComboBoxValueChanged (const GraphicsLayerName &layerName) noexcept
 
void lineWidthEditValueChanged (const UnsignedLength &value) noexcept
 
void angleEditValueChanged (const Angle &value) noexcept
 
void fillCheckBoxCheckedChanged (bool checked) noexcept
 
void grabAreaCheckBoxCheckedChanged (bool checked) noexcept
 

Private Attributes

Mode mMode
 
QScopedPointer< CmdPolygonEditmEditCmd
 
std::shared_ptr< PolygonmCurrentPolygon
 
Point mSegmentStartPos
 
PolygonGraphicsItemmCurrentGraphicsItem
 
GraphicsLayerName mLastLayerName
 
UnsignedLength mLastLineWidth
 
Angle mLastAngle
 
bool mLastFill
 
bool mLastGrabArea
 

Additional Inherited Members

- Protected Member Functions inherited from PackageEditorState
const PositiveLengthgetGridInterval () const noexcept
 
- Protected Attributes inherited from PackageEditorState
ContextmContext
 

Detailed Description

Member Enumeration Documentation

◆ Mode

enum Mode
strong
Enumerator
LINE 
RECT 
POLYGON 

Constructor & Destructor Documentation

◆ PackageEditorState_DrawPolygonBase() [1/3]

◆ PackageEditorState_DrawPolygonBase() [2/3]

◆ PackageEditorState_DrawPolygonBase() [3/3]

PackageEditorState_DrawPolygonBase ( Context context,
Mode  mode 
)
noexcept
+ Here is the call graph for this function:

◆ ~PackageEditorState_DrawPolygonBase()

~PackageEditorState_DrawPolygonBase ( )
virtualnoexcept
+ Here is the caller graph for this function:

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 ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ operator=()

◆ start()

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

◆ abort()

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

◆ addNextSegment()

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

◆ updateCurrentPosition()

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

◆ layerComboBoxValueChanged()

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

◆ lineWidthEditValueChanged()

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

◆ angleEditValueChanged()

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

◆ fillCheckBoxCheckedChanged()

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

◆ grabAreaCheckBoxCheckedChanged()

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

Member Data Documentation

◆ mMode

Mode mMode
private

◆ mEditCmd

QScopedPointer<CmdPolygonEdit> mEditCmd
private

◆ mCurrentPolygon

std::shared_ptr<Polygon> mCurrentPolygon
private

◆ mSegmentStartPos

Point mSegmentStartPos
private

◆ mCurrentGraphicsItem

PolygonGraphicsItem* mCurrentGraphicsItem
private

◆ mLastLayerName

GraphicsLayerName mLastLayerName
private

◆ mLastLineWidth

UnsignedLength mLastLineWidth
private

◆ mLastAngle

Angle mLastAngle
private

◆ mLastFill

bool mLastFill
private

◆ mLastGrabArea

bool mLastGrabArea
private

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