LibrePCB Developers Documentation
ComponentEditorWidget Class Referencefinal

The ComponentEditorWidget class. More...

#include <componenteditorwidget.h>

+ Inheritance diagram for ComponentEditorWidget:
+ Collaboration diagram for ComponentEditorWidget:

Public Slots

bool save () noexcept override
 
- Public Slots inherited from EditorWidgetBase
virtual bool save () noexcept
 
virtual bool cut () noexcept
 
virtual bool copy () noexcept
 
virtual bool paste () noexcept
 
virtual bool rotateCw () noexcept
 
virtual bool rotateCcw () noexcept
 
virtual bool mirror () noexcept
 
virtual bool flip () noexcept
 
virtual bool remove () noexcept
 
virtual bool zoomIn () noexcept
 
virtual bool zoomOut () noexcept
 
virtual bool zoomAll () noexcept
 
virtual bool abortCommand () noexcept
 
virtual bool editGridProperties () noexcept
 

Public Member Functions

 ComponentEditorWidget ()=delete
 
 ComponentEditorWidget (const ComponentEditorWidget &other)=delete
 
 ComponentEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~ComponentEditorWidget () noexcept
 
ComponentEditorWidgetoperator= (const ComponentEditorWidget &rhs)=delete
 
template<>
void fixMsg (const MsgNameNotTitleCase &msg)
 
template<>
void fixMsg (const MsgMissingAuthor &msg)
 
template<>
void fixMsg (const MsgMissingCategories &msg)
 
template<>
void fixMsg (const MsgMissingComponentDefaultValue &msg)
 
template<>
void fixMsg (const MsgMissingSymbolVariant &msg)
 
- Public Member Functions inherited from EditorWidgetBase
 EditorWidgetBase ()=delete
 
 EditorWidgetBase (const EditorWidgetBase &other)=delete
 
 EditorWidgetBase (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
virtual ~EditorWidgetBase () noexcept
 
const FilePathgetFilePath () const noexcept
 
bool isDirty () const noexcept
 
virtual bool hasGraphicalEditor () const noexcept
 
virtual bool supportsFlip () const noexcept
 
virtual void setUndoStackActionGroup (UndoStackActionGroup *group) noexcept
 
virtual void setToolsActionGroup (ExclusiveActionGroup *group) noexcept
 
virtual void setCommandToolBar (QToolBar *toolbar) noexcept
 
EditorWidgetBaseoperator= (const EditorWidgetBase &rhs)=delete
 
- Public Member Functions inherited from IF_ComponentSymbolVariantEditorProvider
 IF_ComponentSymbolVariantEditorProvider ()
 
 IF_ComponentSymbolVariantEditorProvider (const IF_ComponentSymbolVariantEditorProvider &other)=delete
 
virtual ~IF_ComponentSymbolVariantEditorProvider ()
 
IF_ComponentSymbolVariantEditorProvideroperator= (const IF_ComponentSymbolVariantEditorProvider &rhs)=delete
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
bool openComponentSymbolVariantEditor (ComponentSymbolVariant &variant) noexcept override
 
void memorizeComponentInterface () noexcept
 
bool isInterfaceBroken () const noexcept override
 
bool runChecks (LibraryElementCheckMessageList &msgs) const override
 
template<typename MessageType >
void fixMsg (const MessageType &msg)
 
template<typename MessageType >
bool fixMsgHelper (std::shared_ptr< const LibraryElementCheckMessage > msg, bool applyFix)
 
bool processCheckMessage (std::shared_ptr< const LibraryElementCheckMessage > msg, bool applyFix) override
 

Private Attributes

QScopedPointer< Ui::ComponentEditorWidget > mUi
 
QScopedPointer< ComponentCategoryListEditorWidgetmCategoriesEditorWidget
 
QSharedPointer< ComponentmComponent
 
bool mOriginalIsSchematicOnly
 
QSet< UuidmOriginalSignalUuids
 
ComponentSymbolVariantList mOriginalSymbolVariants
 

Additional Inherited Members

- Public Types inherited from EditorWidgetBase
enum  Tool
 
- Signals inherited from EditorWidgetBase
void dirtyChanged (bool dirty)
 
void elementEdited (const FilePath &fp)
 
void interfaceBrokenChanged (bool broken)
 
void errorsAvailableChanged (bool hasErrors)
 
void cursorPositionChanged (const Point &pos)
 
- Protected Member Functions inherited from EditorWidgetBase
void setupInterfaceBrokenWarningWidget (QWidget &widget) noexcept
 
void setupErrorNotificationWidget (QWidget &widget) noexcept
 
virtual bool toolChangeRequested (Tool newTool) noexcept
 
void undoStackStateModified () noexcept
 
const QStringList & getLibLocaleOrder () const noexcept
 
QString getWorkspaceSettingsUserName () noexcept
 
- Protected Member Functions inherited from IF_LibraryElementCheckHandler
 IF_LibraryElementCheckHandler () noexcept
 
 IF_LibraryElementCheckHandler (const IF_LibraryElementCheckHandler &) noexcept
 
virtual ~IF_LibraryElementCheckHandler () noexcept
 
- Protected Attributes inherited from EditorWidgetBase
Context mContext
 
FilePath mFilePath
 
std::shared_ptr< TransactionalFileSystemmFileSystem
 
QScopedPointer< UndoStackmUndoStack
 
UndoStackActionGroupmUndoStackActionGroup
 
ExclusiveActionGroupmToolsActionGroup
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mIsInterfaceBroken
 

Detailed Description

Constructor & Destructor Documentation

◆ ComponentEditorWidget() [1/3]

◆ ComponentEditorWidget() [2/3]

ComponentEditorWidget ( const ComponentEditorWidget other)
delete

◆ ComponentEditorWidget() [3/3]

ComponentEditorWidget ( const Context context,
const FilePath fp,
QWidget *  parent = nullptr 
)
+ Here is the call graph for this function:

◆ ~ComponentEditorWidget()

~ComponentEditorWidget ( )
noexcept

Member Function Documentation

◆ operator=()

ComponentEditorWidget& operator= ( const ComponentEditorWidget rhs)
delete

◆ save

bool save ( )
overrideslotnoexcept
+ Here is the call graph for this function:

◆ updateMetadata()

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

◆ commitMetadata()

QString commitMetadata ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openComponentSymbolVariantEditor()

bool openComponentSymbolVariantEditor ( ComponentSymbolVariant variant)
overrideprivatevirtualnoexcept

◆ memorizeComponentInterface()

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

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

+ Here is the call graph for this function:

◆ runChecks()

bool runChecks ( LibraryElementCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/6]

void fixMsg ( const MessageType &  msg)
private
+ Here is the caller graph for this function:

◆ fixMsgHelper()

bool fixMsgHelper ( std::shared_ptr< const LibraryElementCheckMessage msg,
bool  applyFix 
)
private
+ Here is the call graph for this function:

◆ processCheckMessage()

bool processCheckMessage ( std::shared_ptr< const LibraryElementCheckMessage msg,
bool  applyFix 
)
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [2/6]

void fixMsg ( const MsgNameNotTitleCase msg)
+ Here is the call graph for this function:

◆ fixMsg() [3/6]

void fixMsg ( const MsgMissingAuthor msg)
+ Here is the call graph for this function:

◆ fixMsg() [4/6]

void fixMsg ( const MsgMissingCategories msg)

◆ fixMsg() [5/6]

void fixMsg ( const MsgMissingComponentDefaultValue msg)
+ Here is the call graph for this function:

◆ fixMsg() [6/6]

void fixMsg ( const MsgMissingSymbolVariant msg)
+ Here is the call graph for this function:

Member Data Documentation

◆ mUi

QScopedPointer<Ui::ComponentEditorWidget> mUi
private

◆ mCategoriesEditorWidget

QScopedPointer<ComponentCategoryListEditorWidget> mCategoriesEditorWidget
private

◆ mComponent

QSharedPointer<Component> mComponent
private

◆ mOriginalIsSchematicOnly

bool mOriginalIsSchematicOnly
private

◆ mOriginalSignalUuids

QSet<Uuid> mOriginalSignalUuids
private

◆ mOriginalSymbolVariants

ComponentSymbolVariantList mOriginalSymbolVariants
private

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