20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_ADDCOMPONENT_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_ADDCOMPONENT_H
43class ComponentInstance;
48class AddComponentDialog;
49class CmdSymbolInstanceEditAll;
70 virtual
bool entry() noexcept override;
71 virtual
bool exit() noexcept override;
75 const QString& searchTerm = QString()) noexcept override;
77 const
Uuid& symbVar) noexcept override;
79 virtual
bool processMirror(Qt::Orientation orientation) noexcept override;
92 void setValue(
const QString& value)
noexcept;
130 const std::optional<Uuid>& cmp = std::nullopt,
131 const std::optional<Uuid>& symbVar = std::nullopt,
132 const std::optional<librepcb::ComponentAssemblyOptionList>& options =
134 const QString& searchTerm = QString(),
bool keepValue =
false);
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The Attribute class.
Definition attribute.h:46
The AttributeType class.
Definition attributetype.h:42
Type_t getType() const noexcept
Definition attributetype.h:67
The AttributeUnit class.
Definition attributeunit.h:40
The ComponentInstance class.
Definition componentinstance.h:54
The SI_Symbol class.
Definition si_symbol.h:54
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The AddComponentDialog class.
Definition addcomponentdialog.h:73
The CmdSymbolInstanceEditAll class.
Definition cmdsymbolinstanceeditall.h:51
The SchematicEditorState_AddComponent class.
Definition schematiceditorstate_addcomponent.h:58
virtual ~SchematicEditorState_AddComponent() noexcept
Definition schematiceditorstate_addcomponent.cpp:77
virtual bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:198
void startAddingComponent(const std::optional< Uuid > &cmp=std::nullopt, const std::optional< Uuid > &symbVar=std::nullopt, const std::optional< librepcb::ComponentAssemblyOptionList > &options=std::nullopt, const QString &searchTerm=QString(), bool keepValue=false)
Definition schematiceditorstate_addcomponent.cpp:384
void setValue(const QString &value) noexcept
Definition schematiceditorstate_addcomponent.cpp:305
virtual bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:284
void valueAttributeValueChanged(const std::optional< QString > &value)
void setValueAttributeValue(const QString &value) noexcept
Definition schematiceditorstate_addcomponent.cpp:354
SchematicEditorState_AddComponent(const SchematicEditorState_AddComponent &other)=delete
virtual bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:211
void setValueAttributeUnit(const AttributeUnit *unit) noexcept
Definition schematiceditorstate_addcomponent.cpp:367
const AttributeType * getValueAttributeType() const noexcept
Definition schematiceditorstate_addcomponent.h:101
std::optional< QString > getValueAttributeValue() const noexcept
Definition schematiceditorstate_addcomponent.h:105
void valueSuggestionsChanged(const QStringList &suggestions)
QString mCurrentValue
Definition schematiceditorstate_addcomponent.h:146
virtual bool processAbortCommand() noexcept override
Definition schematiceditorstate_addcomponent.cpp:177
ComponentInstance * mCurrentComponent
Definition schematiceditorstate_addcomponent.h:151
bool mUseAddComponentDialog
Definition schematiceditorstate_addcomponent.h:140
void applyValueAndAttributeToComponent() noexcept
Definition schematiceditorstate_addcomponent.cpp:549
virtual bool processRotate(const Angle &rotation) noexcept override
Definition schematiceditorstate_addcomponent.cpp:152
SchematicEditorState_AddComponent & operator=(const SchematicEditorState_AddComponent &rhs)=delete
void valueChanged(const QString &value)
const QStringList & getValueSuggestions() const noexcept
Definition schematiceditorstate_addcomponent.h:93
std::optional< AttributeKey > getValueAttributeKey() const noexcept
Definition schematiceditorstate_addcomponent.h:96
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:277
bool abortCommand(bool showErrMsgBox) noexcept
Definition schematiceditorstate_addcomponent.cpp:523
Angle mCurrentAngle
Definition schematiceditorstate_addcomponent.h:144
const QString & getValue() const noexcept
Definition schematiceditorstate_addcomponent.h:91
const AttributeUnit * getValueAttributeUnit() const noexcept
Definition schematiceditorstate_addcomponent.h:111
bool mIsUndoCmdActive
Definition schematiceditorstate_addcomponent.h:139
void valueAttributeUnitChanged(const AttributeUnit *unit)
virtual bool processAddComponent(const QString &searchTerm=QString()) noexcept override
Definition schematiceditorstate_addcomponent.cpp:114
bool mCurrentMirrored
Definition schematiceditorstate_addcomponent.h:145
QStringList mCurrentValueSuggestions
Definition schematiceditorstate_addcomponent.h:147
virtual bool exit() noexcept override
Definition schematiceditorstate_addcomponent.cpp:99
SchematicEditorState_AddComponent()=delete
void valueAttributeKeyChanged(const std::optional< AttributeKey > &key)
int mCurrentSymbVarItemIndex
Definition schematiceditorstate_addcomponent.h:152
CmdSymbolInstanceEditAll * mCurrentSymbolEditCommand
Definition schematiceditorstate_addcomponent.h:154
virtual bool processMirror(Qt::Orientation orientation) noexcept override
Definition schematiceditorstate_addcomponent.cpp:164
void valueAttributeTypeChanged(const AttributeType *type)
QScopedPointer< AddComponentDialog > mAddComponentDialog
Definition schematiceditorstate_addcomponent.h:141
SI_Symbol * mCurrentSymbolToPlace
Definition schematiceditorstate_addcomponent.h:153
std::optional< Attribute > mCurrentValueAttribute
Definition schematiceditorstate_addcomponent.h:148
virtual bool entry() noexcept override
Definition schematiceditorstate_addcomponent.cpp:84
The schematic editor state base class.
Definition schematiceditorstate.h:58
Definition occmodel.cpp:77
Definition graphicsscene.h:45
FSM Context.
Definition schematiceditorfsm.h:62