LibrePCB Developers Documentation
PackageEditorState_DrawTextBase Class Reference

The PackageEditorState_DrawTextBase class. More...

#include <packageeditorstate_drawtextbase.h>

+ Inheritance diagram for PackageEditorState_DrawTextBase:
+ Collaboration diagram for PackageEditorState_DrawTextBase:

Public Types

enum  Mode
 
- Public Types inherited from PackageEditorState
using Context = PackageEditorFsm::Context
 

Public Member Functions

 PackageEditorState_DrawTextBase ()=delete
 
 PackageEditorState_DrawTextBase (const PackageEditorState_DrawTextBase &other)=delete
 
 PackageEditorState_DrawTextBase (Context &context, Mode mode) noexcept
 
virtual ~PackageEditorState_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
 
PackageEditorState_DrawTextBaseoperator= (const PackageEditorState_DrawTextBase &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 (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMirror () noexcept
 
virtual bool processFlip () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processAbortCommand () noexcept
 
PackageEditorStateoperator= (const PackageEditorState &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 GraphicsLayerName &layerName) noexcept
 
void heightEditValueChanged (const PositiveLength &value) noexcept
 
void strokeWidthEditValueChanged (const UnsignedLength &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< CmdStrokeTextEditmEditCmd
 
StrokeTextmCurrentText
 
StrokeTextGraphicsItemmCurrentGraphicsItem
 
GraphicsLayerName mLastLayerName
 
Angle mLastRotation
 
PositiveLength mLastHeight
 
UnsignedLength mLastStrokeWidth
 
Alignment mLastAlignment
 
QString mLastText
 

Additional Inherited Members

- Protected Member Functions inherited from PackageEditorState
const PositiveLengthgetGridInterval () const noexcept
 
const LengthUnitgetDefaultLengthUnit () const noexcept
 
- Protected Attributes inherited from PackageEditorState
ContextmContext
 

Detailed Description

Member Enumeration Documentation

◆ Mode

enum Mode
strong
Enumerator
NAME 
VALUE 
TEXT 

Constructor & Destructor Documentation

◆ PackageEditorState_DrawTextBase() [1/3]

◆ PackageEditorState_DrawTextBase() [2/3]

◆ PackageEditorState_DrawTextBase() [3/3]

PackageEditorState_DrawTextBase ( Context context,
Mode  mode 
)
explicitnoexcept

◆ ~PackageEditorState_DrawTextBase()

~PackageEditorState_DrawTextBase ( )
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:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

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

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from PackageEditorState.

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

◆ processRotateCw()

bool processRotateCw ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

+ Here is the call graph for this function:

◆ processRotateCcw()

bool processRotateCcw ( )
overridevirtualnoexcept

Reimplemented from PackageEditorState.

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

◆ strokeWidthEditValueChanged()

void strokeWidthEditValueChanged ( const UnsignedLength 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 call graph for this function:
+ Here is the caller graph for this function:

◆ vAlignActionGroupValueChanged()

void vAlignActionGroupValueChanged ( const VAlign value)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mMode

Mode mMode
private

◆ mStartPos

Point mStartPos
private

◆ mEditCmd

QScopedPointer<CmdStrokeTextEdit> mEditCmd
private

◆ mCurrentText

StrokeText* mCurrentText
private

◆ mCurrentGraphicsItem

StrokeTextGraphicsItem* mCurrentGraphicsItem
private

◆ mLastLayerName

GraphicsLayerName mLastLayerName
private

◆ mLastRotation

Angle mLastRotation
private

◆ mLastHeight

PositiveLength mLastHeight
private

◆ mLastStrokeWidth

UnsignedLength mLastStrokeWidth
private

◆ mLastAlignment

Alignment mLastAlignment
private

◆ mLastText

QString mLastText
private

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