LibrePCB Developers Documentation
PackageEditorState_DrawCircle Class Referencefinal

The PackageEditorState_DrawCircle class. More...

#include <packageeditorstate_drawcircle.h>

+ Inheritance diagram for PackageEditorState_DrawCircle:
+ Collaboration diagram for PackageEditorState_DrawCircle:

Signals

void requestLineWidth (const UnsignedLength &value)
 
- Signals inherited from PackageEditorState
void availableFeaturesChanged ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 

Public Member Functions

 PackageEditorState_DrawCircle ()=delete
 
 PackageEditorState_DrawCircle (const PackageEditorState_DrawCircle &other)=delete
 
 PackageEditorState_DrawCircle (Context &context) noexcept
 
 ~PackageEditorState_DrawCircle () noexcept
 
bool entry () noexcept override
 
bool exit () noexcept override
 
QSet< EditorWidgetBase::FeaturegetAvailableFeatures () const noexcept override
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processAbortCommand () noexcept override
 
PackageEditorState_DrawCircleoperator= (const PackageEditorState_DrawCircle &rhs)=delete
 
- Public Member Functions inherited from PackageEditorState
 PackageEditorState ()=delete
 
 PackageEditorState (const PackageEditorState &other)=delete
 
 PackageEditorState (Context &context) noexcept
 
virtual ~PackageEditorState () noexcept
 
virtual bool entry () noexcept
 
virtual bool exit () noexcept
 
virtual QSet< EditorWidgetBase::FeaturegetAvailableFeatures () const noexcept=0
 
virtual bool processKeyPressed (const QKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const QKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (Qt::ArrowType direction)
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processFlip (Qt::Orientation orientation) noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processGenerateOutline () noexcept
 
virtual bool processGenerateCourtyard () noexcept
 
virtual bool processImportDxf () noexcept
 
virtual bool processAbortCommand () noexcept
 
PackageEditorStateoperator= (const PackageEditorState &rhs)=delete
 

Private Member Functions

bool startAddCircle (const Point &pos) noexcept
 
bool updateCircleDiameter (const Point &pos) noexcept
 
bool finishAddCircle (const Point &pos) noexcept
 
bool abortAddCircle () noexcept
 
void layerComboBoxValueChanged (const Layer &layer) noexcept
 
void lineWidthEditValueChanged (const UnsignedLength &value) noexcept
 
void fillCheckBoxCheckedChanged (bool checked) noexcept
 
void grabAreaCheckBoxCheckedChanged (bool checked) noexcept
 

Private Attributes

QScopedPointer< CmdCircleEditmEditCmd
 
std::shared_ptr< CirclemCurrentCircle
 
std::shared_ptr< CircleGraphicsItemmCurrentGraphicsItem
 
const LayermLastLayer
 
UnsignedLength mLastLineWidth
 
bool mLastFill
 
bool mLastGrabArea
 
QHash< const Layer *, UnsignedLengthmUsedLineWidths
 

Additional Inherited Members

- Public Types inherited from PackageEditorState
using Context = PackageEditorFsm::Context
 
- Protected Member Functions inherited from PackageEditorState
const PositiveLengthgetGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
- Static Protected Member Functions inherited from PackageEditorState
static const QSet< const Layer * > & getAllowedTextLayers () noexcept
 
static const QSet< const Layer * > & getAllowedCircleAndPolygonLayers () noexcept
 
- Protected Attributes inherited from PackageEditorState
ContextmContext
 

Detailed Description

Constructor & Destructor Documentation

◆ PackageEditorState_DrawCircle() [1/3]

◆ PackageEditorState_DrawCircle() [2/3]

◆ PackageEditorState_DrawCircle() [3/3]

PackageEditorState_DrawCircle ( Context context)
explicitnoexcept

◆ ~PackageEditorState_DrawCircle()

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:

◆ getAvailableFeatures()

QSet< EditorWidgetBase::Feature > getAvailableFeatures ( ) const
overridevirtualnoexcept

Implements PackageEditorState.

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

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ operator=()

PackageEditorState_DrawCircle & operator= ( const PackageEditorState_DrawCircle rhs)
delete

◆ requestLineWidth

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

◆ startAddCircle()

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

◆ updateCircleDiameter()

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

◆ finishAddCircle()

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

◆ abortAddCircle()

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

◆ layerComboBoxValueChanged()

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

◆ lineWidthEditValueChanged()

void lineWidthEditValueChanged ( const UnsignedLength value)
privatenoexcept
+ 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

◆ mEditCmd

QScopedPointer<CmdCircleEdit> mEditCmd
private

◆ mCurrentCircle

std::shared_ptr<Circle> mCurrentCircle
private

◆ mCurrentGraphicsItem

std::shared_ptr<CircleGraphicsItem> mCurrentGraphicsItem
private

◆ mLastLayer

const Layer* mLastLayer
private

◆ mLastLineWidth

UnsignedLength mLastLineWidth
private

◆ mLastFill

bool mLastFill
private

◆ mLastGrabArea

bool mLastGrabArea
private

◆ mUsedLineWidths

QHash<const Layer*, UnsignedLength> mUsedLineWidths
private

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