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 selectAll () noexcept
 
virtual bool cut () noexcept
 
virtual bool copy () noexcept
 
virtual bool paste () noexcept
 
virtual bool move (Qt::ArrowType direction) noexcept
 
virtual bool rotate (const librepcb::Angle &rotation) noexcept
 
virtual bool mirror (Qt::Orientation orientation) noexcept
 
virtual bool flip (Qt::Orientation orientation) noexcept
 
virtual bool moveAlign () noexcept
 
virtual bool snapToGrid () noexcept
 
virtual bool remove () noexcept
 
virtual bool editProperties () noexcept
 
virtual bool zoomIn () noexcept
 
virtual bool zoomOut () noexcept
 
virtual bool zoomAll () noexcept
 
virtual bool toggle3D () noexcept
 
virtual bool abortCommand () noexcept
 
virtual bool processGenerateOutline () noexcept
 
virtual bool processGenerateCourtyard () noexcept
 
virtual bool importDxf () noexcept
 
virtual bool exportImage () noexcept
 
virtual bool exportPdf () noexcept
 
virtual bool print () noexcept
 
virtual bool editGridProperties () noexcept
 
virtual bool increaseGridInterval () noexcept
 
virtual bool decreaseGridInterval () noexcept
 
virtual bool toggleBackgroundImage () noexcept
 

Public Member Functions

 ComponentEditorWidget ()=delete
 
 ComponentEditorWidget (const ComponentEditorWidget &other)=delete
 
 ComponentEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~ComponentEditorWidget () noexcept
 
QSet< FeaturegetAvailableFeatures () const noexcept override
 
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)
 
template<>
void fixMsg (const MsgNonFunctionalComponentSignalInversionSign &msg)
 
template<>
void fixMsg (const MsgNoPinsInSymbolVariantConnected &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 isBackgroundImageSet () const noexcept
 
virtual QSet< FeaturegetAvailableFeatures () const noexcept=0
 
virtual void connectEditor (UndoStackActionGroup &undoStackActionGroup, ExclusiveActionGroup &toolsActionGroup, QToolBar &commandToolBar, StatusBar &statusBar) noexcept
 
virtual void disconnectEditor () 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 ()
 
virtual bool openComponentSymbolVariantEditor (std::shared_ptr< ComponentSymbolVariant > variant) noexcept=0
 
IF_ComponentSymbolVariantEditorProvideroperator= (const IF_ComponentSymbolVariantEditorProvider &rhs)=delete
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
bool openComponentSymbolVariantEditor (std::shared_ptr< ComponentSymbolVariant > variant) noexcept override
 
void memorizeComponentInterface () noexcept
 
bool isInterfaceBroken () const noexcept override
 
bool runChecks (RuleCheckMessageList &msgs) const override
 
template<typename MessageType >
void fixMsg (const MessageType &msg)
 
template<typename MessageType >
bool fixMsgHelper (std::shared_ptr< const RuleCheckMessage > msg, bool applyFix)
 
bool processRuleCheckMessage (std::shared_ptr< const RuleCheckMessage > msg, bool applyFix) override
 
void ruleCheckApproveRequested (std::shared_ptr< const RuleCheckMessage > msg, bool approve) noexcept override
 

Private Attributes

QScopedPointer< Ui::ComponentEditorWidget > mUi
 
QScopedPointer< CategoryListEditorWidgetmCategoriesEditorWidget
 
std::shared_ptr< ComponentmComponent
 
bool mOriginalIsSchematicOnly
 
QSet< UuidmOriginalSignalUuids
 
ComponentSymbolVariantList mOriginalSymbolVariants
 

Additional Inherited Members

- Public Types inherited from EditorWidgetBase
enum  Tool
 
enum class  Feature
 
- Signals inherited from EditorWidgetBase
void dirtyChanged (bool dirty)
 
void elementEdited (const librepcb::FilePath &fp)
 
void interfaceBrokenChanged (bool broken)
 
void errorsAvailableChanged (bool hasErrors)
 
void availableFeaturesChanged (const QSet< librepcb::editor::EditorWidgetBase::Feature > &features)
 
- Protected Member Functions inherited from EditorWidgetBase
void setupInterfaceBrokenWarningWidget (QWidget &widget) noexcept
 
void setupErrorNotificationWidget (QWidget &widget) noexcept
 
virtual bool isInterfaceBroken () const noexcept=0
 
virtual bool toolChangeRequested (Tool newTool, const QVariant &mode) noexcept
 
virtual bool runChecks (RuleCheckMessageList &msgs) const =0
 
void setMessageApproved (LibraryBaseElement &element, std::shared_ptr< const RuleCheckMessage > msg, bool approve) noexcept
 
virtual bool execGraphicsExportDialog (GraphicsExportDialog::Output output, const QString &settingsKey) noexcept
 
void undoStackStateModified () noexcept
 
void setStatusBarMessage (const QString &message, int timeoutMs=-1) noexcept
 
const QStringList & getLibLocaleOrder () const noexcept
 
QString getWorkspaceSettingsUserName () noexcept
 
- Protected Member Functions inherited from IF_RuleCheckHandler
 IF_RuleCheckHandler () noexcept
 
 IF_RuleCheckHandler (const IF_RuleCheckHandler &) noexcept
 
virtual ~IF_RuleCheckHandler () noexcept
 
virtual bool ruleCheckFixAvailable (std::shared_ptr< const RuleCheckMessage > msg) noexcept=0
 
virtual void ruleCheckFixRequested (std::shared_ptr< const RuleCheckMessage > msg) noexcept=0
 
virtual void ruleCheckDescriptionRequested (std::shared_ptr< const RuleCheckMessage > msg) noexcept=0
 
virtual void ruleCheckApproveRequested (std::shared_ptr< const RuleCheckMessage > msg, bool approve) noexcept=0
 
virtual void ruleCheckMessageSelected (std::shared_ptr< const RuleCheckMessage > msg) noexcept=0
 
virtual void ruleCheckMessageDoubleClicked (std::shared_ptr< const RuleCheckMessage > msg) noexcept=0
 
- Protected Attributes inherited from EditorWidgetBase
Context mContext
 
FilePath mFilePath
 
std::shared_ptr< TransactionalFileSystemmFileSystem
 
QScopedPointer< UndoStackmUndoStack
 
UndoStackActionGroupmUndoStackActionGroup
 
ExclusiveActionGroupmToolsActionGroup
 
StatusBarmStatusBar
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mManualModificationsMade
 Modifications bypassing the undo stack. More...
 
bool mIsInterfaceBroken
 
QString mStatusBarMessage
 
QSet< SExpressionmSupportedApprovals
 
QSet< SExpressionmDisappearedApprovals
 

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 
)

