LibrePCB Developers Documentation
SymbolEditorWidget Class Referencefinal

The SymbolEditorWidget class. More...

#include <symboleditorwidget.h>

+ Inheritance diagram for SymbolEditorWidget:
+ Collaboration diagram for SymbolEditorWidget:

Public Slots

bool save () noexcept override
 
bool selectAll () noexcept override
 
bool cut () noexcept override
 
bool copy () noexcept override
 
bool paste () noexcept override
 
bool rotateCw () noexcept override
 
bool rotateCcw () noexcept override
 
bool mirror () noexcept override
 
bool remove () noexcept override
 
bool zoomIn () noexcept override
 
bool zoomOut () noexcept override
 
bool zoomAll () noexcept override
 
bool abortCommand () noexcept override
 
bool editGridProperties () 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 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

 SymbolEditorWidget ()=delete
 
 SymbolEditorWidget (const SymbolEditorWidget &other)=delete
 
 SymbolEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~SymbolEditorWidget () noexcept
 
virtual bool hasGraphicalEditor () const noexcept override
 
void setToolsActionGroup (ExclusiveActionGroup *group) noexcept override
 
void setStatusBar (StatusBar *statusbar) noexcept override
 
SymbolEditorWidgetoperator= (const SymbolEditorWidget &rhs)=delete
 
template<>
void fixMsg (const MsgNameNotTitleCase &msg)
 
template<>
void fixMsg (const MsgMissingAuthor &msg)
 
template<>
void fixMsg (const MsgMissingCategories &msg)
 
template<>
void fixMsg (const MsgMissingSymbolName &msg)
 
template<>
void fixMsg (const MsgMissingSymbolValue &msg)
 
template<>
void fixMsg (const MsgWrongSymbolTextLayer &msg)
 
template<>
void fixMsg (const MsgSymbolPinNotOnGrid &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 supportsFlip () const noexcept
 
virtual void setUndoStackActionGroup (UndoStackActionGroup *group) noexcept
 
virtual void setCommandToolBar (QToolBar *toolbar) noexcept
 
EditorWidgetBaseoperator= (const EditorWidgetBase &rhs)=delete
 
- Public Member Functions inherited from IF_GraphicsViewEventHandler
 IF_GraphicsViewEventHandler () noexcept
 
virtual ~IF_GraphicsViewEventHandler () noexcept
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
bool graphicsViewEventHandler (QEvent *event) noexcept override
 The event handler method. More...
 
bool toolChangeRequested (Tool newTool) noexcept override
 
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::SymbolEditorWidget > mUi
 
QScopedPointer< ComponentCategoryListEditorWidgetmCategoriesEditorWidget
 
QScopedPointer< GraphicsScenemGraphicsScene
 
QScopedPointer< SymbolmSymbol
 
QScopedPointer< SymbolGraphicsItemmGraphicsItem
 
QScopedPointer< SymbolEditorFsmmFsm
 
QSet< UuidmOriginalSymbolPinUuids
 

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
 
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
 
StatusBarmStatusBar
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mIsInterfaceBroken
 

Detailed Description

The SymbolEditorWidget class.

Constructor & Destructor Documentation

◆ SymbolEditorWidget() [1/3]

SymbolEditorWidget ( )
delete

◆ SymbolEditorWidget() [2/3]

SymbolEditorWidget ( const SymbolEditorWidget other)
delete

◆ SymbolEditorWidget() [3/3]

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

◆ ~SymbolEditorWidget()

~SymbolEditorWidget ( )
noexcept

Member Function Documentation

◆ hasGraphicalEditor()

virtual bool hasGraphicalEditor ( ) const
inlineoverridevirtualnoexcept

Reimplemented from EditorWidgetBase.

◆ setToolsActionGroup()

void setToolsActionGroup ( ExclusiveActionGroup group)
overridevirtualnoexcept

Reimplemented from EditorWidgetBase.

+ Here is the call graph for this function:

◆ setStatusBar()

void setStatusBar ( StatusBar statusbar)
overridevirtualnoexcept

Reimplemented from EditorWidgetBase.

+ Here is the call graph for this function:

◆ operator=()

SymbolEditorWidget& operator= ( const SymbolEditorWidget rhs)
delete

◆ save

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

◆ selectAll

bool selectAll ( )
overrideslotnoexcept

◆ cut

bool cut ( )
overrideslotnoexcept

◆ copy

bool copy ( )
overrideslotnoexcept

◆ paste

bool paste ( )
overrideslotnoexcept

◆ rotateCw

bool rotateCw ( )
overrideslotnoexcept

◆ rotateCcw

bool rotateCcw ( )
overrideslotnoexcept

◆ mirror

bool mirror ( )
overrideslotnoexcept

◆ remove

bool remove ( )
overrideslotnoexcept

◆ zoomIn

bool zoomIn ( )
overrideslotnoexcept

◆ zoomOut

bool zoomOut ( )
overrideslotnoexcept

◆ zoomAll

bool zoomAll ( )
overrideslotnoexcept

◆ abortCommand

bool abortCommand ( )
overrideslotnoexcept

◆ editGridProperties

bool editGridProperties ( )
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:

◆ graphicsViewEventHandler()

bool graphicsViewEventHandler ( QEvent *  event)
overrideprivatevirtualnoexcept

The event handler method.

Implements IF_GraphicsViewEventHandler.

◆ toolChangeRequested()

bool toolChangeRequested ( Tool  newTool)
overrideprivatevirtualnoexcept

Reimplemented from EditorWidgetBase.

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

◆ runChecks()

bool runChecks ( LibraryElementCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/8]

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/8]

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

◆ fixMsg() [3/8]

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

◆ fixMsg() [4/8]

void fixMsg ( const MsgMissingCategories msg)

◆ fixMsg() [5/8]

void fixMsg ( const MsgMissingSymbolName msg)

◆ fixMsg() [6/8]

void fixMsg ( const MsgMissingSymbolValue msg)

◆ fixMsg() [7/8]

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

◆ fixMsg() [8/8]

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

Member Data Documentation

◆ mUi

QScopedPointer<Ui::SymbolEditorWidget> mUi
private

◆ mCategoriesEditorWidget

QScopedPointer<ComponentCategoryListEditorWidget> mCategoriesEditorWidget
private

◆ mGraphicsScene

QScopedPointer<GraphicsScene> mGraphicsScene
private

◆ mSymbol

QScopedPointer<Symbol> mSymbol
private

◆ mGraphicsItem

QScopedPointer<SymbolGraphicsItem> mGraphicsItem
private

◆ mFsm

QScopedPointer<SymbolEditorFsm> mFsm
private

◆ mOriginalSymbolPinUuids

QSet<Uuid> mOriginalSymbolPinUuids
private

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