LibrePCB Developers Documentation
SymbolEditorState_DrawTextBase Class Reference

The SymbolEditorState_DrawTextBase class. More...

#include <symboleditorstate_drawtextbase.h>

+ Inheritance diagram for SymbolEditorState_DrawTextBase:
+ Collaboration diagram for SymbolEditorState_DrawTextBase:

Public Types

enum  Mode
 
- Public Types inherited from SymbolEditorState
using Context = SymbolEditorFsm::Context
 

Public Member Functions

 SymbolEditorState_DrawTextBase ()=delete
 
 SymbolEditorState_DrawTextBase (const SymbolEditorState_DrawTextBase &other)=delete
 
 SymbolEditorState_DrawTextBase (const Context &context, Mode mode) noexcept
 
virtual ~SymbolEditorState_DrawTextBase () noexcept
 
bool entry () noexcept override
 
bool exit () noexcept override
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processRotateCw () noexcept override
 
bool processRotateCcw () noexcept override
 
SymbolEditorState_DrawTextBaseoperator= (const SymbolEditorState_DrawTextBase &rhs)=delete
 
- Public Member Functions inherited from SymbolEditorState
 SymbolEditorState ()=delete
 
 SymbolEditorState (const SymbolEditorState &other)=delete
 
 SymbolEditorState (const Context &context) noexcept
 
virtual ~SymbolEditorState () noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMirror () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processAbortCommand () noexcept
 
SymbolEditorStateoperator= (const SymbolEditorState &rhs)=delete
 

Private Member Functions

bool startAddText (const Point &pos) noexcept
 
bool finishAddText (const Point &pos) noexcept
 
bool abortAddText () noexcept
 
void resetToDefaultParameters () noexcept
 
Alignment getAlignment () const noexcept
 
void layerComboBoxValueChanged (const GraphicsLayerName &layerName) noexcept
 
void heightEditValueChanged (const PositiveLength &value) noexcept
 
void textComboBoxValueChanged (const QString &value) noexcept
 

Private Attributes

Mode mMode
 
Point mStartPos
 
QScopedPointer< CmdTextEditmEditCmd
 
TextmCurrentText
 
TextGraphicsItemmCurrentGraphicsItem
 
GraphicsLayerName mLastLayerName
 
Angle mLastRotation
 
PositiveLength mLastHeight
 
QString mLastText
 

Additional Inherited Members

- Protected Member Functions inherited from SymbolEditorState
const PositiveLengthgetGridInterval () const noexcept
 
- Protected Attributes inherited from SymbolEditorState
Context mContext
 

Detailed Description

Member Enumeration Documentation

◆ Mode

enum Mode
strong
Enumerator
NAME 
VALUE 
TEXT 

Constructor & Destructor Documentation

◆ SymbolEditorState_DrawTextBase() [1/3]

◆ SymbolEditorState_DrawTextBase() [2/3]

◆ SymbolEditorState_DrawTextBase() [3/3]

SymbolEditorState_DrawTextBase ( const Context context,
Mode  mode 
)
explicitnoexcept

◆ ~SymbolEditorState_DrawTextBase()

~SymbolEditorState_DrawTextBase ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processRotateCw()

bool processRotateCw ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processRotateCcw()

bool processRotateCcw ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

◆ startAddText()

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

◆ finishAddText()

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

◆ abortAddText()

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

◆ resetToDefaultParameters()

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

◆ getAlignment()

Alignment getAlignment ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ layerComboBoxValueChanged()

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

◆ heightEditValueChanged()

void heightEditValueChanged ( const PositiveLength value)
privatenoexcept
+ Here is the caller graph for this function:

◆ textComboBoxValueChanged()

void textComboBoxValueChanged ( const QString &  value)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mMode

Mode mMode
private

◆ mStartPos

Point mStartPos
private

◆ mEditCmd

QScopedPointer<CmdTextEdit> mEditCmd
private

◆ mCurrentText

Text* mCurrentText
private

◆ mCurrentGraphicsItem

TextGraphicsItem* mCurrentGraphicsItem
private

◆ mLastLayerName

GraphicsLayerName mLastLayerName
private

◆ mLastRotation

Angle mLastRotation
private

◆ mLastHeight

PositiveLength mLastHeight
private

◆ mLastText

QString mLastText
private

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