◆ ~ComponentEditorWidget()

~ComponentEditorWidget ( )
noexcept

Member Function Documentation

◆ getAvailableFeatures()

QSet< EditorWidgetBase::Feature > getAvailableFeatures ( ) const
overridevirtualnoexcept

Implements EditorWidgetBase.

◆ operator=()

ComponentEditorWidget & operator= ( const ComponentEditorWidget rhs)
delete

◆ save

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

◆ updateMetadata()

void updateMetadata ( )
privatenoexcept

◆ commitMetadata()

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

◆ openComponentSymbolVariantEditor()

bool openComponentSymbolVariantEditor ( std::shared_ptr< ComponentSymbolVariant variant)
overrideprivatevirtualnoexcept

Implements IF_ComponentSymbolVariantEditorProvider.

+ Here is the call graph for this function:

◆ memorizeComponentInterface()

void memorizeComponentInterface ( )
privatenoexcept

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

+ Here is the call graph for this function:

◆ runChecks()

bool runChecks ( RuleCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/8]

void fixMsg ( const MessageType &  msg)
private

◆ fixMsgHelper()

bool fixMsgHelper ( std::shared_ptr< const RuleCheckMessage msg,
bool  applyFix 
)
private

◆ processRuleCheckMessage()

bool processRuleCheckMessage ( std::shared_ptr< const RuleCheckMessage msg,
bool  applyFix 
)
overrideprivatevirtual

Implements EditorWidgetBase.

◆ ruleCheckApproveRequested()

void ruleCheckApproveRequested ( std::shared_ptr< const RuleCheckMessage msg,
bool  approve 
)
overrideprivatevirtualnoexcept

Implements IF_RuleCheckHandler.

◆ fixMsg() [2/8]

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

◆ fixMsg() [3/8]

void fixMsg ( const MsgMissingAuthor msg)

◆ fixMsg() [4/8]

void fixMsg ( const MsgMissingCategories msg)

◆ fixMsg() [5/8]

void fixMsg ( const MsgMissingComponentDefaultValue msg)

◆ fixMsg() [6/8]

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

◆ fixMsg() [7/8]

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

◆ fixMsg() [8/8]

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

Member Data Documentation

◆ mUi

QScopedPointer<Ui::ComponentEditorWidget> mUi
private

◆ mCategoriesEditorWidget

QScopedPointer<CategoryListEditorWidget> mCategoriesEditorWidget
private

◆ mComponent

std::shared_ptr<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: