LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SymbolEditorState Class Referenceabstract

The SymbolEditorState class is the base class of all symbol editor FSM states. More...

#include <symboleditorstate.h>

+ Inheritance diagram for SymbolEditorState:
+ Collaboration diagram for SymbolEditorState:

Public Types

using Context = SymbolEditorFsm::Context
 

Signals

void availableFeaturesChanged ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
void pasteRequested ()
 

Public Member Functions

 SymbolEditorState ()=delete
 
 SymbolEditorState (const SymbolEditorState &other)=delete
 
 SymbolEditorState (const Context &context) noexcept
 
virtual ~SymbolEditorState () noexcept
 
virtual bool entry () noexcept
 
virtual bool exit () noexcept
 
virtual QSet< EditorWidgetBase::FeaturegetAvailableFeatures () const noexcept=0
 
std::unique_ptr< SymbolClipboardDatatakeDataToPaste () noexcept
 
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 (std::unique_ptr< SymbolClipboardData > data=nullptr) noexcept
 
virtual bool processMove (const Point &delta)
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processImportDxf () noexcept
 
virtual bool processAbortCommand () noexcept
 
SymbolEditorStateoperator= (const SymbolEditorState &rhs)=delete
 

Protected Member Functions

void requestPaste (std::unique_ptr< SymbolClipboardData > data) noexcept
 
const PositiveLengthgetGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 

Static Protected Member Functions

static const QSet< const Layer * > & getAllowedTextLayers () noexcept
 
static const QSet< const Layer * > & getAllowedCircleAndPolygonLayers () noexcept
 

Protected Attributes

Context mContext
 

Private Attributes

std::unique_ptr< SymbolClipboardDatamDataToPaste
 

Detailed Description

The SymbolEditorState class is the base class of all symbol editor FSM states.

Member Typedef Documentation

◆ Context

Constructor & Destructor Documentation

◆ SymbolEditorState() [1/3]

SymbolEditorState ( )
delete

◆ SymbolEditorState() [2/3]

SymbolEditorState ( const SymbolEditorState other)
delete

◆ SymbolEditorState() [3/3]

SymbolEditorState ( const Context context)
explicitnoexcept

◆ ~SymbolEditorState()

~SymbolEditorState ( )
virtualnoexcept

Member Function Documentation

◆ entry()

◆ exit()

◆ getAvailableFeatures()

◆ takeDataToPaste()

std::unique_ptr< SymbolClipboardData > takeDataToPaste ( )
noexcept

◆ processKeyPressed()

virtual bool processKeyPressed ( const QKeyEvent &  e)
inlinevirtualnoexcept

◆ processKeyReleased()

virtual bool processKeyReleased ( const QKeyEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneMouseMoved()

virtual bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneLeftMouseButtonPressed()

virtual bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneLeftMouseButtonReleased()

virtual bool processGraphicsSceneLeftMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneRightMouseButtonReleased()

virtual bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processSelectAll()

virtual bool processSelectAll ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processCut()

virtual bool processCut ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processCopy()

virtual bool processCopy ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Measure, and SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processPaste()

virtual bool processPaste ( std::unique_ptr< SymbolClipboardData data = nullptr)
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processMove()

virtual bool processMove ( const Point delta)
inlinevirtual

Reimplemented in SymbolEditorState_Select.

◆ processRotate()

virtual bool processRotate ( const Angle rotation)
inlinevirtualnoexcept

◆ processMirror()

virtual bool processMirror ( Qt::Orientation  orientation)
inlinevirtualnoexcept

◆ processSnapToGrid()

virtual bool processSnapToGrid ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processRemove()

virtual bool processRemove ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Measure, and SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processEditProperties()

virtual bool processEditProperties ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

+ Here is the caller graph for this function:

◆ processImportDxf()

virtual bool processImportDxf ( )
inlinevirtualnoexcept

Reimplemented in SymbolEditorState_Select.

◆ processAbortCommand()

virtual bool processAbortCommand ( )
inlinevirtualnoexcept

◆ operator=()

SymbolEditorState & operator= ( const SymbolEditorState rhs)
delete

◆ availableFeaturesChanged

void availableFeaturesChanged ( )
signal
+ Here is the caller graph for this function:

◆ statusBarMessageChanged

void statusBarMessageChanged ( const QString &  message,
int  timeoutMs = -1 
)
signal
+ Here is the caller graph for this function:

◆ pasteRequested

void pasteRequested ( )
signal
+ Here is the caller graph for this function:

◆ requestPaste()

void requestPaste ( std::unique_ptr< SymbolClipboardData data)
protectednoexcept
+ Here is the caller graph for this function:

◆ getGridInterval()

const PositiveLength & getGridInterval ( ) const
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLengthUnit()

const LengthUnit & getLengthUnit ( ) const
protectednoexcept
+ Here is the caller graph for this function:

◆ getAllowedTextLayers()

const QSet< const Layer * > & getAllowedTextLayers ( )
staticprotectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllowedCircleAndPolygonLayers()

const QSet< const Layer * > & getAllowedCircleAndPolygonLayers ( )
staticprotectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mDataToPaste

std::unique_ptr<SymbolClipboardData> mDataToPaste
private

◆ mContext

Context mContext
protected

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