20#ifndef LIBREPCB_EDITOR_BOARDEDITOR_H
21#define LIBREPCB_EDITOR_BOARDEDITOR_H
26#include "../../dialogs/graphicsexportdialog.h"
27#include "../../graphics/graphicslayer.h"
28#include "../../widgets/if_graphicsvieweventhandler.h"
29#include "ui_boardeditor.h"
43class BoardPlaneFragmentsBuilder;
44class ComponentInstance;
51class BoardGraphicsScene;
53class ExclusiveActionGroup;
55class OpenGlSceneBuilder;
56class OpenGlSceneBuilder;
61class StandardEditorCommandHandler;
63class UndoStackActionGroup;
64class UnplacedComponentsDock;
100 const QString& name) const noexcept
override {
101 foreach (
const std::shared_ptr<GraphicsLayer>& layer,
mLayers) {
102 if (layer->getName() == name) {
109 QList<std::shared_ptr<GraphicsLayer>>
getAllLayers() const noexcept
override {
124 virtual
void closeEvent(QCloseEvent* event) noexcept override;
151 void runDrc(
bool quick) noexcept;
154 bool approved) noexcept;
158 void goToDevice(const QString& name,
int index) noexcept;
167 Theme::GridStyle style,
bool applyToBoard) noexcept;
171 const QString& settingsKey) noexcept;
The BI_Device class.
Definition bi_device.h:57
The Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:73
Plane fragments builder working on a librepcb::Board.
Definition boardplanefragmentsbuilder.h:55
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:60
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The RuleCheckMessage class.
Definition rulecheckmessage.h:45
Theme class as used by librepcb::WorkspaceSettingsItem_Themes.
Definition theme.h:44
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The board editor finite state machine.
Definition boardeditorfsm.h:57
The BoardEditor class.
Definition boardeditor.h:79
bool setActiveBoardIndex(int index) noexcept
Definition boardeditor.cpp:298
QScopedPointer< QAction > mActionChangeLineWidth
Definition boardeditor.h:274
QScopedPointer< QAction > mActionToolPlane
Definition boardeditor.h:286
QScopedPointer< QAction > mActionZoomFit
Definition boardeditor.h:251
QScopedPointer< QAction > mActionExportImage
Definition boardeditor.h:227
QScopedPointer< QAction > mActionFindPrevious
Definition boardeditor.h:245
void updateEnabledCopperLayers() noexcept
Definition boardeditor.cpp:513
QScopedPointer< UndoStackActionGroup > mUndoStackActionGroup
Definition boardeditor.h:296
QScopedPointer< QAction > mActionCut
Definition boardeditor.h:257
QScopedPointer< QAction > mActionExportLppz
Definition boardeditor.h:226
QScopedPointer< QAction > mActionDockLayers
Definition boardeditor.h:292
void startPlaneRebuild(bool full=false) noexcept
Definition boardeditor.cpp:1521
virtual std::shared_ptr< GraphicsLayer > getLayer(const QString &name) const noexcept override
Definition boardeditor.h:99
QScopedPointer< QAction > mActionUnlock
Definition boardeditor.h:270
QScopedPointer< QAction > mActionResetAllTexts
Definition boardeditor.h:271
QScopedPointer< QAction > mActionZoomIn
Definition boardeditor.h:252
QScopedPointer< QAction > mActionCopy
Definition boardeditor.h:258
QScopedPointer< QAction > mActionKeyboardShortcutsReference
Definition boardeditor.h:210
QPointer< Board > mActiveBoard
Definition boardeditor.h:188
QScopedPointer< QAction > mActionProjectSetup
Definition boardeditor.h:219
void execStepExportDialog() noexcept
Definition boardeditor.cpp:1723
QScopedPointer< QAction > mActionQuit
Definition boardeditor.h:215
void execBoardSetupDialog(bool switchToDrcSettings=false) noexcept
Definition boardeditor.cpp:1666
void copyBoard() noexcept
Definition boardeditor.cpp:1587
QScopedPointer< ExclusiveActionGroup > mToolsActionGroup
Definition boardeditor.h:297
QScopedPointer< QAction > mActionToolHole
Definition boardeditor.h:288
QScopedPointer< QAction > mActionMoveDown
Definition boardeditor.h:263
QScopedPointer< QAction > mActionGridIncrease
Definition boardeditor.h:248
QScopedPointer< QAction > mActionExportSpecctra
Definition boardeditor.h:230
QScopedPointer< QAction > mActionDockErc
Definition boardeditor.h:290
QScopedPointer< QAction > mActionOrderPcb
Definition boardeditor.h:237
QScopedPointer< QAction > mActionGridProperties
Definition boardeditor.h:247
void runDrc(bool quick) noexcept
Definition boardeditor.cpp:1332
void addLayers(const Theme &theme) noexcept
Definition boardeditor.cpp:448
void on_tabBar_currentChanged(int index)
Definition boardeditor.cpp:435
QList< std::shared_ptr< GraphicsLayer > > mLayers
Definition boardeditor.h:189
QScopedPointer< QAction > mActionAbort
Definition boardeditor.h:280
void hide3DView() noexcept
Definition boardeditor.cpp:1954
QScopedPointer< QToolBar > mToolBarEdit
Definition boardeditor.h:302
void boardAdded(int newIndex)
Definition boardeditor.cpp:413
QScopedPointer< QAction > mActionRotateCcw
Definition boardeditor.h:264
QScopedPointer< QAction > mActionLock
Definition boardeditor.h:269
QScopedPointer< QAction > mActionUpdateLibrary
Definition boardeditor.h:220
void createMenus() noexcept
Definition boardeditor.cpp:1027
void on_lblUnplacedComponentsNote_linkActivated()
Definition boardeditor.cpp:439
QScopedPointer< QAction > mActionSaveProject
Definition boardeditor.h:212
QScopedPointer< QAction > mActionAboutLibrePcb
Definition boardeditor.h:207
QScopedPointer< RuleCheckDock > mDockErc
Definition boardeditor.h:311
QList< BI_Device * > getSearchCandidates() noexcept
Definition boardeditor.cpp:1422
QScopedPointer< QAction > mActionFindNext
Definition boardeditor.h:244
QScopedPointer< QAction > mActionSelectAll
Definition boardeditor.h:246
void abortAllCommands() noexcept
Definition boardeditor.cpp:387
QScopedPointer< QAction > mActionGenerateFabricationData
Definition boardeditor.h:233
QScopedPointer< QToolBar > mToolBarTools
Definition boardeditor.h:306
QScopedPointer< QAction > mActionMoveUp
Definition boardeditor.h:262
QScopedPointer< QGraphicsPathItem > mDrcLocationGraphicsItem
Definition boardeditor.h:204
QScopedPointer< QToolBar > mToolBarFile
Definition boardeditor.h:301
bool isActiveTopLevelWindow() const noexcept
Definition boardeditor.cpp:1544
QScopedPointer< QActionGroup > mBoardActionGroup
Definition boardeditor.h:298
QScopedPointer< QAction > mActionPreviousPage
Definition boardeditor.h:242
QScopedPointer< QAction > mActionImportDxf
Definition boardeditor.h:224
void createToolBars() noexcept
Definition boardeditor.cpp:887
QScopedPointer< OpenGlSceneBuilder > mOpenGlSceneBuilder
Definition boardeditor.h:191
QScopedPointer< QAction > mActionShowPlanes
Definition boardeditor.h:277
QScopedPointer< QAction > mActionDockDrc
Definition boardeditor.h:291
QScopedPointer< RuleCheckDock > mDockDrc
Definition boardeditor.h:312
QScopedPointer< QAction > mActionExportStep
Definition boardeditor.h:229
QScopedPointer< QAction > mActionCloseWindow
Definition boardeditor.h:214
void execSpecctraImportDialog() noexcept
Definition boardeditor.cpp:1850
QScopedPointer< QAction > mActionToolSelect
Definition boardeditor.h:281
void execSpecctraExportDialog() noexcept
Definition boardeditor.cpp:1794
QScopedPointer< BoardLayersDock > mDockLayers
Definition boardeditor.h:310
QList< std::shared_ptr< GraphicsLayer > > getAllLayers() const noexcept override
Definition boardeditor.h:109
QScopedPointer< QAction > mActionGenerateD356Netlist
Definition boardeditor.h:235
QScopedPointer< BoardEditorFsm > mFsm
Definition boardeditor.h:195
QScopedPointer< QAction > mActionWebsite
Definition boardeditor.h:211
QScopedPointer< QAction > mActionUndo
Definition boardeditor.h:255
ProjectEditor & mProjectEditor
Definition boardeditor.h:180
QScopedPointer< QAction > mActionRotateCw
Definition boardeditor.h:265
Board * getActiveBoard() const noexcept
Definition boardeditor.h:92
QScopedPointer< BoardGraphicsScene > mGraphicsScene
Definition boardeditor.h:190
QScopedPointer< SearchToolBar > mToolBarSearch
Definition boardeditor.h:304
QScopedPointer< QAction > mActionHidePlanes
Definition boardeditor.h:278
QScopedPointer< QAction > mActionToolVia
Definition boardeditor.h:283
QScopedPointer< QAction > mActionRebuildPlanes
Definition boardeditor.h:279
void createDockWidgets() noexcept
Definition boardeditor.cpp:974
QScopedPointer< QAction > mActionOutputJobs
Definition boardeditor.h:236
QScopedPointer< QAction > mActionFlipVertical
Definition boardeditor.h:267
QScopedPointer< QAction > mActionMoveLeft
Definition boardeditor.h:260
QScopedPointer< QToolBar > mToolBarCommand
Definition boardeditor.h:305
QScopedPointer< QAction > mActionProperties
Definition boardeditor.h:275
void goToDevice(const QString &name, int index) noexcept
Definition boardeditor.cpp:1438
BoardEditor(const BoardEditor &other)=delete
void newBoard() noexcept
Definition boardeditor.cpp:1562
QScopedPointer< QAction > mActionToolTrace
Definition boardeditor.h:282
QScopedPointer< StandardEditorCommandHandler > mStandardCommandHandler
Definition boardeditor.h:185
QScopedPointer< QAction > mActionCloseProject
Definition boardeditor.h:213
void setGridProperties(const PositiveLength &interval, const LengthUnit &unit, Theme::GridStyle style, bool applyToBoard) noexcept
Definition boardeditor.cpp:1633
void clearDrcMarker() noexcept
Definition boardeditor.cpp:1417
Project & getProject() const noexcept
Definition boardeditor.h:91
QPointer< QMenu > mMenuBoard
Definition boardeditor.h:315
QScopedPointer< QAction > mActionGenerateBom
Definition boardeditor.h:232
void setDrcMessageApproved(const RuleCheckMessage &msg, bool approved) noexcept
Definition boardeditor.cpp:1408
void removeBoard() noexcept
Definition boardeditor.cpp:1615
QScopedPointer< QAction > mActionIncreaseLineWidth
Definition boardeditor.h:272
Project & mProject
Definition boardeditor.h:181
qint64 mTimestampOfLastPlaneRebuild
Definition boardeditor.h:199
QScopedPointer< QAction > mActionExportPdf
Definition boardeditor.h:228
void execD356NetlistExportDialog() noexcept
Definition boardeditor.cpp:1766
void scheduleOpenGlSceneUpdate() noexcept
Definition boardeditor.cpp:1477
QScopedPointer< QAction > mActionControlPanel
Definition boardeditor.h:218
void unplacedComponentsCountChanged(int count) noexcept
Definition boardeditor.cpp:1328
QScopedPointer< QToolBar > mToolBarView
Definition boardeditor.h:303
BoardGraphicsScene * getActiveBoardScene() noexcept
Definition boardeditor.h:93
QScopedPointer< QAction > mActionToolPolygon
Definition boardeditor.h:284
QScopedPointer< QAction > mActionDecreaseLineWidth
Definition boardeditor.h:273
QScopedPointer< QAction > mActionRemoveBoard
Definition boardeditor.h:240
QScopedPointer< QAction > mActionNewBoard
Definition boardeditor.h:238
void storeLayersVisibility() noexcept
Definition boardeditor.cpp:534
QScopedPointer< QAction > mActionDockPlaceDevices
Definition boardeditor.h:293
QScopedPointer< QAction > mActionOnlineDocumentation
Definition boardeditor.h:209
QScopedPointer< QAction > mActionFileManager
Definition boardeditor.h:216
QScopedPointer< QAction > mActionFind
Definition boardeditor.h:243
QScopedPointer< QAction > mActionMoveRight
Definition boardeditor.h:261
QHash< Uuid, std::optional< RuleCheckMessageList > > mDrcMessages
UUID=Board.
Definition boardeditor.h:203
bool getIgnoreLocks() const noexcept
Definition boardeditor.cpp:290
~BoardEditor()
Definition boardeditor.cpp:273
void highlightDrcMessage(const RuleCheckMessage &msg, bool zoomTo) noexcept
Definition boardeditor.cpp:1381
bool show3DView() noexcept
Definition boardeditor.cpp:1922
QScopedPointer< UnplacedComponentsDock > mDockUnplacedComponents
Definition boardeditor.h:309
bool mOpenGlSceneBuildScheduled
Definition boardeditor.h:192
void execGridPropertiesDialog() noexcept
Definition boardeditor.cpp:1650
virtual void closeEvent(QCloseEvent *event) noexcept override
Definition boardeditor.cpp:402
QScopedPointer< QAction > mActionGeneratePickPlace
Definition boardeditor.h:234
void abortBlockingToolsInOtherEditors() noexcept
Definition boardeditor.cpp:394
QScopedPointer< ToolBarProxy > mCommandToolBarProxy
Definition boardeditor.h:184
QScopedPointer< QAction > mActionPaste
Definition boardeditor.h:259
QScopedPointer< BoardPlaneFragmentsBuilder > mPlaneFragmentsBuilder
Definition boardeditor.h:198
QScopedPointer< QAction > mActionRunQuickCheck
Definition boardeditor.h:222
void toolRequested(const QVariant &newTool) noexcept
Definition boardeditor.cpp:1291
QHash< Uuid, QRectF > mVisibleSceneRect
Definition boardeditor.h:194
void createActions() noexcept
Definition boardeditor.cpp:546
QScopedPointer< QAction > mActionPrint
Definition boardeditor.h:231
void boardRemoved(int oldIndex)
Definition boardeditor.cpp:424
QScopedPointer< QAction > mActionRunDesignRuleCheck
Definition boardeditor.h:223
QScopedPointer< QAction > mActionGridDecrease
Definition boardeditor.h:249
QScopedPointer< QAction > mActionSchematicEditor
Definition boardeditor.h:217
QScopedPointer< QAction > mActionNextPage
Definition boardeditor.h:241
virtual bool graphicsViewEventHandler(QEvent *event) override
The event handler method.
Definition boardeditor.cpp:1192
QScopedPointer< QAction > mActionRedo
Definition boardeditor.h:256
void updateBoardActionGroup() noexcept
Definition boardeditor.cpp:1173
QScopedPointer< QAction > mActionBoardSetup
Definition boardeditor.h:221
QScopedPointer< QAction > mActionAboutQt
Definition boardeditor.h:208
QScopedPointer< QAction > mActionToolMeasure
Definition boardeditor.h:289
QScopedPointer< Ui::BoardEditor > mUi
Definition boardeditor.h:182
qint64 mTimestampOfLastOpenGlSceneRebuild
Definition boardeditor.h:193
QScopedPointer< QAction > mActionRemove
Definition boardeditor.h:276
void execGraphicsExportDialog(GraphicsExportDialog::Output output, const QString &settingsKey) noexcept
Definition boardeditor.cpp:1677
ProjectEditor & getProjectEditor() const noexcept
Definition boardeditor.h:90
QScopedPointer< QAction > mActionFlipHorizontal
Definition boardeditor.h:266
QStringList getSearchToolBarCompleterList() noexcept
Definition boardeditor.cpp:1430
QScopedPointer< QAction > mActionImportSpecctra
Definition boardeditor.h:225
QScopedPointer< QAction > mActionToolZone
Definition boardeditor.h:287
void performScheduledTasks() noexcept
Definition boardeditor.cpp:1481
QScopedPointer< QAction > mActionZoomOut
Definition boardeditor.h:253
QScopedPointer< QAction > mActionToggle3D
Definition boardeditor.h:254
QScopedPointer< QAction > mActionIgnoreLocks
Definition boardeditor.h:250
QScopedPointer< QAction > mActionToolText
Definition boardeditor.h:285
QScopedPointer< QAction > mActionCopyBoard
Definition boardeditor.h:239
void loadLayersVisibility() noexcept
Definition boardeditor.cpp:524
QScopedPointer< OpenGlView > mOpenGlView
Definition boardeditor.h:183
QScopedPointer< QAction > mActionSnapToGrid
Definition boardeditor.h:268
The BoardGraphicsScene class.
Definition boardgraphicsscene.h:77
The BoardLayersDock class.
Definition boardlayersdock.h:48
The ExclusiveActionGroup class groups multiple QAction's together.
Definition exclusiveactiongroup.h:54
This class provides a Dialog (GUI) to choose DXF import settings.
Definition graphicsexportdialog.h:61
The GraphicsLayer class represents a graphical layer used in schematics and boards.
Definition graphicslayer.h:53
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers.
Definition graphicslayer.h:111
The IF_GraphicsViewEventHandler class.
Definition if_graphicsvieweventhandler.h:41
Asynchronously generates a 3D board scene for OpenGL rendering.
Definition openglscenebuilder.h:49
OpenGL 3D viewer widget.
Definition openglview.h:49
The ProjectEditor class.
Definition projecteditor.h:66
The RuleCheckDock class.
Definition rulecheckdock.h:50
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
The UnplacedComponentsDock class.
Definition unplacedcomponentsdock.h:62
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition rulecheckmessage.h:104