20#ifndef LIBREPCB_EDITOR_LIBRARYEDITORLEGACY_H
21#define LIBREPCB_EDITOR_LIBRARYEDITORLEGACY_H
42class TransactionalFileSystem;
47class ExclusiveActionGroup;
48class GraphicsLayerList;
49class StandardEditorCommandHandler;
50class UndoStackActionGroup;
53class LibraryEditorLegacy;
90 template <typename EditWidgetType>
92 bool isNewElement) noexcept;
112 void closeEvent(QCloseEvent* event) noexcept override;
113 bool closeAllTabs(
bool withNonClosable,
bool askForSave) noexcept;
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The Library class represents a library directory.
Definition library.h:46
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The ExclusiveActionGroup class groups multiple QAction's together.
Definition exclusiveactiongroup.h:54
The GraphicsLayerList class.
Definition graphicslayerlist.h:48
The LibraryEditorLegacy class.
Definition libraryeditorlegacy.h:63
QScopedPointer< QAction > mActionGenerateOutline
Definition libraryeditorlegacy.h:177
EditorWidgetBase * mCurrentEditorWidget
Definition libraryeditorlegacy.h:121
void setAvailableFeatures(const QSet< EditorWidgetBase::Feature > &features) noexcept
Definition libraryeditorlegacy.cpp:820
EditorWidgetBase::Context createContext(bool isNewElement) noexcept
Definition libraryeditorlegacy.cpp:813
QScopedPointer< QAction > mActionZoomFit
Definition libraryeditorlegacy.h:153
QScopedPointer< QAction > mActionExportImage
Definition libraryeditorlegacy.h:141
QScopedPointer< QAction > mActionToolSpecialPadEdgeConnector
Definition libraryeditorlegacy.h:194
void duplicateLibraryElement(NewElementWizardContext::ElementType type, const FilePath &fp)
Definition libraryeditorlegacy.cpp:902
QScopedPointer< QAction > mActionSave
Definition libraryeditorlegacy.h:130
QScopedPointer< UndoStackActionGroup > mUndoStackActionGroup
Definition libraryeditorlegacy.h:204
QScopedPointer< QAction > mActionCut
Definition libraryeditorlegacy.h:159
void closeTabIfOpen(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:198
QScopedPointer< QAction > mActionMoveAlign
Definition libraryeditorlegacy.h:172
LibraryEditorLegacy(const LibraryEditorLegacy &other)=delete
QScopedPointer< QAction > mActionZoomIn
Definition libraryeditorlegacy.h:154
QScopedPointer< QAction > mActionCopy
Definition libraryeditorlegacy.h:160
QScopedPointer< QAction > mActionToolRect
Definition libraryeditorlegacy.h:182
QScopedPointer< QAction > mActionKeyboardShortcutsReference
Definition libraryeditorlegacy.h:128
QScopedPointer< QAction > mActionMirrorHorizontal
Definition libraryeditorlegacy.h:168
void duplicateDevice(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:184
void newLibraryElement(NewElementWizardContext::ElementType type)
Definition libraryeditorlegacy.cpp:891
QScopedPointer< QAction > mActionQuit
Definition libraryeditorlegacy.h:135
QScopedPointer< ExclusiveActionGroup > mToolsActionGroup
Definition libraryeditorlegacy.h:205
QScopedPointer< QAction > mActionToolHole
Definition libraryeditorlegacy.h:199
QScopedPointer< QAction > mActionMoveDown
Definition libraryeditorlegacy.h:165
QScopedPointer< QAction > mActionGridIncrease
Definition libraryeditorlegacy.h:150
QScopedPointer< QAction > mActionHelperTools
Definition libraryeditorlegacy.h:176
~LibraryEditorLegacy() noexcept
Definition libraryeditorlegacy.cpp:128
QScopedPointer< QAction > mActionToolValue
Definition libraryeditorlegacy.h:188
QScopedPointer< QAction > mActionCloseTab
Definition libraryeditorlegacy.h:132
QScopedPointer< QAction > mActionCloseAllTabs
Definition libraryeditorlegacy.h:133
QScopedPointer< QAction > mActionGridProperties
Definition libraryeditorlegacy.h:149
void setActiveEditorWidget(EditorWidgetBase *widget)
Definition libraryeditorlegacy.cpp:866
QScopedPointer< QAction > mActionReNumberPads
Definition libraryeditorlegacy.h:201
LibraryEditorLegacy()=delete
bool closeAllTabs(bool withNonClosable, bool askForSave) noexcept
Definition libraryeditorlegacy.cpp:968
QScopedPointer< QAction > mActionToolSpecialPadTest
Definition libraryeditorlegacy.h:195
QScopedPointer< QAction > mActionAbort
Definition libraryeditorlegacy.h:179
QScopedPointer< QToolBar > mToolBarEdit
Definition libraryeditorlegacy.h:209
QScopedPointer< QAction > mActionRotateCcw
Definition libraryeditorlegacy.h:166
void createMenus() noexcept
Definition libraryeditorlegacy.cpp:703
QScopedPointer< QAction > mActionToolArc
Definition libraryeditorlegacy.h:185
void openDevice(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:168
QScopedPointer< QAction > mActionRescanLibraries
Definition libraryeditorlegacy.h:137
QScopedPointer< QAction > mActionAboutLibrePcb
Definition libraryeditorlegacy.h:125
void editNewLibraryElement(NewElementWizardContext::ElementType type, const FilePath &fp)
Definition libraryeditorlegacy.cpp:913
bool mIsOpenedReadOnly
Definition libraryeditorlegacy.h:117
std::unique_ptr< GraphicsLayerList > mLayers
Definition libraryeditorlegacy.h:120
bool closeTab(int index) noexcept
Definition libraryeditorlegacy.cpp:264
QScopedPointer< QAction > mActionSelectAll
Definition libraryeditorlegacy.h:148
QScopedPointer< QToolBar > mToolBarTools
Definition libraryeditorlegacy.h:212
QScopedPointer< QAction > mActionMoveUp
Definition libraryeditorlegacy.h:164
QScopedPointer< QToolBar > mToolBarFile
Definition libraryeditorlegacy.h:208
void updateTabTitles() noexcept
Definition libraryeditorlegacy.cpp:930
QScopedPointer< QAction > mActionPreviousPage
Definition libraryeditorlegacy.h:146
QScopedPointer< QAction > mActionImportDxf
Definition libraryeditorlegacy.h:138
void createToolBars() noexcept
Definition libraryeditorlegacy.cpp:611
QScopedPointer< QAction > mActionCloseWindow
Definition libraryeditorlegacy.h:134
void currentTabChanged(int index) noexcept
Definition libraryeditorlegacy.cpp:249
QScopedPointer< QAction > mActionToolSelect
Definition libraryeditorlegacy.h:180
void openPackage(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:152
QScopedPointer< QAction > mActionWebsite
Definition libraryeditorlegacy.h:129
QScopedPointer< QAction > mActionToolSpecialPadGlobalFiducial
Definition libraryeditorlegacy.h:197
QScopedPointer< QAction > mActionUndo
Definition libraryeditorlegacy.h:157
QScopedPointer< QAction > mActionRotateCw
Definition libraryeditorlegacy.h:167
QScopedPointer< QAction > mActionToolLine
Definition libraryeditorlegacy.h:181
QScopedPointer< QAction > mActionFlipVertical
Definition libraryeditorlegacy.h:171
QScopedPointer< QAction > mActionMoveLeft
Definition libraryeditorlegacy.h:162
QScopedPointer< QToolBar > mToolBarCommand
Definition libraryeditorlegacy.h:211
QScopedPointer< QAction > mActionProperties
Definition libraryeditorlegacy.h:174
QScopedPointer< StandardEditorCommandHandler > mStandardCommandHandler
Definition libraryeditorlegacy.h:119
QScopedPointer< QAction > mActionSaveAll
Definition libraryeditorlegacy.h:131
QScopedPointer< QAction > mActionToolCircle
Definition libraryeditorlegacy.h:184
void forceCloseTabs(const QSet< FilePath > &fp) noexcept
Definition libraryeditorlegacy.cpp:188
QScopedPointer< QAction > mActionExportPdf
Definition libraryeditorlegacy.h:142
void tabCountChanged() noexcept
Definition libraryeditorlegacy.cpp:956
QScopedPointer< QAction > mActionToggleBgImage
Definition libraryeditorlegacy.h:152
QScopedPointer< QToolBar > mToolBarView
Definition libraryeditorlegacy.h:210
Library * mLibrary
Definition libraryeditorlegacy.h:122
QScopedPointer< QAction > mActionToolSmtPadStandard
Definition libraryeditorlegacy.h:190
QScopedPointer< QAction > mActionToolSpecialPadThermal
Definition libraryeditorlegacy.h:192
QScopedPointer< QAction > mActionToolName
Definition libraryeditorlegacy.h:187
QScopedPointer< QAction > mActionToolPolygon
Definition libraryeditorlegacy.h:183
void openComponent(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:160
QScopedPointer< QAction > mActionImportKiCadLibrary
Definition libraryeditorlegacy.h:140
Workspace & mWorkspace
Definition libraryeditorlegacy.h:116
QScopedPointer< QAction > mActionGenerateCourtyard
Definition libraryeditorlegacy.h:178
QScopedPointer< QAction > mActionOnlineDocumentation
Definition libraryeditorlegacy.h:127
QScopedPointer< QAction > mActionFileManager
Definition libraryeditorlegacy.h:136
QScopedPointer< QAction > mActionFind
Definition libraryeditorlegacy.h:147
QScopedPointer< QAction > mActionMoveRight
Definition libraryeditorlegacy.h:163
QScopedPointer< QAction > mActionImportEagleLibrary
Definition libraryeditorlegacy.h:139
void closeEvent(QCloseEvent *event) noexcept override
Definition libraryeditorlegacy.cpp:960
QScopedPointer< QAction > mActionPaste
Definition libraryeditorlegacy.h:161
bool requestClose() noexcept
Definition libraryeditorlegacy.cpp:138
void createActions() noexcept
Definition libraryeditorlegacy.cpp:316
QScopedPointer< QAction > mActionPrint
Definition libraryeditorlegacy.h:143
QScopedPointer< QAction > mActionGridDecrease
Definition libraryeditorlegacy.h:151
QScopedPointer< QAction > mActionNextPage
Definition libraryeditorlegacy.h:145
QScopedPointer< QAction > mActionRedo
Definition libraryeditorlegacy.h:158
QScopedPointer< QAction > mActionToolThtPad
Definition libraryeditorlegacy.h:191
void tabCloseRequested(int index) noexcept
Definition libraryeditorlegacy.cpp:254
void duplicatePackage(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:176
QScopedPointer< QAction > mActionAboutQt
Definition libraryeditorlegacy.h:126
QScopedPointer< QAction > mActionMirrorVertical
Definition libraryeditorlegacy.h:169
QScopedPointer< QAction > mActionToolMeasure
Definition libraryeditorlegacy.h:200
QScopedPointer< QAction > mActionRemove
Definition libraryeditorlegacy.h:175
QScopedPointer< QAction > mActionFlipHorizontal
Definition libraryeditorlegacy.h:170
QScopedPointer< QAction > mActionToolSpecialPadLocalFiducial
Definition libraryeditorlegacy.h:196
QScopedPointer< QAction > mActionToolSpecialPadBga
Definition libraryeditorlegacy.h:193
void aboutLibrePcbRequested()
QScopedPointer< QAction > mActionToolZone
Definition libraryeditorlegacy.h:198
QScopedPointer< QAction > mActionZoomOut
Definition libraryeditorlegacy.h:155
QScopedPointer< QAction > mActionToggle3D
Definition libraryeditorlegacy.h:156
void editLibraryElementTriggered(const FilePath &fp, bool isNewElement) noexcept
Definition libraryeditorlegacy.cpp:217
QScopedPointer< QAction > mActionToolText
Definition libraryeditorlegacy.h:186
QScopedPointer< QAction > mActionToolPin
Definition libraryeditorlegacy.h:189
QScopedPointer< Ui::LibraryEditorLegacy > mUi
Definition libraryeditorlegacy.h:118
void duplicateComponent(const FilePath &fp) noexcept
Definition libraryeditorlegacy.cpp:180
QScopedPointer< QAction > mActionNewElement
Definition libraryeditorlegacy.h:144
QScopedPointer< QAction > mActionSnapToGrid
Definition libraryeditorlegacy.h:173
The NewElementWizardContext class.
Definition newelementwizardcontext.h:58
Helper to handle some of the librepcb::editor::EditorCommand actions.
Definition standardeditorcommandhandler.h:48
The UndoStackActionGroup class groups an undo-QAction and redo-QAction together and optionally connec...
Definition undostackactiongroup.h:45
Definition occmodel.cpp:77