LibrePCB Developers Documentation
LibraryOverviewWidget Class Referencefinal

The LibraryOverviewWidget class. More...

#include <libraryoverviewwidget.h>

+ Inheritance diagram for LibraryOverviewWidget:
+ Collaboration diagram for LibraryOverviewWidget:

Classes

struct  LibraryMenuItem
 

Public Slots

bool save () noexcept override
 
bool remove () 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
 

Signals

void newComponentCategoryTriggered ()
 
void newPackageCategoryTriggered ()
 
void newSymbolTriggered ()
 
void newPackageTriggered ()
 
void newComponentTriggered ()
 
void newDeviceTriggered ()
 
void editComponentCategoryTriggered (const FilePath &fp)
 
void editPackageCategoryTriggered (const FilePath &fp)
 
void editSymbolTriggered (const FilePath &fp)
 
void editPackageTriggered (const FilePath &fp)
 
void editComponentTriggered (const FilePath &fp)
 
void editDeviceTriggered (const FilePath &fp)
 
void duplicateComponentCategoryTriggered (const FilePath &fp)
 
void duplicatePackageCategoryTriggered (const FilePath &fp)
 
void duplicateSymbolTriggered (const FilePath &fp)
 
void duplicatePackageTriggered (const FilePath &fp)
 
void duplicateComponentTriggered (const FilePath &fp)
 
void duplicateDeviceTriggered (const FilePath &fp)
 
void removeElementTriggered (const FilePath &fp)
 
- 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)
 

Public Member Functions

 LibraryOverviewWidget ()=delete
 
 LibraryOverviewWidget (const LibraryOverviewWidget &other)=delete
 
 LibraryOverviewWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~LibraryOverviewWidget () noexcept
 
LibrarygetLibrary () const noexcept
 
QSet< FeaturegetAvailableFeatures () const noexcept override
 
void setFilter (const QString &filter) noexcept
 
LibraryOverviewWidgetoperator= (const LibraryOverviewWidget &rhs)=delete
 
template<>
void fixMsg (const MsgNameNotTitleCase &msg)
 
