LibrePCB Developers Documentation
DeviceEditorWidget Class Referencefinal

The DeviceEditorWidget class. More...

#include <deviceeditorwidget.h>

+ Inheritance diagram for DeviceEditorWidget:
+ Collaboration diagram for DeviceEditorWidget:

Public Slots

bool save () noexcept override
 
bool zoomIn () noexcept override
 
bool zoomOut () noexcept override
 
bool zoomAll () 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 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
 

Public Member Functions

 DeviceEditorWidget ()=delete
 
 DeviceEditorWidget (const DeviceEditorWidget &other)=delete
 
 DeviceEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~DeviceEditorWidget () noexcept
 
QSet< FeaturegetAvailableFeatures () const noexcept override
 
DeviceEditorWidgetoperator= (const DeviceEditorWidget &rhs)=delete
 
template<>
void fixMsg (const MsgNameNotTitleCase &msg)
 
template<>
void fixMsg (const MsgMissingAuthor &msg)
 
template<>
void fixMsg (const MsgMissingCategories &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 void connectEditor (UndoStackActionGroup &undoStackActionGroup, ExclusiveActionGroup &toolsActionGroup, QToolBar &commandToolBar, StatusBar &statusBar) noexcept
 
virtual void disconnectEditor () noexcept
 
EditorWidgetBaseoperator= (const EditorWidgetBase &rhs)=delete
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
void btnChooseComponentClicked () noexcept
 
void btnChoosePackageClicked () noexcept
 
void updateDeviceComponentUuid (const Uuid &uuid) noexcept
 
void updateComponentPreview () noexcept
 
void updateDevicePackageUuid (const Uuid &uuid) noexcept
 
void updatePackagePreview () noexcept
 
void setSelectedPart (int index) noexcept
 
void memorizeDeviceInterface () 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::DeviceEditorWidget > mUi
 
QScopedPointer< CategoryListEditorWidgetmCategoriesEditorWidget
 
std::unique_ptr< DevicemDevice
 
QScopedPointer< DefaultGraphicsLayerProvidermGraphicsLayerProvider
 
std::shared_ptr< ComponentmComponent
 
QScopedPointer< GraphicsScenemComponentGraphicsScene
 
QList< std::shared_ptr< Symbol > > mSymbols
 
QList< std::shared_ptr< SymbolGraphicsItem > > mSymbolGraphicsItems
 
QScopedPointer< PackagemPackage
 
QScopedPointer< GraphicsScenemPackageGraphicsScene
 
QScopedPointer< FootprintGraphicsItemmFootprintGraphicsItem
 
tl::optional< UuidmOriginalComponentUuid
 
tl::optional< UuidmOriginalPackageUuid
 
DevicePadSignalMap mOriginalPadSignalMap
 

Additional Inherited Members

- Public Types inherited from EditorWidgetBase
enum  Tool
 
enum  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 toolChangeRequested (Tool newTool, const QVariant &mode) noexcept
 
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
 
- 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 DeviceEditorWidget class.

Constructor & Destructor Documentation

◆ DeviceEditorWidget() [1/3]

DeviceEditorWidget ( )
delete

◆ DeviceEditorWidget() [2/3]

DeviceEditorWidget ( const DeviceEditorWidget other)
delete

◆ DeviceEditorWidget() [3/3]

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

◆ ~DeviceEditorWidget()

~DeviceEditorWidget ( )
noexcept

Member Function Documentation

◆ getAvailableFeatures()

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

Implements EditorWidgetBase.

◆ operator=()

DeviceEditorWidget& operator= ( const DeviceEditorWidget rhs)
delete

◆ save

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

◆ zoomIn

bool zoomIn ( )
overrideslotnoexcept

◆ zoomOut

bool zoomOut ( )
overrideslotnoexcept

◆ zoomAll

bool zoomAll ( )
overrideslotnoexcept

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

◆ btnChooseComponentClicked()

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

◆ btnChoosePackageClicked()

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

◆ updateDeviceComponentUuid()

void updateDeviceComponentUuid ( const Uuid uuid)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateComponentPreview()

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

◆ updateDevicePackageUuid()

void updateDevicePackageUuid ( const Uuid uuid)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePackagePreview()

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

◆ setSelectedPart()

void setSelectedPart ( int  index)
privatenoexcept
+ Here is the caller graph for this function:

◆ memorizeDeviceInterface()

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

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

◆ runChecks()

bool runChecks ( RuleCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/4]

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.

+ Here is the call graph for this function:

◆ fixMsg() [2/4]

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

◆ fixMsg() [3/4]

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

◆ fixMsg() [4/4]

void fixMsg ( const MsgMissingCategories msg)

Member Data Documentation

◆ mUi

QScopedPointer<Ui::DeviceEditorWidget> mUi
private

◆ mCategoriesEditorWidget

QScopedPointer<CategoryListEditorWidget> mCategoriesEditorWidget
private

◆ mDevice

std::unique_ptr<Device> mDevice
private

◆ mGraphicsLayerProvider

QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider
private

◆ mComponent

std::shared_ptr<Component> mComponent
private

◆ mComponentGraphicsScene

QScopedPointer<GraphicsScene> mComponentGraphicsScene
private

◆ mSymbols

QList<std::shared_ptr<Symbol> > mSymbols
private

◆ mSymbolGraphicsItems

QList<std::shared_ptr<SymbolGraphicsItem> > mSymbolGraphicsItems
private

◆ mPackage

QScopedPointer<Package> mPackage
private

◆ mPackageGraphicsScene

QScopedPointer<GraphicsScene> mPackageGraphicsScene
private

◆ mFootprintGraphicsItem

QScopedPointer<FootprintGraphicsItem> mFootprintGraphicsItem
private

◆ mOriginalComponentUuid

tl::optional<Uuid> mOriginalComponentUuid
private

◆ mOriginalPackageUuid

tl::optional<Uuid> mOriginalPackageUuid
private

◆ mOriginalPadSignalMap

DevicePadSignalMap mOriginalPadSignalMap
private

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