20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWTEXTBASE_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWTEXTBASE_H
40class CmdStrokeTextEdit;
42class StrokeTextGraphicsItem;
67 bool entry() noexcept override;
68 bool exit() noexcept override;
78 bool processMirror(Qt::Orientation orientation) noexcept override;
79 bool processFlip(Qt::Orientation orientation) noexcept override;
90 void setText(
const QString& text)
noexcept;
const HAlign & getH() const noexcept
Definition alignment.h:124
const VAlign & getV() const noexcept
Definition alignment.h:125
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
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:78
The StrokeText class.
Definition stroketext.h:51
const PositiveLength & getHeight() const noexcept
Definition stroketext.h:92
const Layer & getLayer() const noexcept
Definition stroketext.h:89
const Alignment & getAlign() const noexcept
Definition stroketext.h:100
const QString & getText() const noexcept
Definition stroketext.h:104
const UnsignedLength & getStrokeWidth() const noexcept
Definition stroketext.h:93
The VAlign class.
Definition alignment.h:79
The CmdStrokeTextEdit class.
Definition cmdstroketextedit.h:51
The PackageEditorState_DrawTextBase class.
Definition packageeditorstate_drawtextbase.h:51
void vAlignChanged(const VAlign &align)
const VAlign & getVAlign() const noexcept
Definition packageeditorstate_drawtextbase.h:104
const HAlign & getHAlign() const noexcept
Definition packageeditorstate_drawtextbase.h:100
void hAlignChanged(const HAlign &align)
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_drawtextbase.cpp:109
std::unique_ptr< CmdStrokeTextEdit > mCurrentEditCmd
Definition packageeditorstate_drawtextbase.h:135
bool abortAddText() noexcept
Definition packageeditorstate_drawtextbase.cpp:325
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_drawtextbase.cpp:131
void setLayer(const Layer &layer) noexcept
Definition packageeditorstate_drawtextbase.cpp:194
void setText(const QString &text) noexcept
Definition packageeditorstate_drawtextbase.cpp:204
Mode
Definition packageeditorstate_drawtextbase.h:56
Mode mMode
Definition packageeditorstate_drawtextbase.h:131
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_drawtextbase.cpp:121
QStringList getTextSuggestions() const noexcept
Definition packageeditorstate_drawtextbase.cpp:214
const PositiveLength & getHeight() const noexcept
Definition packageeditorstate_drawtextbase.h:92
bool finishAddText(const Point &pos) noexcept
Definition packageeditorstate_drawtextbase.cpp:306
const Layer & getLayer() const noexcept
Definition packageeditorstate_drawtextbase.h:83
virtual ~PackageEditorState_DrawTextBase() noexcept
Definition packageeditorstate_drawtextbase.cpp:68
PackageEditorState_DrawTextBase(const PackageEditorState_DrawTextBase &other)=delete
void heightChanged(const PositiveLength &height)
QSet< const Layer * > getAvailableLayers() const noexcept
Definition packageeditorstate_drawtextbase.cpp:189
bool processRotate(const Angle &rotation) noexcept override
Definition packageeditorstate_drawtextbase.cpp:137
void strokeWidthChanged(const UnsignedLength &width)
const QString & getText() const noexcept
Definition packageeditorstate_drawtextbase.h:87
std::shared_ptr< StrokeText > mCurrentText
Definition packageeditorstate_drawtextbase.h:136
void setVAlign(const VAlign &align) noexcept
Definition packageeditorstate_drawtextbase.cpp:265
PackageEditorState_DrawTextBase & operator=(const PackageEditorState_DrawTextBase &rhs)=delete
std::shared_ptr< StrokeTextGraphicsItem > mCurrentGraphicsItem
Definition packageeditorstate_drawtextbase.h:137
void resetToDefaultParameters() noexcept
Definition packageeditorstate_drawtextbase.cpp:339
void setStrokeWidth(const UnsignedLength &width) noexcept
Definition packageeditorstate_drawtextbase.cpp:243
bool exit() noexcept override
Definition packageeditorstate_drawtextbase.cpp:94
StrokeText mCurrentProperties
Definition packageeditorstate_drawtextbase.h:132
const UnsignedLength & getStrokeWidth() const noexcept
Definition packageeditorstate_drawtextbase.h:96
Point mStartPos
Definition packageeditorstate_drawtextbase.h:134
bool processFlip(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_drawtextbase.cpp:164
bool processMirror(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_drawtextbase.cpp:148
PackageEditorState_DrawTextBase()=delete
void textChanged(const QString &text)
void setHeight(const PositiveLength &height) noexcept
Definition packageeditorstate_drawtextbase.cpp:232
void layerChanged(const Layer &layer)
void setHAlign(const HAlign &align) noexcept
Definition packageeditorstate_drawtextbase.cpp:254
bool startAddText(const Point &pos) noexcept
Definition packageeditorstate_drawtextbase.cpp:280
bool entry() noexcept override
Definition packageeditorstate_drawtextbase.cpp:76
virtual void notifyToolEnter() noexcept=0
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
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
Definition graphicsscene.h:45
Definition packageeditorfsm.h:89