20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_ADDCOMPONENT_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_ADDCOMPONENT_H
44class ComponentInstance;
49class AddComponentDialog;
50class AttributeUnitComboBox;
51class CmdSymbolInstanceEditAll;
72 virtual
bool entry() noexcept override;
73 virtual
bool exit() noexcept override;
77 const QString& searchTerm = QString()) noexcept override;
79 const
Uuid& symbVar) noexcept override;
81 virtual
bool processMirror(Qt::Orientation orientation) noexcept override;
84 QGraphicsSceneMouseEvent& e) noexcept override;
86 QGraphicsSceneMouseEvent& e) noexcept override;
88 QGraphicsSceneMouseEvent& e) noexcept override;
90 QGraphicsSceneMouseEvent& e) noexcept override;
99 const
std::optional<
Uuid>& symbVar =
std::nullopt,
102 const QString& searchTerm = QString(),
bool keepValue = false);
109 static QString
toSingleLine(const QString& text) noexcept;
110 static QString
toMultiLine(const QString& text) noexcept;
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 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 AttributeUnitComboBox class.
Definition attributeunitcombobox.h:46
The CmdSymbolInstanceEditAll class.
Definition cmdsymbolinstanceeditall.h:51
The SchematicEditorState_AddComponent class.
Definition schematiceditorstate_addcomponent.h:60
virtual bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:228
QPointer< QComboBox > mValueComboBox
Definition schematiceditorstate_addcomponent.h:126
virtual ~SchematicEditorState_AddComponent() noexcept
Definition schematiceditorstate_addcomponent.cpp:82
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:338
static QString toSingleLine(const QString &text) noexcept
Definition schematiceditorstate_addcomponent.cpp:574
QPointer< QAction > mAttributeValueEditAction
Definition schematiceditorstate_addcomponent.h:128
SchematicEditorState_AddComponent(const SchematicEditorState_AddComponent &other)=delete
void updateAttributeToolbar() noexcept
Definition schematiceditorstate_addcomponent.cpp:547
Angle mLastAngle
Definition schematiceditorstate_addcomponent.h:116
virtual bool processAbortCommand() noexcept override
Definition schematiceditorstate_addcomponent.cpp:208
void valueChanged(QString text) noexcept
Definition schematiceditorstate_addcomponent.cpp:500
ComponentInstance * mCurrentComponent
Definition schematiceditorstate_addcomponent.h:120
std::shared_ptr< const Attribute > getToolbarAttribute() const noexcept
Definition schematiceditorstate_addcomponent.cpp:486
QPointer< AttributeUnitComboBox > mAttributeUnitComboBox
Definition schematiceditorstate_addcomponent.h:129
bool mUseAddComponentDialog
Definition schematiceditorstate_addcomponent.h:114
bool mLastMirrored
Definition schematiceditorstate_addcomponent.h:117
virtual bool processRotate(const Angle &rotation) noexcept override
Definition schematiceditorstate_addcomponent.cpp:183
QPointer< QAction > mAttributeUnitComboBoxAction
Definition schematiceditorstate_addcomponent.h:130
void attributeChanged() noexcept
Definition schematiceditorstate_addcomponent.cpp:507
void updateValueToolbar() noexcept
Definition schematiceditorstate_addcomponent.cpp:533
bool abortCommand(bool showErrMsgBox) noexcept
Definition schematiceditorstate_addcomponent.cpp:460
bool mIsUndoCmdActive
Definition schematiceditorstate_addcomponent.h:113
virtual bool processAddComponent(const QString &searchTerm=QString()) noexcept override
Definition schematiceditorstate_addcomponent.cpp:147
virtual bool exit() noexcept override
Definition schematiceditorstate_addcomponent.cpp:131
SchematicEditorState_AddComponent()=delete
int mCurrentSymbVarItemIndex
Definition schematiceditorstate_addcomponent.h:121
CmdSymbolInstanceEditAll * mCurrentSymbolEditCommand
Definition schematiceditorstate_addcomponent.h:123
virtual bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:316
virtual bool processMirror(Qt::Orientation orientation) noexcept override
Definition schematiceditorstate_addcomponent.cpp:195
QScopedPointer< AddComponentDialog > mAddComponentDialog
Definition schematiceditorstate_addcomponent.h:115
SI_Symbol * mCurrentSymbolToPlace
Definition schematiceditorstate_addcomponent.h:122
virtual bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:241
virtual bool entry() noexcept override
Definition schematiceditorstate_addcomponent.cpp:89
QPointer< QLineEdit > mAttributeValueEdit
Definition schematiceditorstate_addcomponent.h:127
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_addcomponent.cpp:309
static QString toMultiLine(const QString &text) noexcept
Definition schematiceditorstate_addcomponent.cpp:579
The schematic editor state base class.
Definition schematiceditorstate.h:57
Definition occmodel.cpp:76
FSM Context.
Definition schematiceditorfsm.h:81