LibrePCB Developers Documentation
Loading...
Searching...
No Matches
PackageEditorState_DrawZone Class Reference

The PackageEditorState_DrawZone class. More...

#include <packageeditorstate_drawzone.h>

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

Signals

void layersChanged (Zone::Layers layers)
 
void rulesChanged (Zone::Rules rules)
 
void angleChanged (const Angle &angle)
 
- Signals inherited from PackageEditorState
void abortRequested ()
 

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
 
bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept override
 
bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept override
 
bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processAbortCommand () noexcept override
 
Zone::Layers getLayers () const noexcept
 
void setLayer (Zone::Layer layer, bool enable) noexcept
 
Zone::Rules getRules () const noexcept
 
void setRule (Zone::Rule rule, bool enable) noexcept
 
const AnglegetAngle () const noexcept
 
void setAngle (const Angle &angle) noexcept
 
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 processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &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 processAcceptCommand () noexcept
 
virtual bool processGridIntervalChanged (const PositiveLength &interval) 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
 

Private Attributes

Point mLastScenePos
 
Angle mLastAngle
 
Point mCursorPos
 
bool mIsUndoCmdActive
 
Zone mCurrentProperties
 
std::shared_ptr< ZonemCurrentZone
 
std::shared_ptr< ZoneGraphicsItemmCurrentGraphicsItem
 
std::unique_ptr< CmdZoneEditmCurrentEditCmd
 

Additional Inherited Members

- Public Types inherited from PackageEditorState
using Context = PackageEditorFsm::Context
 
- Protected Member Functions inherited from PackageEditorState
GraphicsScenegetGraphicsScene () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QWidget * parentWidget () 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
 
PackageEditorFsmAdaptermAdapter
 

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.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processKeyPressed()

bool processKeyPressed ( const GraphicsSceneKeyEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processKeyReleased()

bool processKeyReleased ( const GraphicsSceneKeyEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ getLayers()

Zone::Layers getLayers ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setLayer()

void setLayer ( Zone::Layer  layer,
bool  enable 
)
noexcept
+ Here is the caller graph for this function:

◆ getRules()

Zone::Rules getRules ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setRule()

void setRule ( Zone::Rule  rule,
bool  enable 
)
noexcept
+ Here is the caller graph for this function:

◆ getAngle()

const Angle & getAngle ( ) const
inlinenoexcept

◆ setAngle()

void setAngle ( const Angle angle)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

PackageEditorState_DrawZone & operator= ( const PackageEditorState_DrawZone rhs)
delete

◆ layersChanged

void layersChanged ( Zone::Layers  layers)
signal
+ Here is the caller graph for this function:

◆ rulesChanged

void rulesChanged ( Zone::Rules  rules)
signal
+ Here is the caller graph for this function:

◆ angleChanged

void angleChanged ( const Angle angle)
signal
+ Here is the caller graph for this function:

◆ 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:
+ Here is the caller graph for this function:

◆ addNextSegment()

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

◆ updateCursorPosition()

void updateCursorPosition ( Qt::KeyboardModifiers  modifiers)
privatenoexcept
+ Here is the caller graph for this function:

◆ updateOutline()

void updateOutline ( )
privatenoexcept

◆ updateOverlayText()

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

◆ updateStatusBarMessage()

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

Member Data Documentation

◆ mLastScenePos

Point mLastScenePos
private

◆ mLastAngle

Angle mLastAngle
private

◆ mCursorPos

Point mCursorPos
private

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mCurrentProperties

Zone mCurrentProperties
private

◆ mCurrentZone

std::shared_ptr<Zone> mCurrentZone
private

◆ mCurrentGraphicsItem

std::shared_ptr<ZoneGraphicsItem> mCurrentGraphicsItem
private

◆ mCurrentEditCmd

std::unique_ptr<CmdZoneEdit> mCurrentEditCmd
private

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