LibrePCB Developers Documentation
Loading...
Searching...
No Matches
BoardEditorState_DrawZone Class Referencefinal

The "draw zone" state/tool of the board editor. More...

#include <boardeditorstate_drawzone.h>

+ Inheritance diagram for BoardEditorState_DrawZone:
+ Collaboration diagram for BoardEditorState_DrawZone:

Signals

void layersChanged (const QSet< const Layer * > &layers)
 
void rulesChanged (Zone::Rules rules)
 
- Signals inherited from BoardEditorState
void requestLeavingState ()
 Signal to indicate that the current tool should be exited.
 

Public Member Functions

 BoardEditorState_DrawZone ()=delete
 
 BoardEditorState_DrawZone (const BoardEditorState_DrawZone &other)=delete
 
 BoardEditorState_DrawZone (const Context &context) noexcept
 
virtual ~BoardEditorState_DrawZone () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processAbortCommand () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override
 
QSet< const Layer * > getAvailableLayers () noexcept
 
QSet< const Layer * > getLayers () const noexcept
 
void setLayers (const QSet< const Layer * > &layers) noexcept
 
Zone::Rules getRules () const noexcept
 
void setRule (Zone::Rule rule, bool enable) noexcept
 
BoardEditorState_DrawZoneoperator= (const BoardEditorState_DrawZone &rhs)=delete
 
- Public Member Functions inherited from BoardEditorState
 BoardEditorState ()=delete
 
 BoardEditorState (const BoardEditorState &other)=delete
 
 BoardEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~BoardEditorState () noexcept
 
virtual bool processAddDevice (ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
 
virtual bool processImportDxf () noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta) noexcept
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processFlip (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processSetLocked (bool locked) noexcept
 
virtual bool processChangeLineWidth (int step) noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
BoardEditorStateoperator= (const BoardEditorState &rhs)=delete
 

Private Member Functions

bool startAddZone (const Point &pos) noexcept
 
bool addSegment (const Point &pos) noexcept
 
bool updateLastVertexPosition (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
Point mLastVertexPos
 
BoardZoneData mCurrentProperties
 
BI_ZonemCurrentZone
 
std::unique_ptr< CmdBoardZoneEditmCurrentZoneEditCmd
 

Additional Inherited Members

- Public Types inherited from BoardEditorState
enum class  FindFlag : uint32_t
 
using Context = BoardEditorFsm::Context
 
- Protected Member Functions inherited from BoardEditorState
BoardGraphicsScenegetActiveBoardScene () noexcept
 
bool getIgnoreLocks () const noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QSet< const Layer * > getAllowedGeometryLayers () noexcept
 
void makeLayerVisible (const QString &layer) noexcept
 
void abortBlockingToolsInOtherEditors () noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
- Protected Attributes inherited from BoardEditorState
Context mContext
 
BoardEditorFsmAdaptermAdapter
 

Detailed Description

The "draw zone" state/tool of the board editor.

Constructor & Destructor Documentation

◆ BoardEditorState_DrawZone() [1/3]

◆ BoardEditorState_DrawZone() [2/3]

◆ BoardEditorState_DrawZone() [3/3]

BoardEditorState_DrawZone ( const Context context)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~BoardEditorState_DrawZone()

~BoardEditorState_DrawZone ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ getAvailableLayers()

QSet< const Layer * > getAvailableLayers ( )
noexcept
+ Here is the call graph for this function:

◆ getLayers()

QSet< const Layer * > getLayers ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setLayers()

void setLayers ( const QSet< const Layer * > &  layers)
noexcept

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

◆ operator=()

BoardEditorState_DrawZone & operator= ( const BoardEditorState_DrawZone rhs)
delete

◆ layersChanged

void layersChanged ( const QSet< const Layer * > &  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:

◆ startAddZone()

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

◆ addSegment()

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

◆ updateLastVertexPosition()

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

◆ abortCommand()

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

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mLastVertexPos

Point mLastVertexPos
private

◆ mCurrentProperties

BoardZoneData mCurrentProperties
private

◆ mCurrentZone

BI_Zone* mCurrentZone
private

◆ mCurrentZoneEditCmd

std::unique_ptr<CmdBoardZoneEdit> mCurrentZoneEditCmd
private

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