LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 () noexceptoverride
 
bool exit () noexceptoverride
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexceptoverride
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexceptoverride
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexceptoverride
 
bool processAbortCommand () noexceptoverride
 
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 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 QString &layerName) noexcept
 
void lineWidthSpinBoxValueChanged (double value) noexcept
 
void angleSpinBoxValueChanged (double 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

enum Mode
strong
Enumerator
LINE 
RECT 
POLYGON 

Constructor & Destructor Documentation

PackageEditorState_DrawPolygonBase ( Context context,
Mode  mode 
)
noexcept
~PackageEditorState_DrawPolygonBase ( )
virtualnoexcept

Member Function Documentation

bool entry ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

bool exit ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

bool start ( const Point pos)
privatenoexcept

+ Here is the call graph for this function:

bool abort ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool addNextSegment ( const Point pos)
privatenoexcept

+ Here is the call graph for this function:

bool updateCurrentPosition ( const Point pos)
privatenoexcept
void layerComboBoxValueChanged ( const QString &  layerName)
privatenoexcept

+ Here is the caller graph for this function:

void lineWidthSpinBoxValueChanged ( double  value)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void angleSpinBoxValueChanged ( double  value)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fillCheckBoxCheckedChanged ( bool  checked)
privatenoexcept

+ Here is the caller graph for this function:

void grabAreaCheckBoxCheckedChanged ( bool  checked)
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

Mode mMode
private
QScopedPointer<CmdPolygonEdit> mEditCmd
private
std::shared_ptr<Polygon> mCurrentPolygon
private
Point mSegmentStartPos
private
PolygonGraphicsItem* mCurrentGraphicsItem
private
GraphicsLayerName mLastLayerName
private
UnsignedLength mLastLineWidth
private
Angle mLastAngle
private
bool mLastFill
private
bool mLastGrabArea
private

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