LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SchematicEditorState_AddComponent Class Referencefinal

The SchematicEditorState_AddComponent class. More...

#include <schematiceditorstate_addcomponent.h>

+ Inheritance diagram for SchematicEditorState_AddComponent:
+ Collaboration diagram for SchematicEditorState_AddComponent:

Public Member Functions

 SchematicEditorState_AddComponent ()=delete
 
 SchematicEditorState_AddComponent (const SchematicEditorState_AddComponent &other)=delete
 
 SchematicEditorState_AddComponent (const Context &context) noexcept
 
virtual ~SchematicEditorState_AddComponent () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processAddComponent (const QString &searchTerm=QString()) noexcept override
 
virtual bool processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept override
 
virtual bool processRotate (const Angle &rotation) noexcept override
 
virtual bool processMirror (Qt::Orientation orientation) noexcept override
 
virtual bool processAbortCommand () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
SchematicEditorState_AddComponentoperator= (const SchematicEditorState_AddComponent &rhs)=delete
 
- Public Member Functions inherited from SchematicEditorState
 SchematicEditorState ()=delete
 
 SchematicEditorState (const SchematicEditorState &other)=delete
 
 SchematicEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~SchematicEditorState () noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta) noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processKeyPressed (const QKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const QKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSwitchToSchematicPage (int index) noexcept
 
SchematicEditorStateoperator= (const SchematicEditorState &rhs)=delete
 

Private Member Functions

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)
 
bool abortCommand (bool showErrMsgBox) noexcept
 
std::shared_ptr< const AttributegetToolbarAttribute () const noexcept
 
void valueChanged (QString text) noexcept
 
void attributeChanged () noexcept
 
void updateValueToolbar () noexcept
 
void updateAttributeToolbar () noexcept
 

Static Private Member Functions

static QString toSingleLine (const QString &text) noexcept
 
static QString toMultiLine (const QString &text) noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
bool mUseAddComponentDialog
 
QScopedPointer< AddComponentDialogmAddComponentDialog
 
Angle mLastAngle
 
bool mLastMirrored
 
ComponentInstancemCurrentComponent
 
int mCurrentSymbVarItemIndex
 
SI_SymbolmCurrentSymbolToPlace
 
CmdSymbolInstanceEditAllmCurrentSymbolEditCommand
 
QPointer< QComboBox > mValueComboBox
 
QPointer< QLineEdit > mAttributeValueEdit
 
QPointer< QAction > mAttributeValueEditAction
 
QPointer< AttributeUnitComboBoxmAttributeUnitComboBox
 
QPointer< QAction > mAttributeUnitComboBoxAction
 

Additional Inherited Members

- Public Types inherited from SchematicEditorState
enum class  FindFlag
 
using Context = SchematicEditorFsm::Context
 
- Signals inherited from SchematicEditorState
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from SchematicEditorState
SchematicgetActiveSchematic () noexcept
 
SchematicGraphicsScenegetActiveSchematicScene () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
void abortBlockingToolsInOtherEditors () noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
- Static Protected Member Functions inherited from SchematicEditorState
static const QSet< const Layer * > & getAllowedGeometryLayers () noexcept
 
- Protected Attributes inherited from SchematicEditorState
Context mContext
 

Detailed Description

Constructor & Destructor Documentation

◆ SchematicEditorState_AddComponent() [1/3]

◆ SchematicEditorState_AddComponent() [2/3]

◆ SchematicEditorState_AddComponent() [3/3]

SchematicEditorState_AddComponent ( const Context context)
explicitnoexcept

◆ ~SchematicEditorState_AddComponent()

~SchematicEditorState_AddComponent ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processAddComponent() [1/2]

bool processAddComponent ( const QString &  searchTerm = QString())
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processAddComponent() [2/2]

bool processAddComponent ( const Uuid cmp,
const Uuid symbVar 
)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ operator=()

◆ startAddingComponent()

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 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ abortCommand()

bool abortCommand ( bool  showErrMsgBox)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getToolbarAttribute()

std::shared_ptr< const Attribute > getToolbarAttribute ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ valueChanged()

void valueChanged ( QString  text)
privatenoexcept
+ Here is the caller graph for this function:

◆ attributeChanged()

void attributeChanged ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateValueToolbar()

void updateValueToolbar ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAttributeToolbar()

void updateAttributeToolbar ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toSingleLine()

QString toSingleLine ( const QString &  text)
staticprivatenoexcept
+ Here is the caller graph for this function:

◆ toMultiLine()

QString toMultiLine ( const QString &  text)
staticprivatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mUseAddComponentDialog

bool mUseAddComponentDialog
private

◆ mAddComponentDialog

QScopedPointer<AddComponentDialog> mAddComponentDialog
private

◆ mLastAngle

Angle mLastAngle
private

◆ mLastMirrored

bool mLastMirrored
private

◆ mCurrentComponent

ComponentInstance* mCurrentComponent
private

◆ mCurrentSymbVarItemIndex

int mCurrentSymbVarItemIndex
private

◆ mCurrentSymbolToPlace

SI_Symbol* mCurrentSymbolToPlace
private

◆ mCurrentSymbolEditCommand

CmdSymbolInstanceEditAll* mCurrentSymbolEditCommand
private

◆ mValueComboBox

QPointer<QComboBox> mValueComboBox
private

◆ mAttributeValueEdit

QPointer<QLineEdit> mAttributeValueEdit
private

◆ mAttributeValueEditAction

QPointer<QAction> mAttributeValueEditAction
private

◆ mAttributeUnitComboBox

QPointer<AttributeUnitComboBox> mAttributeUnitComboBox
private

◆ mAttributeUnitComboBoxAction

QPointer<QAction> mAttributeUnitComboBoxAction
private

The documentation for this class was generated from the following files: