LibrePCB Developers Documentation
PackageEditorState_DrawZone Class Reference

The PackageEditorState_DrawZone class. More...

#include <packageeditorstate_drawzone.h>

+ Inheritance diagram for PackageEditorState_DrawZone:
+ Collaboration diagram for PackageEditorState_DrawZone:

Public Member Functions

 PackageEditorState_DrawZone ()=delete
 
 PackageEditorState_DrawZone (const PackageEditorState_DrawZone &other)=delete
 
 PackageEditorState_DrawZone (Context &context) noexcept
 
virtual ~PackageEditorState_DrawZone () noexcept
 
bool entry () noexcept override
 
bool exit () noexcept override
 
QSet< EditorWidgetBase::FeaturegetAvailableFeatures () const noexcept override
 
bool processKeyPressed (const QKeyEvent &e) noexcept override
 
bool processKeyReleased (const QKeyEvent &e) 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_DrawZoneoperator= (const PackageEditorState_DrawZone &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 (const Point &delta)
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processMoveAlign () 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 start () noexcept
 
bool abort (bool showErrMsgBox=true) noexcept
 
bool addNextSegment () noexcept
 
void updateCursorPosition (Qt::KeyboardModifiers modifiers) noexcept
 
void updateOutline () noexcept
 
void updateOverlayText () noexcept
 
void updateStatusBarMessage () noexcept
 
void angleEditValueChanged (const Angle &value) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
QScopedPointer< CmdZoneEditmEditCmd
 
std::shared_ptr< ZonemCurrentZone
 
std::shared_ptr< ZoneGraphicsItemmCurrentGraphicsItem
 
Point mLastScenePos
 
Point mCursorPos
 
Zone::Layers mLastLayers
 
Zone::Rules mLastRules
 
Angle mLastAngle
 

Additional Inherited Members

- Public Types inherited from PackageEditorState
using Context = PackageEditorFsm::Context
 
- Signals inherited from PackageEditorState
void abortRequested ()
 
void availableFeaturesChanged ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- 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_DrawZone() [1/3]

◆ PackageEditorState_DrawZone() [2/3]

◆ PackageEditorState_DrawZone() [3/3]

PackageEditorState_DrawZone ( Context context)
explicitnoexcept

◆ ~PackageEditorState_DrawZone()

~PackageEditorState_DrawZone ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ getAvailableFeatures()

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

Implements PackageEditorState.

◆ processKeyPressed()

bool processKeyPressed ( const QKeyEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processKeyReleased()

bool processKeyReleased ( const QKeyEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ operator=()

PackageEditorState_DrawZone & operator= ( const PackageEditorState_DrawZone rhs)
delete

◆ start()

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

◆ abort()

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

◆ addNextSegment()

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

◆ updateCursorPosition()

void updateCursorPosition ( Qt::KeyboardModifiers  modifiers)
privatenoexcept

◆ updateOutline()

void updateOutline ( )
privatenoexcept

◆ updateOverlayText()

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

◆ updateStatusBarMessage()

void updateStatusBarMessage ( )
privatenoexcept

◆ angleEditValueChanged()

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

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mEditCmd

QScopedPointer<CmdZoneEdit> mEditCmd
private

◆ mCurrentZone

std::shared_ptr<Zone> mCurrentZone
private

◆ mCurrentGraphicsItem

std::shared_ptr<ZoneGraphicsItem> mCurrentGraphicsItem
private

◆ mLastScenePos

Point mLastScenePos
private

◆ mCursorPos

Point mCursorPos
private

◆ mLastLayers

Zone::Layers mLastLayers
private

◆ mLastRules

Zone::Rules mLastRules
private

◆ mLastAngle

Angle mLastAngle
private

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