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 move (Qt::ArrowType direction) noexcept override
 
bool rotate (const librepcb::Angle &rotation) noexcept override
 
bool mirror (Qt::Orientation orientation) noexcept override
 
bool snapToGrid () noexcept override
 
bool remove () noexcept override
 
bool editProperties () noexcept override
 
bool zoomIn () noexcept override
 
bool zoomOut () noexcept override
 
bool zoomAll () noexcept override
 
bool abortCommand () noexcept override
 
bool importDxf () noexcept override
 
bool editGridProperties () noexcept override
 
bool increaseGridInterval () noexcept override
 
bool decreaseGridInterval () 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

 SymbolEditorWidget ()=delete
 
 SymbolEditorWidget (const SymbolEditorWidget &other)=delete
 
 SymbolEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~SymbolEditorWidget () noexcept
 
QSet< FeaturegetAvailableFeatures () const noexcept override
 
void connectEditor (UndoStackActionGroup &undoStackActionGroup, ExclusiveActionGroup &toolsActionGroup, QToolBar &commandToolBar, StatusBar &statusBar) noexcept override
 
void disconnectEditor () 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)
 
template<>
void fixMsg (const MsgNonFunctionalSymbolPinInversionSign &msg)
 
template<>
void fixMsg (const MsgSymbolOriginNotInCenter &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_GraphicsViewEventHandler
 IF_GraphicsViewEventHandler () noexcept
 
virtual ~IF_GraphicsViewEventHandler () noexcept
 
virtual bool graphicsViewEventHandler (QEvent *event)=0
 The event handler method. More...
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
bool graphicsViewEventHandler (QEvent *event) noexcept override
 
bool toolChangeRequested (Tool newTool, const QVariant &mode) noexcept override
 
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
 
bool execGraphicsExportDialog (GraphicsExportDialog::Output output, const QString &settingsKey) noexcept override
 
void setGridProperties (const PositiveLength &interval, const LengthUnit &unit, Theme::GridStyle style) noexcept
 

Private Attributes

QScopedPointer< Ui::SymbolEditorWidget > mUi
 
QScopedPointer< CategoryListEditorWidgetmCategoriesEditorWidget
 
QScopedPointer< GraphicsScenemGraphicsScene
 
LengthUnit mLengthUnit
 
std::unique_ptr< SymbolmSymbol
 
QScopedPointer< SymbolGraphicsItemmGraphicsItem
 
QSet< UuidmOriginalSymbolPinUuids
 Broken interface detection. More...
 
QScopedPointer< SymbolEditorFsmmFsm
 Editor state machine. More...
 

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

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

◆ getAvailableFeatures()

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

Implements EditorWidgetBase.

◆ connectEditor()

void connectEditor ( UndoStackActionGroup undoStackActionGroup,
ExclusiveActionGroup toolsActionGroup,
QToolBar &  commandToolBar,
StatusBar statusBar 
)
overridevirtualnoexcept

Reimplemented from EditorWidgetBase.

+ Here is the call graph for this function:

◆ disconnectEditor()

void disconnectEditor ( )
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

◆ move

bool move ( Qt::ArrowType  direction)
overrideslotnoexcept
+ Here is the call graph for this function:

◆ rotate

bool rotate ( const librepcb::Angle rotation)
overrideslotnoexcept

◆ mirror

bool mirror ( Qt::Orientation  orientation)
overrideslotnoexcept

◆ snapToGrid

bool snapToGrid ( )
overrideslotnoexcept

◆ remove

bool remove ( )
overrideslotnoexcept

◆ editProperties

bool editProperties ( )
overrideslotnoexcept

◆ zoomIn

bool zoomIn ( )
overrideslotnoexcept

◆ zoomOut

bool zoomOut ( )
overrideslotnoexcept

◆ zoomAll

bool zoomAll ( )
overrideslotnoexcept

◆ abortCommand

bool abortCommand ( )
overrideslotnoexcept

◆ importDxf

bool importDxf ( )
overrideslotnoexcept

◆ editGridProperties

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

◆ increaseGridInterval

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

◆ decreaseGridInterval

bool decreaseGridInterval ( )
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

◆ toolChangeRequested()

bool toolChangeRequested ( Tool  newTool,
const QVariant &  mode 
)
overrideprivatevirtualnoexcept

Reimplemented from EditorWidgetBase.

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

◆ runChecks()

bool runChecks ( RuleCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/10]

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

◆ fixMsgHelper()

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

◆ 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.

◆ execGraphicsExportDialog()

bool execGraphicsExportDialog ( GraphicsExportDialog::Output  output,
const QString &  settingsKey 
)
overrideprivatevirtualnoexcept

Reimplemented from EditorWidgetBase.

+ Here is the call graph for this function:

◆ setGridProperties()

void setGridProperties ( const PositiveLength interval,
const LengthUnit unit,
Theme::GridStyle  style 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ fixMsg() [2/10]

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

◆ fixMsg() [3/10]

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

◆ fixMsg() [4/10]

void fixMsg ( const MsgMissingCategories msg)

◆ fixMsg() [5/10]

void fixMsg ( const MsgMissingSymbolName msg)

◆ fixMsg() [6/10]

void fixMsg ( const MsgMissingSymbolValue msg)

◆ fixMsg() [7/10]

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

◆ fixMsg() [8/10]

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

◆ fixMsg() [9/10]

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

◆ fixMsg() [10/10]

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

Member Data Documentation

◆ mUi

QScopedPointer<Ui::SymbolEditorWidget> mUi
private

◆ mCategoriesEditorWidget

QScopedPointer<CategoryListEditorWidget> mCategoriesEditorWidget
private

◆ mGraphicsScene

QScopedPointer<GraphicsScene> mGraphicsScene
private

◆ mLengthUnit

LengthUnit mLengthUnit
private

◆ mSymbol

std::unique_ptr<Symbol> mSymbol
private

◆ mGraphicsItem

QScopedPointer<SymbolGraphicsItem> mGraphicsItem
private

◆ mOriginalSymbolPinUuids

QSet<Uuid> mOriginalSymbolPinUuids
private

Broken interface detection.

◆ mFsm

QScopedPointer<SymbolEditorFsm> mFsm
private

Editor state machine.


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