LibrePCB Developers Documentation
BoardEditorState_AddStrokeText Class Referencefinal

The "add stroke text" state/tool of the board editor. More...

#include <boardeditorstate_addstroketext.h>

+ Inheritance diagram for BoardEditorState_AddStrokeText:
+ Collaboration diagram for BoardEditorState_AddStrokeText:

Public Member Functions

 BoardEditorState_AddStrokeText ()=delete
 
 BoardEditorState_AddStrokeText (const BoardEditorState_AddStrokeText &other)=delete
 
 BoardEditorState_AddStrokeText (const Context &context) noexcept
 
virtual ~BoardEditorState_AddStrokeText () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processRotate (const Angle &rotation) noexcept override
 
virtual bool processFlip (Qt::Orientation orientation) noexcept override
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
BoardEditorState_AddStrokeTextoperator= (const BoardEditorState_AddStrokeText &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 entry () noexcept
 
virtual bool exit () 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 processAbortCommand () 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 processSwitchToBoard (int index) noexcept
 
BoardEditorStateoperator= (const BoardEditorState &rhs)=delete
 

Private Member Functions

bool addText (const Point &pos) noexcept
 
bool rotateText (const Angle &angle) noexcept
 
bool flipText (Qt::Orientation orientation) noexcept
 
bool updatePosition (const Point &pos) noexcept
 
bool fixPosition (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 
void layerComboBoxLayerChanged (const Layer &layer) noexcept
 
void textComboBoxValueChanged (const QString &value) noexcept
 
void heightEditValueChanged (const PositiveLength &value) noexcept
 
void mirrorCheckBoxToggled (bool checked) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
const LayermLastLayer
 
Angle mLastRotation
 
PositiveLength mLastHeight
 
UnsignedLength mLastStrokeWidth
 
Alignment mLastAlignment
 
QString mLastText
 
bool mLastMirrored
 
BI_StrokeTextmCurrentTextToPlace
 
QScopedPointer< CmdBoardStrokeTextEditmCurrentTextEditCmd
 
QPointer< LayerComboBoxmLayerComboBox
 
QPointer< QCheckBox > mMirrorCheckBox
 

Additional Inherited Members

- Public Types inherited from BoardEditorState
enum class  FindFlag
 
using Context = BoardEditorFsm::Context
 
- Signals inherited from BoardEditorState
void requestLeavingState ()
 Signal to indicate that the current tool should be exited. More...
 
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from BoardEditorState
BoardgetActiveBoard () noexcept
 
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 tl::optional< const Layer & > cuLayer=tl::nullopt, 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 tl::optional< const Layer & > cuLayer=tl::nullopt, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
- Protected Attributes inherited from BoardEditorState
Context mContext
 

Detailed Description

The "add stroke text" state/tool of the board editor.

Constructor & Destructor Documentation

◆ BoardEditorState_AddStrokeText() [1/3]

◆ BoardEditorState_AddStrokeText() [2/3]

◆ BoardEditorState_AddStrokeText() [3/3]

BoardEditorState_AddStrokeText ( const Context context)
explicitnoexcept

◆ ~BoardEditorState_AddStrokeText()

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

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ processFlip()

bool processFlip ( Qt::Orientation  orientation)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ operator=()

◆ addText()

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

◆ rotateText()

bool rotateText ( const Angle angle)
privatenoexcept

◆ flipText()

bool flipText ( Qt::Orientation  orientation)
privatenoexcept

◆ updatePosition()

bool updatePosition ( const Point pos)
privatenoexcept

◆ fixPosition()

bool fixPosition ( 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:

◆ layerComboBoxLayerChanged()

void layerComboBoxLayerChanged ( const Layer layer)
privatenoexcept
+ Here is the caller graph for this function:

◆ textComboBoxValueChanged()

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

◆ heightEditValueChanged()

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

◆ mirrorCheckBoxToggled()

void mirrorCheckBoxToggled ( bool  checked)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mLastLayer

const Layer* mLastLayer
private

◆ mLastRotation

Angle mLastRotation
private

◆ mLastHeight

PositiveLength mLastHeight
private

◆ mLastStrokeWidth

UnsignedLength mLastStrokeWidth
private

◆ mLastAlignment

Alignment mLastAlignment
private

◆ mLastText

QString mLastText
private

◆ mLastMirrored

bool mLastMirrored
private

◆ mCurrentTextToPlace

BI_StrokeText* mCurrentTextToPlace
private

◆ mCurrentTextEditCmd

QScopedPointer<CmdBoardStrokeTextEdit> mCurrentTextEditCmd
private

◆ mLayerComboBox

QPointer<LayerComboBox> mLayerComboBox
private

◆ mMirrorCheckBox

QPointer<QCheckBox> mMirrorCheckBox
private

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