LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SymbolEditorState_DrawPolygonBase Class Reference

The SymbolEditorState_DrawPolygonBase class. More...

#include <symboleditorstate_drawpolygonbase.h>

+ Inheritance diagram for SymbolEditorState_DrawPolygonBase:
+ Collaboration diagram for SymbolEditorState_DrawPolygonBase:

Public Types

enum  Mode
 
- Public Types inherited from SymbolEditorState
using Context = SymbolEditorFsm::Context
 

Public Member Functions

 SymbolEditorState_DrawPolygonBase ()=delete
 
 SymbolEditorState_DrawPolygonBase (const SymbolEditorState_DrawPolygonBase &other)=delete
 
 SymbolEditorState_DrawPolygonBase (const Context &context, Mode mode) noexcept
 
virtual ~SymbolEditorState_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
 
SymbolEditorState_DrawPolygonBaseoperator= (const SymbolEditorState_DrawPolygonBase &rhs)=delete
 
- Public Member Functions inherited from SymbolEditorState
 SymbolEditorState ()=delete
 
 SymbolEditorState (const SymbolEditorState &other)=delete
 
 SymbolEditorState (const Context &context) noexcept
 
virtual ~SymbolEditorState () 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
 
SymbolEditorStateoperator= (const SymbolEditorState &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 SymbolEditorState
const PositiveLengthgetGridInterval () const noexcept
 
- Protected Attributes inherited from SymbolEditorState
Context mContext
 

Detailed Description

Member Enumeration Documentation

enum Mode
strong
Enumerator
LINE 
RECT 
POLYGON 

Constructor & Destructor Documentation

SymbolEditorState_DrawPolygonBase ( const Context context,
Mode  mode 
)
noexcept
~SymbolEditorState_DrawPolygonBase ( )
virtualnoexcept

Member Function Documentation

bool entry ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

bool exit ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ 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: