20#ifndef LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWTEXTBASE_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWTEXTBASE_H
41class TextGraphicsItem;
66 bool entry() noexcept override;
67 bool exit() noexcept override;
77 bool processMirror(Qt::Orientation orientation) noexcept override;
88 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 Text class.
Definition text.h:48
const PositiveLength & getHeight() const noexcept
Definition text.h:80
const Layer & getLayer() const noexcept
Definition text.h:77
const Alignment & getAlign() const noexcept
Definition text.h:81
const QString & getText() const noexcept
Definition text.h:82
The VAlign class.
Definition alignment.h:79
The CmdTextEdit class.
Definition cmdtextedit.h:51
The SymbolEditorState_DrawTextBase class.
Definition symboleditorstate_drawtextbase.h:50
void vAlignChanged(const VAlign &align)
const VAlign & getVAlign() const noexcept
Definition symboleditorstate_drawtextbase.h:98
const HAlign & getHAlign() const noexcept
Definition symboleditorstate_drawtextbase.h:94
void hAlignChanged(const HAlign &align)
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawtextbase.cpp:102
SymbolEditorState_DrawTextBase(const SymbolEditorState_DrawTextBase &other)=delete
bool abortAddText() noexcept
Definition symboleditorstate_drawtextbase.cpp:285
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawtextbase.cpp:123
void setLayer(const Layer &layer) noexcept
Definition symboleditorstate_drawtextbase.cpp:164
void setText(const QString &text) noexcept
Definition symboleditorstate_drawtextbase.cpp:174
Mode
Definition symboleditorstate_drawtextbase.h:55
SymbolEditorState_DrawTextBase & operator=(const SymbolEditorState_DrawTextBase &rhs)=delete
Mode mMode
Definition symboleditorstate_drawtextbase.h:124
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawtextbase.cpp:113
SymbolEditorState_DrawTextBase()=delete
QStringList getTextSuggestions() const noexcept
Definition symboleditorstate_drawtextbase.cpp:184
const PositiveLength & getHeight() const noexcept
Definition symboleditorstate_drawtextbase.h:90
std::shared_ptr< Text > mCurrentText
Definition symboleditorstate_drawtextbase.h:129
bool finishAddText(const Point &pos) noexcept
Definition symboleditorstate_drawtextbase.cpp:266
const Layer & getLayer() const noexcept
Definition symboleditorstate_drawtextbase.h:81
std::shared_ptr< TextGraphicsItem > mCurrentGraphicsItem
Definition symboleditorstate_drawtextbase.h:130
std::unique_ptr< CmdTextEdit > mCurrentEditCmd
Definition symboleditorstate_drawtextbase.h:128
void heightChanged(const PositiveLength &height)
QSet< const Layer * > getAvailableLayers() const noexcept
Definition symboleditorstate_drawtextbase.cpp:159
bool processRotate(const Angle &rotation) noexcept override
Definition symboleditorstate_drawtextbase.cpp:129
const QString & getText() const noexcept
Definition symboleditorstate_drawtextbase.h:85
void setVAlign(const VAlign &align) noexcept
Definition symboleditorstate_drawtextbase.cpp:225
void resetToDefaultParameters() noexcept
Definition symboleditorstate_drawtextbase.cpp:299
bool exit() noexcept override
Definition symboleditorstate_drawtextbase.cpp:87
virtual ~SymbolEditorState_DrawTextBase() noexcept
Definition symboleditorstate_drawtextbase.cpp:62
Point mStartPos
Definition symboleditorstate_drawtextbase.h:127
bool processMirror(Qt::Orientation orientation) noexcept override
Definition symboleditorstate_drawtextbase.cpp:140
void textChanged(const QString &text)
void setHeight(const PositiveLength &height) noexcept
Definition symboleditorstate_drawtextbase.cpp:203
void layerChanged(const Layer &layer)
void setHAlign(const HAlign &align) noexcept
Definition symboleditorstate_drawtextbase.cpp:214
bool startAddText(const Point &pos) noexcept
Definition symboleditorstate_drawtextbase.cpp:240
bool entry() noexcept override
Definition symboleditorstate_drawtextbase.cpp:70
Text mCurrentProperties
Definition symboleditorstate_drawtextbase.h:125
virtual void notifyToolEnter() noexcept=0
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition symboleditorstate.h:56
The TextGraphicsItem class is the graphical representation of a librepcb::Text.
Definition textgraphicsitem.h:49
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
Definition graphicsscene.h:45
Definition symboleditorfsm.h:75