20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWTEXTBASE_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWTEXTBASE_H
48class CmdStrokeTextEdit;
49class HAlignActionGroup;
51class StrokeTextGraphicsItem;
52class VAlignActionGroup;
66 enum class Mode { NAME, VALUE, TEXT };
77 bool entry() noexcept override;
78 bool exit() noexcept override;
80 const noexcept override;
84 QGraphicsSceneMouseEvent& e) noexcept override;
86 QGraphicsSceneMouseEvent& e) noexcept override;
88 QGraphicsSceneMouseEvent& e) noexcept override;
90 bool processMirror(Qt::Orientation orientation) noexcept override;
91 bool processFlip(Qt::Orientation orientation) noexcept override;
The Alignment class.
Definition: alignment.h:115
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
The HAlign class.
Definition: alignment.h:43
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The StrokeText class.
Definition: stroketext.h:51
The VAlign class.
Definition: alignment.h:79
The CmdStrokeTextEdit class.
Definition: cmdstroketextedit.h:51
The HAlignActionGroup class is a helper to add librepcb::HAlign chooser toolbuttons to a toolbar.
Definition: halignactiongroup.h:47
The LayerComboBox class.
Definition: layercombobox.h:47
The PackageEditorState_DrawTextBase class.
Definition: packageeditorstate_drawtextbase.h:61
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:202
PositiveLength mLastHeight
Definition: packageeditorstate_drawtextbase.h:122
QScopedPointer< CmdStrokeTextEdit > mEditCmd
Definition: packageeditorstate_drawtextbase.h:112
void vAlignActionGroupValueChanged(const VAlign &value) noexcept
Definition: packageeditorstate_drawtextbase.cpp:418
void hAlignActionGroupValueChanged(const HAlign &value) noexcept
Definition: packageeditorstate_drawtextbase.cpp:410
bool abortAddText() noexcept
Definition: packageeditorstate_drawtextbase.cpp:333
const Layer * mLastLayer
Definition: packageeditorstate_drawtextbase.h:120
QPointer< HAlignActionGroup > mHAlignActionGroup
Definition: packageeditorstate_drawtextbase.h:116
QString mLastText
Definition: packageeditorstate_drawtextbase.h:125
Mode
Definition: packageeditorstate_drawtextbase.h:66
void heightEditValueChanged(const PositiveLength &value) noexcept
Definition: packageeditorstate_drawtextbase.cpp:386
Mode mMode
Definition: packageeditorstate_drawtextbase.h:110
UnsignedLength mLastStrokeWidth
Definition: packageeditorstate_drawtextbase.h:123
bool finishAddText(const Point &pos) noexcept
Definition: packageeditorstate_drawtextbase.cpp:314
virtual ~PackageEditorState_DrawTextBase() noexcept
Definition: packageeditorstate_drawtextbase.cpp:68
PackageEditorState_DrawTextBase(const PackageEditorState_DrawTextBase &other)=delete
bool mLastMirrored
Definition: packageeditorstate_drawtextbase.h:126
void strokeWidthEditValueChanged(const UnsignedLength &value) noexcept
Definition: packageeditorstate_drawtextbase.cpp:394
bool processRotate(const Angle &rotation) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:232
void textComboBoxValueChanged(const QString &value) noexcept
Definition: packageeditorstate_drawtextbase.cpp:402
std::shared_ptr< StrokeText > mCurrentText
Definition: packageeditorstate_drawtextbase.h:113
QPointer< VAlignActionGroup > mVAlignActionGroup
Definition: packageeditorstate_drawtextbase.h:117
std::shared_ptr< StrokeTextGraphicsItem > mCurrentGraphicsItem
Definition: packageeditorstate_drawtextbase.h:114
Angle mLastRotation
Definition: packageeditorstate_drawtextbase.h:121
void layerComboBoxValueChanged(const Layer &layer) noexcept
Definition: packageeditorstate_drawtextbase.cpp:378
void resetToDefaultParameters() noexcept
Definition: packageeditorstate_drawtextbase.cpp:347
bool exit() noexcept override
Definition: packageeditorstate_drawtextbase.cpp:176
QPointer< LayerComboBox > mLayerComboBox
Definition: packageeditorstate_drawtextbase.h:115
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:226
Alignment mLastAlignment
Definition: packageeditorstate_drawtextbase.h:124
Point mStartPos
Definition: packageeditorstate_drawtextbase.h:111
bool processFlip(Qt::Orientation orientation) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:261
bool processMirror(Qt::Orientation orientation) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:243
PackageEditorState_DrawTextBase()=delete
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition: packageeditorstate_drawtextbase.cpp:189
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawtextbase.cpp:215
bool startAddText(const Point &pos) noexcept
Definition: packageeditorstate_drawtextbase.cpp:289
bool entry() noexcept override
Definition: packageeditorstate_drawtextbase.cpp:76
The PackageEditorState class is the base class of all package editor FSM states.
Definition: packageeditorstate.h:52
The StrokeTextGraphicsItem class is the graphical representation of a librepcb::StrokeText.
Definition: stroketextgraphicsitem.h:49
The VAlignActionGroup class is a helper to add librepcb::VAlign chooser toolbuttons to a toolbar.
Definition: valignactiongroup.h:47
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
Definition: packageeditorfsm.h:90