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:58
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:300
QScopedPointer< QAction > mActionChangeLineWidth
Definition: boardeditor.h:273
QScopedPointer< QAction > mActionToolPlane
Definition: boardeditor.h:285
QScopedPointer< QAction > mActionZoomFit
Definition: boardeditor.h:250
QScopedPointer< QAction > mActionExportImage
Definition: boardeditor.h:226
QScopedPointer< QAction > mActionFindPrevious
Definition: boardeditor.h:244
void updateEnabledCopperLayers() noexcept
Definition: boardeditor.cpp:515
QScopedPointer< UndoStackActionGroup > mUndoStackActionGroup
Definition: boardeditor.h:295
QScopedPointer< QAction > mActionCut
Definition: boardeditor.h:256
QScopedPointer< QAction > mActionExportLppz
Definition: boardeditor.h:225
QScopedPointer< QAction > mActionDockLayers
Definition: boardeditor.h:291
void startPlaneRebuild(bool full=false) noexcept
Definition: boardeditor.cpp:1523
virtual std::shared_ptr< GraphicsLayer > getLayer(const QString &name) const noexcept override
Definition: boardeditor.h:99
QScopedPointer< QAction > mActionUnlock
Definition: boardeditor.h:269
QScopedPointer< QAction > mActionResetAllTexts
Definition: boardeditor.h:270
QScopedPointer< QAction > mActionZoomIn
Definition: boardeditor.h:251
QScopedPointer< QAction > mActionCopy
Definition: boardeditor.h:257
QScopedPointer< QAction > mActionKeyboardShortcutsReference
Definition: boardeditor.h:209
QPointer< Board > mActiveBoard
Definition: boardeditor.h:188
QScopedPointer< QAction > mActionProjectSetup
Definition: boardeditor.h:218
void execStepExportDialog() noexcept
Definition: boardeditor.cpp:1725
QScopedPointer< QAction > mActionQuit
Definition: boardeditor.h:214
void execBoardSetupDialog(bool switchToDrcSettings=false) noexcept
Definition: boardeditor.cpp:1668
void copyBoard() noexcept
Definition: boardeditor.cpp:1589
QScopedPointer< ExclusiveActionGroup > mToolsActionGroup
Definition: boardeditor.h:296
QScopedPointer< QAction > mActionToolHole
Definition: boardeditor.h:287
QScopedPointer< QAction > mActionMoveDown
Definition: boardeditor.h:262
QScopedPointer< QAction > mActionGridIncrease
Definition: boardeditor.h:247
QScopedPointer< QAction > mActionExportSpecctra
Definition: boardeditor.h:229
QScopedPointer< QAction > mActionDockErc
Definition: boardeditor.h:289
QScopedPointer< QAction > mActionOrderPcb
Definition: boardeditor.h:236
QScopedPointer< QAction > mActionGridProperties
Definition: boardeditor.h:246
void runDrc(bool quick) noexcept
Definition: boardeditor.cpp:1334
void addLayers(const Theme &theme) noexcept
Definition: boardeditor.cpp:450
void on_tabBar_currentChanged(int index)
Definition: boardeditor.cpp:437
QList< std::shared_ptr< GraphicsLayer > > mLayers
Definition: boardeditor.h:189
QScopedPointer< QAction > mActionAbort
Definition: boardeditor.h:279
void hide3DView() noexcept
Definition: boardeditor.cpp:1956
QScopedPointer< QToolBar > mToolBarEdit
Definition: boardeditor.h:301
void boardAdded(int newIndex)
Definition: boardeditor.cpp:415
QScopedPointer< QAction > mActionRotateCcw
Definition: boardeditor.h:263
QScopedPointer< QAction > mActionLock
Definition: boardeditor.h:268
QScopedPointer< QAction > mActionUpdateLibrary
Definition: boardeditor.h:219
void createMenus() noexcept
Definition: boardeditor.cpp:1029
void on_lblUnplacedComponentsNote_linkActivated()
Definition: boardeditor.cpp:441
QScopedPointer< QAction > mActionSaveProject
Definition: boardeditor.h:211
QScopedPointer< QAction > mActionAboutLibrePcb
Definition: boardeditor.h:206
QScopedPointer< RuleCheckDock > mDockErc
Definition: boardeditor.h:310
QList< BI_Device * > getSearchCandidates() noexcept
Definition: boardeditor.cpp:1424
QScopedPointer< QAction > mActionFindNext
Definition: boardeditor.h:243
QScopedPointer< QAction > mActionSelectAll
Definition: boardeditor.h:245
void abortAllCommands() noexcept
Definition: boardeditor.cpp:389
QScopedPointer< QAction > mActionGenerateFabricationData
Definition: boardeditor.h:232
QScopedPointer< QToolBar > mToolBarTools
Definition: boardeditor.h:305
QScopedPointer< QAction > mActionMoveUp
Definition: boardeditor.h:261
QScopedPointer< QGraphicsPathItem > mDrcLocationGraphicsItem
Definition: boardeditor.h:203
QScopedPointer< QToolBar > mToolBarFile
Definition: boardeditor.h:300
bool isActiveTopLevelWindow() const noexcept
Definition: boardeditor.cpp:1546
QScopedPointer< QActionGroup > mBoardActionGroup
Definition: boardeditor.h:297
QScopedPointer< QAction > mActionPreviousPage
Definition: boardeditor.h:241
QScopedPointer< QAction > mActionImportDxf
Definition: boardeditor.h:223
void createToolBars() noexcept
Definition: boardeditor.cpp:889
QScopedPointer< OpenGlSceneBuilder > mOpenGlSceneBuilder
Definition: boardeditor.h:191
QScopedPointer< QAction > mActionShowPlanes
Definition: boardeditor.h:276
QScopedPointer< QAction > mActionDockDrc
Definition: boardeditor.h:290
QScopedPointer< RuleCheckDock > mDockDrc
Definition: boardeditor.h:311
QScopedPointer< QAction > mActionExportStep
Definition: boardeditor.h:228
QScopedPointer< QAction > mActionCloseWindow
Definition: boardeditor.h:213
void execSpecctraImportDialog() noexcept
Definition: boardeditor.cpp:1852
QScopedPointer< QAction > mActionToolSelect
Definition: boardeditor.h:280
void execSpecctraExportDialog() noexcept
Definition: boardeditor.cpp:1796
QScopedPointer< BoardLayersDock > mDockLayers
Definition: boardeditor.h:309
QList< std::shared_ptr< GraphicsLayer > > getAllLayers() const noexcept override
Definition: boardeditor.h:109
QScopedPointer< QAction > mActionGenerateD356Netlist
Definition: boardeditor.h:234
QScopedPointer< BoardEditorFsm > mFsm
Definition: boardeditor.h:195
QScopedPointer< QAction > mActionWebsite
Definition: boardeditor.h:210
QScopedPointer< QAction > mActionUndo
Definition: boardeditor.h:254
ProjectEditor & mProjectEditor
Definition: boardeditor.h:180
QScopedPointer< QAction > mActionRotateCw
Definition: boardeditor.h:264
Board * getActiveBoard() const noexcept
Definition: boardeditor.h:92
QScopedPointer< BoardGraphicsScene > mGraphicsScene
Definition: boardeditor.h:190
QScopedPointer< SearchToolBar > mToolBarSearch
Definition: boardeditor.h:303
QScopedPointer< QAction > mActionHidePlanes
Definition: boardeditor.h:277
QScopedPointer< QAction > mActionToolVia
Definition: boardeditor.h:282
QScopedPointer< QAction > mActionRebuildPlanes
Definition: boardeditor.h:278
void createDockWidgets() noexcept
Definition: boardeditor.cpp:976
QScopedPointer< QAction > mActionOutputJobs
Definition: boardeditor.h:235
QScopedPointer< QAction > mActionFlipVertical
Definition: boardeditor.h:266
QScopedPointer< QAction > mActionMoveLeft
Definition: boardeditor.h:259
QScopedPointer< QToolBar > mToolBarCommand
Definition: boardeditor.h:304
QScopedPointer< QAction > mActionProperties
Definition: boardeditor.h:274
void goToDevice(const QString &name, int index) noexcept
Definition: boardeditor.cpp:1440
BoardEditor(const BoardEditor &other)=delete
void newBoard() noexcept
Definition: boardeditor.cpp:1564
QScopedPointer< QAction > mActionToolTrace
Definition: boardeditor.h:281
QScopedPointer< StandardEditorCommandHandler > mStandardCommandHandler
Definition: boardeditor.h:185
QScopedPointer< QAction > mActionCloseProject
Definition: boardeditor.h:212
void setGridProperties(const PositiveLength &interval, const LengthUnit &unit, Theme::GridStyle style, bool applyToBoard) noexcept
Definition: boardeditor.cpp:1635
QHash< Uuid, tl::optional< RuleCheckMessageList > > mDrcMessages
UUID=Board.
Definition: boardeditor.h:202
void clearDrcMarker() noexcept
Definition: boardeditor.cpp:1419
Project & getProject() const noexcept
Definition: boardeditor.h:91
QPointer< QMenu > mMenuBoard
Definition: boardeditor.h:314
QScopedPointer< QAction > mActionGenerateBom
Definition: boardeditor.h:231
void setDrcMessageApproved(const RuleCheckMessage &msg, bool approved) noexcept
Definition: boardeditor.cpp:1410
void removeBoard() noexcept
Definition: boardeditor.cpp:1617
QScopedPointer< QAction > mActionIncreaseLineWidth
Definition: boardeditor.h:271
Project & mProject
Definition: boardeditor.h:181
qint64 mTimestampOfLastPlaneRebuild
Definition: boardeditor.h:199
QScopedPointer< QAction > mActionExportPdf
Definition: boardeditor.h:227
void execD356NetlistExportDialog() noexcept
Definition: boardeditor.cpp:1768
void scheduleOpenGlSceneUpdate() noexcept
Definition: boardeditor.cpp:1479
QScopedPointer< QAction > mActionControlPanel
Definition: boardeditor.h:217
void unplacedComponentsCountChanged(int count) noexcept
Definition: boardeditor.cpp:1330
QScopedPointer< QToolBar > mToolBarView
Definition: boardeditor.h:302
BoardGraphicsScene * getActiveBoardScene() noexcept
Definition: boardeditor.h:93
QScopedPointer< QAction > mActionToolPolygon
Definition: boardeditor.h:283
QScopedPointer< QAction > mActionDecreaseLineWidth
Definition: boardeditor.h:272
QScopedPointer< QAction > mActionRemoveBoard
Definition: boardeditor.h:239
QScopedPointer< QAction > mActionNewBoard
Definition: boardeditor.h:237
void storeLayersVisibility() noexcept
Definition: boardeditor.cpp:536
QScopedPointer< QAction > mActionDockPlaceDevices
Definition: boardeditor.h:292
QScopedPointer< QAction > mActionOnlineDocumentation
Definition: boardeditor.h:208
QScopedPointer< QAction > mActionFileManager
Definition: boardeditor.h:215
QScopedPointer< QAction > mActionFind
Definition: boardeditor.h:242
QScopedPointer< QAction > mActionMoveRight
Definition: boardeditor.h:260
bool getIgnoreLocks() const noexcept
Definition: boardeditor.cpp:292
~BoardEditor()
Definition: boardeditor.cpp:275
void highlightDrcMessage(const RuleCheckMessage &msg, bool zoomTo) noexcept
Definition: boardeditor.cpp:1383
bool show3DView() noexcept
Definition: boardeditor.cpp:1924
QScopedPointer< UnplacedComponentsDock > mDockUnplacedComponents
Definition: boardeditor.h:308
bool mOpenGlSceneBuildScheduled
Definition: boardeditor.h:192
void execGridPropertiesDialog() noexcept
Definition: boardeditor.cpp:1652
virtual void closeEvent(QCloseEvent *event) noexcept override
Definition: boardeditor.cpp:404
QScopedPointer< QAction > mActionGeneratePickPlace
Definition: boardeditor.h:233
void abortBlockingToolsInOtherEditors() noexcept
Definition: boardeditor.cpp:396
QScopedPointer< ToolBarProxy > mCommandToolBarProxy
Definition: boardeditor.h:184
QScopedPointer< QAction > mActionPaste
Definition: boardeditor.h:258
QScopedPointer< BoardPlaneFragmentsBuilder > mPlaneFragmentsBuilder
Definition: boardeditor.h:198
QScopedPointer< QAction > mActionRunQuickCheck
Definition: boardeditor.h:221
void toolRequested(const QVariant &newTool) noexcept
Definition: boardeditor.cpp:1293
QHash< Uuid, QRectF > mVisibleSceneRect
Definition: boardeditor.h:194
void createActions() noexcept
Definition: boardeditor.cpp:548
QScopedPointer< QAction > mActionPrint
Definition: boardeditor.h:230
void boardRemoved(int oldIndex)
Definition: boardeditor.cpp:426
QScopedPointer< QAction > mActionRunDesignRuleCheck
Definition: boardeditor.h:222
QScopedPointer< QAction > mActionGridDecrease
Definition: boardeditor.h:248
QScopedPointer< QAction > mActionSchematicEditor
Definition: boardeditor.h:216
QScopedPointer< QAction > mActionNextPage
Definition: boardeditor.h:240
virtual bool graphicsViewEventHandler(QEvent *event) override
The event handler method.
Definition: boardeditor.cpp:1194
QScopedPointer< QAction > mActionRedo
Definition: boardeditor.h:255
void updateBoardActionGroup() noexcept
Definition: boardeditor.cpp:1175
QScopedPointer< QAction > mActionBoardSetup
Definition: boardeditor.h:220
QScopedPointer< QAction > mActionAboutQt
Definition: boardeditor.h:207
QScopedPointer< QAction > mActionToolMeasure
Definition: boardeditor.h:288
QScopedPointer< Ui::BoardEditor > mUi
Definition: boardeditor.h:182
qint64 mTimestampOfLastOpenGlSceneRebuild
Definition: boardeditor.h:193
QScopedPointer< QAction > mActionRemove
Definition: boardeditor.h:275
void execGraphicsExportDialog(GraphicsExportDialog::Output output, const QString &settingsKey) noexcept
Definition: boardeditor.cpp:1679
ProjectEditor & getProjectEditor() const noexcept
Definition: boardeditor.h:90
QScopedPointer< QAction > mActionFlipHorizontal
Definition: boardeditor.h:265
QStringList getSearchToolBarCompleterList() noexcept
Definition: boardeditor.cpp:1432
QScopedPointer< QAction > mActionImportSpecctra
Definition: boardeditor.h:224
QScopedPointer< QAction > mActionToolZone
Definition: boardeditor.h:286
void performScheduledTasks() noexcept
Definition: boardeditor.cpp:1483
QScopedPointer< QAction > mActionZoomOut
Definition: boardeditor.h:252
QScopedPointer< QAction > mActionToggle3D
Definition: boardeditor.h:253
QScopedPointer< QAction > mActionIgnoreLocks
Definition: boardeditor.h:249
QScopedPointer< QAction > mActionToolText
Definition: boardeditor.h:284
QScopedPointer< QAction > mActionCopyBoard
Definition: boardeditor.h:238
void loadLayersVisibility() noexcept
Definition: boardeditor.cpp:526
QScopedPointer< OpenGlView > mOpenGlView
Definition: boardeditor.h:183
QScopedPointer< QAction > mActionSnapToGrid
Definition: boardeditor.h:267
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:52
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:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104