LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DeviceEditorWidget Class Referencefinal

The DeviceEditorWidget class. More...

#include <deviceeditorwidget.h>

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

Public Slots

bool save () noexceptoverride
 
bool zoomIn () noexceptoverride
 
bool zoomOut () noexceptoverride
 
bool zoomAll () noexceptoverride
 
- Public Slots inherited from EditorWidgetBase
virtual bool save () noexcept
 
virtual bool rotateCw () noexcept
 
virtual bool rotateCcw () 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

 DeviceEditorWidget ()=delete
 
 DeviceEditorWidget (const DeviceEditorWidget &other)=delete
 
 DeviceEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~DeviceEditorWidget () noexcept
 
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 bool hasGraphicalEditor () 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
 

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 memorizeDeviceInterface () noexcept
 
bool isInterfaceBroken () const noexceptoverride
 
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::DeviceEditorWidget > 
mUi
 
QScopedPointer
< ComponentCategoryListEditorWidget
mCategoriesEditorWidget
 
QScopedPointer< DevicemDevice
 
QScopedPointer
< DefaultGraphicsLayerProvider
mGraphicsLayerProvider
 
QScopedPointer< ComponentmComponent
 
QScopedPointer< GraphicsScenemComponentGraphicsScene
 
QList< std::shared_ptr< Symbol > > mSymbols
 
QList< std::shared_ptr
< SymbolPreviewGraphicsItem > > 
mSymbolGraphicsItems
 
QScopedPointer< PackagemPackage
 
QScopedPointer< GraphicsScenemPackageGraphicsScene
 
QScopedPointer
< FootprintPreviewGraphicsItem
mFootprintGraphicsItem
 
tl::optional< UuidmOriginalComponentUuid
 
tl::optional< UuidmOriginalPackageUuid
 
DevicePadSignalMap mOriginalPadSignalMap
 

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
 
QScopedPointer< UndoStackmUndoStack
 
UndoStackActionGroupmUndoStackActionGroup
 
ExclusiveActionGroupmToolsActionGroup
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mIsInterfaceBroken
 

Detailed Description

The DeviceEditorWidget class.

Author
ubruhin
Date
2016-10-16

Constructor & Destructor Documentation

DeviceEditorWidget ( )
delete
DeviceEditorWidget ( const DeviceEditorWidget other)
delete
DeviceEditorWidget ( const Context context,
const FilePath fp,
QWidget *  parent = nullptr 
)

+ Here is the call graph for this function:

~DeviceEditorWidget ( )
noexcept

Member Function Documentation

DeviceEditorWidget& operator= ( const DeviceEditorWidget rhs)
delete
bool save ( )
overrideslotnoexcept

+ Here is the call graph for this function:

bool zoomIn ( )
overrideslotnoexcept
bool zoomOut ( )
overrideslotnoexcept
bool zoomAll ( )
overrideslotnoexcept
void updateMetadata ( )
privatenoexcept

+ Here is the caller graph for this function:

QString commitMetadata ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnChooseComponentClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnChoosePackageClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateDeviceComponentUuid ( const Uuid uuid)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateComponentPreview ( )
privatenoexcept

+ Here is the call graph for this function:

void updateDevicePackageUuid ( const Uuid uuid)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updatePackagePreview ( )
privatenoexcept
void memorizeDeviceInterface ( )
privatenoexcept

+ Here is the caller graph for this function:

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

bool runChecks ( LibraryElementCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

void fixMsg ( const MessageType &  msg)
private

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

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

Implements EditorWidgetBase.

void fixMsg ( const MsgNameNotTitleCase msg)

+ Here is the call graph for this function:

void fixMsg ( const MsgMissingAuthor msg)

+ Here is the call graph for this function:

void fixMsg ( const MsgMissingCategories msg)

Member Data Documentation

QScopedPointer<Ui::DeviceEditorWidget> mUi
private
QScopedPointer<ComponentCategoryListEditorWidget> mCategoriesEditorWidget
private
QScopedPointer<Device> mDevice
private
QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider
private
QScopedPointer<Component> mComponent
private
QScopedPointer<GraphicsScene> mComponentGraphicsScene
private
QList<std::shared_ptr<Symbol> > mSymbols
private
QList<std::shared_ptr<SymbolPreviewGraphicsItem> > mSymbolGraphicsItems
private
QScopedPointer<Package> mPackage
private
QScopedPointer<GraphicsScene> mPackageGraphicsScene
private
QScopedPointer<FootprintPreviewGraphicsItem> mFootprintGraphicsItem
private
tl::optional<Uuid> mOriginalComponentUuid
private
tl::optional<Uuid> mOriginalPackageUuid
private
DevicePadSignalMap mOriginalPadSignalMap
private

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