template<>
void fixMsg (const MsgMissingAuthor &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 setupListWidget (QListWidget *listWidget) noexcept
 
void updateMetadata () noexcept
 
QString commitMetadata () 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
 
void updateElementLists () noexcept
 
template<typename ElementType >
void updateElementList (QListWidget &listWidget, const QIcon &icon) noexcept
 
QHash< QListWidgetItem *, FilePathgetElementListItemFilePaths (const QList< QListWidgetItem *> &items) const noexcept
 
void updateElementListFilter (QListWidget &listWidget) noexcept
 
void openContextMenuAtPos (const QPoint &pos) noexcept
 
void newItem (QListWidget *list) noexcept
 
void editItem (QListWidget *list, const FilePath &fp) noexcept
 
void duplicateItem (QListWidget *list, const FilePath &fp) noexcept
 
void removeItems (const QHash< QListWidgetItem *, FilePath > &selectedItemPaths) noexcept
 
void copyElementsToOtherLibrary (const QHash< QListWidgetItem *, FilePath > &selectedItemPaths, const FilePath &libFp, const QString &libName, bool removeFromSource) noexcept
 
QList< LibraryMenuItemgetLocalLibraries () const noexcept
 
void btnIconClicked () noexcept
 
void lstDoubleClicked (const QModelIndex &index) noexcept
 

Private Attributes

QScopedPointer< Ui::LibraryOverviewWidget > mUi
 
QScopedPointer< LibraryListEditorWidgetmDependenciesEditorWidget
 
std::unique_ptr< LibrarymLibrary
 
QByteArray mIcon
 
QString mCurrentFilter
 

Additional Inherited Members

- Public Types inherited from EditorWidgetBase
enum  Tool
 
enum  Feature
 
- 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

Constructor & Destructor Documentation

◆ LibraryOverviewWidget() [1/3]

◆ LibraryOverviewWidget() [2/3]

LibraryOverviewWidget ( const LibraryOverviewWidget other)
delete

◆ LibraryOverviewWidget() [3/3]

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

◆ ~LibraryOverviewWidget()

~LibraryOverviewWidget ( )
noexcept

Member Function Documentation

◆ getLibrary()

Library& getLibrary ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getAvailableFeatures()

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

Implements EditorWidgetBase.

◆ setFilter()

void setFilter ( const QString &  filter)
noexcept
+ Here is the call graph for this function:

◆ operator=()

LibraryOverviewWidget& operator= ( const LibraryOverviewWidget rhs)
delete

◆ save

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

◆ remove

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

◆ newComponentCategoryTriggered

void newComponentCategoryTriggered ( )
signal
+ Here is the caller graph for this function:

◆ newPackageCategoryTriggered

void newPackageCategoryTriggered ( )
signal
+ Here is the caller graph for this function:

◆ newSymbolTriggered

void newSymbolTriggered ( )
signal
+ Here is the caller graph for this function:

◆ newPackageTriggered

void newPackageTriggered ( )
signal
+ Here is the caller graph for this function:

◆ newComponentTriggered

void newComponentTriggered ( )
signal
+ Here is the caller graph for this function:

◆ newDeviceTriggered

void newDeviceTriggered ( )
signal
+ Here is the caller graph for this function:

◆ editComponentCategoryTriggered

void editComponentCategoryTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ editPackageCategoryTriggered

void editPackageCategoryTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ editSymbolTriggered

void editSymbolTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ editPackageTriggered

void editPackageTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ editComponentTriggered

void editComponentTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ editDeviceTriggered

void editDeviceTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicateComponentCategoryTriggered

void duplicateComponentCategoryTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicatePackageCategoryTriggered

void duplicatePackageCategoryTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicateSymbolTriggered

void duplicateSymbolTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicatePackageTriggered

void duplicatePackageTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicateComponentTriggered

void duplicateComponentTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ duplicateDeviceTriggered

void duplicateDeviceTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ removeElementTriggered

void removeElementTriggered ( const FilePath fp)
signal
+ Here is the caller graph for this function:

◆ setupListWidget()

void setupListWidget ( QListWidget *  listWidget)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller 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:

◆ isInterfaceBroken()

bool isInterfaceBroken ( ) const
inlineoverrideprivatevirtualnoexcept

Implements EditorWidgetBase.

◆ runChecks()

bool runChecks ( RuleCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

◆ fixMsg() [1/3]

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:

◆ updateElementLists()

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

◆ updateElementList()

void updateElementList ( QListWidget &  listWidget,
const QIcon &  icon 
)
privatenoexcept
+ Here is the call graph for this function:

◆ getElementListItemFilePaths()

QHash< QListWidgetItem *, FilePath > getElementListItemFilePaths ( const QList< QListWidgetItem *> &  items) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateElementListFilter()

void updateElementListFilter ( QListWidget &  listWidget)
privatenoexcept
+ Here is the caller graph for this function:

◆ openContextMenuAtPos()

void openContextMenuAtPos ( const QPoint &  pos)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newItem()

void newItem ( QListWidget *  list)
privatenoexcept
+ Here is the caller graph for this function:

◆ editItem()

void editItem ( QListWidget *  list,
const FilePath fp 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ duplicateItem()

void duplicateItem ( QListWidget *  list,
const FilePath fp 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ removeItems()

void removeItems ( const QHash< QListWidgetItem *, FilePath > &  selectedItemPaths)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyElementsToOtherLibrary()

void copyElementsToOtherLibrary ( const QHash< QListWidgetItem *, FilePath > &  selectedItemPaths,
const FilePath libFp,
const QString &  libName,
bool  removeFromSource 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocalLibraries()

QList< LibraryOverviewWidget::LibraryMenuItem > getLocalLibraries ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ btnIconClicked()

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

◆ lstDoubleClicked()

void lstDoubleClicked ( const QModelIndex &  index)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixMsg() [2/3]

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

◆ fixMsg() [3/3]

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

Member Data Documentation

◆ mUi

QScopedPointer<Ui::LibraryOverviewWidget> mUi
private

◆ mDependenciesEditorWidget

QScopedPointer<LibraryListEditorWidget> mDependenciesEditorWidget
private

◆ mLibrary

std::unique_ptr<Library> mLibrary
private

◆ mIcon

QByteArray mIcon
private

◆ mCurrentFilter

QString mCurrentFilter
private

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