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 class  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
 
QSet< EditorWidgetBase::FeaturegetAvailableFeatures () const noexcept override
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
bool processRotate (const Angle &rotation) noexcept override
 
bool processMirror (Qt::Orientation orientation) 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 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 (Qt::ArrowType direction)
 
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
 

Private Member Functions

bool startAddText (const Point &pos) noexcept
 
bool finishAddText (const Point &pos) noexcept
 
bool abortAddText () noexcept
 
void resetToDefaultParameters () noexcept
 
void layerComboBoxValueChanged (const Layer &layer) noexcept
 
void heightEditValueChanged (const PositiveLength &value) noexcept
 
void textComboBoxValueChanged (const QString &value) noexcept
 
void hAlignActionGroupValueChanged (const HAlign &value) noexcept
 
void vAlignActionGroupValueChanged (const VAlign &value) noexcept
 

Private Attributes

Mode mMode
 
Point mStartPos
 
QScopedPointer< CmdTextEditmEditCmd
 
std::shared_ptr< TextmCurrentText
 
std::shared_ptr< TextGraphicsItemmCurrentGraphicsItem
 
QPointer< HAlignActionGroupmHAlignActionGroup
 
QPointer< VAlignActionGroupmVAlignActionGroup
 
const LayermLastLayer
 
Angle mLastRotation
 
PositiveLength mLastHeight
 
Alignment mLastAlignment
 
QString mLastText
 

Additional Inherited Members

- Signals inherited from SymbolEditorState
void availableFeaturesChanged ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from SymbolEditorState
const PositiveLengthgetGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
- Static Protected Member Functions inherited from SymbolEditorState
static const QSet< const Layer * > & getAllowedTextLayers () noexcept
 
static const QSet< const Layer * > & getAllowedCircleAndPolygonLayers () noexcept
 
- Protected Attributes inherited from SymbolEditorState
Context mContext
 

Detailed Description

Member Enumeration Documentation

◆ Mode

enum class 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:

◆ getAvailableFeatures()

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

Implements SymbolEditorState.

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

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

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

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

◆ layerComboBoxValueChanged()

void layerComboBoxValueChanged ( const Layer layer)
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:

◆ hAlignActionGroupValueChanged()

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

◆ vAlignActionGroupValueChanged()

void vAlignActionGroupValueChanged ( const VAlign 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

std::shared_ptr<Text> mCurrentText
private

◆ mCurrentGraphicsItem

std::shared_ptr<TextGraphicsItem> mCurrentGraphicsItem
private

◆ mHAlignActionGroup

QPointer<HAlignActionGroup> mHAlignActionGroup
private

◆ mVAlignActionGroup

QPointer<VAlignActionGroup> mVAlignActionGroup
private

◆ mLastLayer

const Layer* mLastLayer
private

◆ mLastRotation

Angle mLastRotation
private

◆ mLastHeight

PositiveLength mLastHeight
private

◆ mLastAlignment

Alignment mLastAlignment
private

◆ mLastText

QString mLastText
private

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