LibrePCB Developers Documentation
|
The LibraryEditor class. More...
#include <libraryeditor.h>
Public Member Functions | |
LibraryEditor ()=delete | |
LibraryEditor (const LibraryEditor &other)=delete | |
LibraryEditor (Workspace &ws, const FilePath &libFp, bool readOnly) | |
~LibraryEditor () noexcept | |
std::shared_ptr< GraphicsLayer > | getLayer (const QString &name) const noexcept override |
QList< std::shared_ptr< GraphicsLayer > > | getAllLayers () const noexcept override |
bool | closeAndDestroy (bool askForSave) noexcept |
Close the library editor (this will destroy this object!) | |
LibraryEditor & | operator= (const LibraryEditor &rhs)=delete |
Public Member Functions inherited from IF_GraphicsLayerProvider | |
virtual | ~IF_GraphicsLayerProvider () noexcept |
std::shared_ptr< GraphicsLayer > | getLayer (const Layer &layer) const noexcept |
std::shared_ptr< GraphicsLayer > | getGrabAreaLayer (const Layer &outlineLayer) const noexcept |
Private Member Functions | |
void | newComponentCategoryTriggered () noexcept |
void | newPackageCategoryTriggered () noexcept |
void | newSymbolTriggered () noexcept |
void | newPackageTriggered () noexcept |
void | newComponentTriggered () noexcept |
void | newDeviceTriggered () noexcept |
void | editComponentCategoryTriggered (const FilePath &fp) noexcept |
void | editPackageCategoryTriggered (const FilePath &fp) noexcept |
void | editSymbolTriggered (const FilePath &fp) noexcept |
void | editPackageTriggered (const FilePath &fp) noexcept |
void | editComponentTriggered (const FilePath &fp) noexcept |
void | editDeviceTriggered (const FilePath &fp) noexcept |
void | duplicateComponentCategoryTriggered (const FilePath &fp) noexcept |
void | duplicatePackageCategoryTriggered (const FilePath &fp) noexcept |
void | duplicateSymbolTriggered (const FilePath &fp) noexcept |
void | duplicatePackageTriggered (const FilePath &fp) noexcept |
void | duplicateComponentTriggered (const FilePath &fp) noexcept |
void | duplicateDeviceTriggered (const FilePath &fp) noexcept |
void | closeTabIfOpen (const FilePath &fp) noexcept |
template<typename EditWidgetType > | |
void | editLibraryElementTriggered (const FilePath &fp, bool isNewElement) noexcept |
void | currentTabChanged (int index) noexcept |
void | tabCloseRequested (int index) noexcept |
bool | closeTab (int index) noexcept |
void | createActions () noexcept |
void | createToolBars () noexcept |
void | createMenus () noexcept |
EditorWidgetBase::Context | createContext (bool isNewElement) noexcept |
void | setAvailableFeatures (const QSet< EditorWidgetBase::Feature > &features) noexcept |
void | setActiveEditorWidget (EditorWidgetBase *widget) |
void | newLibraryElement (NewElementWizardContext::ElementType type) |
void | duplicateLibraryElement (NewElementWizardContext::ElementType type, const FilePath &fp) |
void | editNewLibraryElement (NewElementWizardContext::ElementType type, const FilePath &fp) |
void | updateTabTitles () noexcept |
void | tabCountChanged () noexcept |
void | keyPressEvent (QKeyEvent *event) noexcept override |
void | closeEvent (QCloseEvent *event) noexcept override |
bool | closeAllTabs (bool withNonClosable, bool askForSave) noexcept |
void | addLayer (const QString &name) noexcept |
Private Attributes | |
Workspace & | mWorkspace |
bool | mIsOpenedReadOnly |
QScopedPointer< Ui::LibraryEditor > | mUi |
QScopedPointer< StandardEditorCommandHandler > | mStandardCommandHandler |
QList< std::shared_ptr< GraphicsLayer > > | mLayers |
EditorWidgetBase * | mCurrentEditorWidget |
Library * | mLibrary |
QScopedPointer< QAction > | mActionAboutLibrePcb |
QScopedPointer< QAction > | mActionAboutQt |
QScopedPointer< QAction > | mActionOnlineDocumentation |
QScopedPointer< QAction > | mActionKeyboardShortcutsReference |
QScopedPointer< QAction > | mActionWebsite |
QScopedPointer< QAction > | mActionSave |
QScopedPointer< QAction > | mActionSaveAll |
QScopedPointer< QAction > | mActionCloseTab |
QScopedPointer< QAction > | mActionCloseAllTabs |
QScopedPointer< QAction > | mActionCloseWindow |
QScopedPointer< QAction > | mActionQuit |
QScopedPointer< QAction > | mActionFileManager |
QScopedPointer< QAction > | mActionRescanLibraries |
QScopedPointer< QAction > | mActionImportDxf |
QScopedPointer< QAction > | mActionImportEagleLibrary |
QScopedPointer< QAction > | mActionImportKiCadLibrary |
QScopedPointer< QAction > | mActionExportImage |
QScopedPointer< QAction > | mActionExportPdf |
QScopedPointer< QAction > | mActionPrint |
QScopedPointer< QAction > | mActionNewElement |
QScopedPointer< QAction > | mActionNextPage |
QScopedPointer< QAction > | mActionPreviousPage |
QScopedPointer< QAction > | mActionFind |
QScopedPointer< QAction > | mActionSelectAll |
QScopedPointer< QAction > | mActionGridProperties |
QScopedPointer< QAction > | mActionGridIncrease |
QScopedPointer< QAction > | mActionGridDecrease |
QScopedPointer< QAction > | mActionToggleBgImage |
QScopedPointer< QAction > | mActionZoomFit |
QScopedPointer< QAction > | mActionZoomIn |
QScopedPointer< QAction > | mActionZoomOut |
QScopedPointer< QAction > | mActionToggle3D |
QScopedPointer< QAction > | mActionUndo |
QScopedPointer< QAction > | mActionRedo |
QScopedPointer< QAction > | mActionCut |
QScopedPointer< QAction > | mActionCopy |
QScopedPointer< QAction > | mActionPaste |
QScopedPointer< QAction > | mActionMoveLeft |
QScopedPointer< QAction > | mActionMoveRight |
QScopedPointer< QAction > | mActionMoveUp |
QScopedPointer< QAction > | mActionMoveDown |
QScopedPointer< QAction > | mActionRotateCcw |
QScopedPointer< QAction > | mActionRotateCw |
QScopedPointer< QAction > | mActionMirrorHorizontal |
QScopedPointer< QAction > | mActionMirrorVertical |
QScopedPointer< QAction > | mActionFlipHorizontal |
QScopedPointer< QAction > | mActionFlipVertical |
QScopedPointer< QAction > | mActionMoveAlign |
QScopedPointer< QAction > | mActionSnapToGrid |
QScopedPointer< QAction > | mActionProperties |
QScopedPointer< QAction > | mActionRemove |
QScopedPointer< QAction > | mActionHelperTools |
QScopedPointer< QAction > | mActionGenerateOutline |
QScopedPointer< QAction > | mActionGenerateCourtyard |
QScopedPointer< QAction > | mActionAbort |
QScopedPointer< QAction > | mActionToolSelect |
QScopedPointer< QAction > | mActionToolLine |
QScopedPointer< QAction > | mActionToolRect |
QScopedPointer< QAction > | mActionToolPolygon |
QScopedPointer< QAction > | mActionToolCircle |
QScopedPointer< QAction > | mActionToolArc |
QScopedPointer< QAction > | mActionToolText |
QScopedPointer< QAction > | mActionToolName |
QScopedPointer< QAction > | mActionToolValue |
QScopedPointer< QAction > | mActionToolPin |
QScopedPointer< QAction > | mActionToolSmtPadStandard |
QScopedPointer< QAction > | mActionToolThtPad |
QScopedPointer< QAction > | mActionToolSpecialPadThermal |
QScopedPointer< QAction > | mActionToolSpecialPadBga |
QScopedPointer< QAction > | mActionToolSpecialPadEdgeConnector |
QScopedPointer< QAction > | mActionToolSpecialPadTest |
QScopedPointer< QAction > | mActionToolSpecialPadLocalFiducial |
QScopedPointer< QAction > | mActionToolSpecialPadGlobalFiducial |
QScopedPointer< QAction > | mActionToolZone |
QScopedPointer< QAction > | mActionToolHole |
QScopedPointer< QAction > | mActionToolMeasure |
QScopedPointer< QAction > | mActionReNumberPads |
QScopedPointer< UndoStackActionGroup > | mUndoStackActionGroup |
QScopedPointer< ExclusiveActionGroup > | mToolsActionGroup |
QScopedPointer< QToolBar > | mToolBarFile |
QScopedPointer< QToolBar > | mToolBarEdit |
QScopedPointer< QToolBar > | mToolBarView |
QScopedPointer< SearchToolBar > | mToolBarSearch |
QScopedPointer< QToolBar > | mToolBarCommand |
QScopedPointer< QToolBar > | mToolBarTools |
The LibraryEditor class.
|
delete |
|
delete |
LibraryEditor | ( | Workspace & | ws, |
const FilePath & | libFp, | ||
bool | readOnly | ||
) |
|
noexcept |
|
inlineoverridevirtualnoexcept |
Implements IF_GraphicsLayerProvider.
|
inlineoverridevirtualnoexcept |
Implements IF_GraphicsLayerProvider.
|
noexcept |
Close the library editor (this will destroy this object!)
If there are unsaved changes to the library, this method will ask the user whether the changes should be saved or not. If the user clicks on "cancel" or the library could not be saved successfully, this method will return false. If there was no such error, this method will call QObject::deleteLater() which means that this object will be deleted in the Qt's event loop.
askForSave | If true and there are unsaved changes, this method shows a message box to ask whether the library should be saved or not. If false, the library will NOT be saved. |
|
delete |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
|
private |
|
privatenoexcept |
|
privatenoexcept |
|
overrideprivatenoexcept |
|
overrideprivatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |