20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITOR_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITOR_H
26#include "../../dialogs/graphicsexportdialog.h"
27#include "../../graphics/graphicslayer.h"
28#include "../../widgets/if_graphicsvieweventhandler.h"
29#include "ui_schematiceditor.h"
48class ExclusiveActionGroup;
52class SchematicEditorFsm;
53class SchematicGraphicsScene;
54class SchematicPagesDock;
56class StandardEditorCommandHandler;
58class UndoStackActionGroup;
93 virtual std::shared_ptr<GraphicsLayer>
getLayer(
94 const QString& name)
const noexcept override {
95 foreach (std::shared_ptr<GraphicsLayer> layer,
mLayers) {
96 if (layer->getName() == name) {
104 const noexcept
override {
119 virtual
void closeEvent(QCloseEvent* event) noexcept override;
138 void goToSymbol(const QString& name,
int index) noexcept;
142 Theme::GridStyle style,
143 bool applyToSchematics) noexcept;
146 const QString& settingsKey) noexcept;
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 SI_Symbol class.
Definition si_symbol.h:54
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition schematic.h:74
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 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
The ProjectEditor class.
Definition projecteditor.h:66
The RuleCheckDock class.
Definition rulecheckdock.h:50
The schematic editor finite state machine (FSM)
Definition schematiceditorfsm.h:56
The SchematicEditor class.
Definition schematiceditor.h:73
QScopedPointer< Ui::SchematicEditor > mUi
Definition schematiceditor.h:152
QScopedPointer< QToolBar > mToolBarComponents
Definition schematiceditor.h:243
QScopedPointer< QAction > mActionZoomFit
Definition schematiceditor.h:196
QScopedPointer< QAction > mActionExportImage
Definition schematiceditor.h:177
SchematicEditor(const SchematicEditor &other)=delete
QScopedPointer< QAction > mActionFindPrevious
Definition schematiceditor.h:190
QScopedPointer< QAction > mActionComponentVcc
Definition schematiceditor.h:228
QScopedPointer< UndoStackActionGroup > mUndoStackActionGroup
Definition schematiceditor.h:233
QScopedPointer< QAction > mActionCut
Definition schematiceditor.h:201
QScopedPointer< QAction > mActionExportLppz
Definition schematiceditor.h:176
QList< SI_Symbol * > getSearchCandidates() noexcept
Definition schematiceditor.cpp:1101
QScopedPointer< SchematicGraphicsScene > mGraphicsScene
Definition schematiceditor.h:157
virtual std::shared_ptr< GraphicsLayer > getLayer(const QString &name) const noexcept override
Definition schematiceditor.h:93
QScopedPointer< QAction > mActionResetAllTexts
Definition schematiceditor.h:212
bool setActiveSchematicIndex(int index) noexcept
Definition schematiceditor.cpp:240
QScopedPointer< QAction > mActionZoomIn
Definition schematiceditor.h:197
QScopedPointer< QAction > mActionCopy
Definition schematiceditor.h:202
QScopedPointer< QAction > mActionKeyboardShortcutsReference
Definition schematiceditor.h:165
QScopedPointer< QAction > mActionMirrorHorizontal
Definition schematiceditor.h:210
QScopedPointer< QAction > mActionProjectSetup
Definition schematiceditor.h:174
QScopedPointer< QAction > mActionQuit
Definition schematiceditor.h:170
QScopedPointer< ExclusiveActionGroup > mToolsActionGroup
Definition schematiceditor.h:234
void updateEmptySchematicMessage() noexcept
Definition schematiceditor.cpp:1159
QScopedPointer< QAction > mActionMoveDown
Definition schematiceditor.h:207
QScopedPointer< QAction > mActionGridIncrease
Definition schematiceditor.h:193
virtual QList< std::shared_ptr< GraphicsLayer > > getAllLayers() const noexcept override
Definition schematiceditor.h:103
QScopedPointer< QAction > mActionDockErc
Definition schematiceditor.h:230
QScopedPointer< QAction > mActionOrderPcb
Definition schematiceditor.h:182
QScopedPointer< QAction > mActionGridProperties
Definition schematiceditor.h:192
int getActiveSchematicIndex() const noexcept
Definition schematiceditor.h:86
void addLayers(const Theme &theme) noexcept
Definition schematiceditor.cpp:336
QScopedPointer< QAction > mActionRenameSheet
Definition schematiceditor.h:184
QList< std::shared_ptr< GraphicsLayer > > mLayers
Definition schematiceditor.h:156
QScopedPointer< QAction > mActionRemoveSheet
Definition schematiceditor.h:185
QScopedPointer< QAction > mActionAbort
Definition schematiceditor.h:215
QScopedPointer< QToolBar > mToolBarEdit
Definition schematiceditor.h:238
QScopedPointer< QAction > mActionRotateCcw
Definition schematiceditor.h:208
QScopedPointer< QAction > mActionUpdateLibrary
Definition schematiceditor.h:175
void createMenus() noexcept
Definition schematiceditor.cpp:803
QScopedPointer< QAction > mActionSaveProject
Definition schematiceditor.h:167
QScopedPointer< QAction > mActionAboutLibrePcb
Definition schematiceditor.h:162
QScopedPointer< RuleCheckDock > mDockErc
Definition schematiceditor.h:247
QScopedPointer< QAction > mActionFindNext
Definition schematiceditor.h:189
QScopedPointer< QAction > mActionSelectAll
Definition schematiceditor.h:191
QScopedPointer< QAction > mActionComponentGnd
Definition schematiceditor.h:227
void abortAllCommands() noexcept
Definition schematiceditor.cpp:310
QScopedPointer< QToolBar > mToolBarTools
Definition schematiceditor.h:242
QScopedPointer< QAction > mActionMoveUp
Definition schematiceditor.h:206
void activeSchematicChanged(int index)
QScopedPointer< QToolBar > mToolBarFile
Definition schematiceditor.h:237
QScopedPointer< SchematicPagesDock > mDockPages
Definition schematiceditor.h:246
QScopedPointer< QAction > mActionToolNetLabel
Definition schematiceditor.h:218
QScopedPointer< QAction > mActionPreviousPage
Definition schematiceditor.h:187
void createToolBars() noexcept
Definition schematiceditor.cpp:663
void removeSchematic(int index) noexcept
Definition schematiceditor.cpp:1068
QScopedPointer< QAction > mActionToolComponent
Definition schematiceditor.h:221
QScopedPointer< QAction > mActionCloseWindow
Definition schematiceditor.h:169
QScopedPointer< QAction > mActionNewSheet
Definition schematiceditor.h:183
QScopedPointer< QAction > mActionComponentResistor
Definition schematiceditor.h:223
QScopedPointer< QAction > mActionToolSelect
Definition schematiceditor.h:216
QScopedPointer< QAction > mActionWebsite
Definition schematiceditor.h:166
QScopedPointer< QAction > mActionUndo
Definition schematiceditor.h:199
ProjectEditor & mProjectEditor
Definition schematiceditor.h:150
QScopedPointer< QAction > mActionRotateCw
Definition schematiceditor.h:209
Schematic * getActiveSchematic() const noexcept
Definition schematiceditor.cpp:232
QScopedPointer< SearchToolBar > mToolBarSearch
Definition schematiceditor.h:240
bool useIeee315Symbols() const noexcept
Definition schematiceditor.cpp:1260
void setGridProperties(const PositiveLength &interval, const LengthUnit &unit, Theme::GridStyle style, bool applyToSchematics) noexcept
Definition schematiceditor.cpp:1180
void renameSchematic(int index) noexcept
Definition schematiceditor.cpp:1081
void createDockWidgets() noexcept
Definition schematiceditor.cpp:760
QScopedPointer< QAction > mActionOutputJobs
Definition schematiceditor.h:181
QScopedPointer< QAction > mActionMoveLeft
Definition schematiceditor.h:204
QScopedPointer< QToolBar > mToolBarCommand
Definition schematiceditor.h:241
QScopedPointer< QAction > mActionProperties
Definition schematiceditor.h:213
void updateComponentToolbarIcons() noexcept
Definition schematiceditor.cpp:1165
QScopedPointer< StandardEditorCommandHandler > mStandardCommandHandler
Definition schematiceditor.h:154
QScopedPointer< QAction > mActionCloseProject
Definition schematiceditor.h:168
Project & getProject() const noexcept
Definition schematiceditor.h:85
int mActiveSchematicIndex
Definition schematiceditor.h:155
QScopedPointer< QAction > mActionGenerateBom
Definition schematiceditor.h:180
QScopedPointer< QAction > mActionComponentCapacitorUnipolar
Definition schematiceditor.h:226
QScopedPointer< QAction > mActionDockPages
Definition schematiceditor.h:229
QScopedPointer< QAction > mActionShowPinNumbers
Definition schematiceditor.h:195
Project & mProject
Definition schematiceditor.h:151
QScopedPointer< QAction > mActionExportPdf
Definition schematiceditor.h:178
QScopedPointer< QAction > mActionControlPanel
Definition schematiceditor.h:173
QScopedPointer< QToolBar > mToolBarView
Definition schematiceditor.h:239
void goToSymbol(const QString &name, int index) noexcept
Definition schematiceditor.cpp:1118
QScopedPointer< QAction > mActionToolPolygon
Definition schematiceditor.h:219
QScopedPointer< QAction > mActionOnlineDocumentation
Definition schematiceditor.h:164
QScopedPointer< QAction > mActionFileManager
Definition schematiceditor.h:171
QScopedPointer< QAction > mActionFind
Definition schematiceditor.h:188
QScopedPointer< SchematicEditorFsm > mFsm
Definition schematiceditor.h:159
QScopedPointer< QAction > mActionMoveRight
Definition schematiceditor.h:205
QScopedPointer< QAction > mActionComponentCapacitorBipolar
Definition schematiceditor.h:225
void execGridPropertiesDialog() noexcept
Definition schematiceditor.cpp:1196
virtual void closeEvent(QCloseEvent *event) noexcept override
Definition schematiceditor.cpp:325
void abortBlockingToolsInOtherEditors() noexcept
Definition schematiceditor.cpp:317
QScopedPointer< ToolBarProxy > mCommandToolBarProxy
Definition schematiceditor.h:153
QScopedPointer< QAction > mActionPaste
Definition schematiceditor.h:203
void toolRequested(const QVariant &newTool) noexcept
Definition schematiceditor.cpp:1009
QHash< Uuid, QRectF > mVisibleSceneRect
Definition schematiceditor.h:158
void createActions() noexcept
Definition schematiceditor.cpp:364
SchematicGraphicsScene * getActiveSchematicScene() noexcept
Definition schematiceditor.h:88
QScopedPointer< QAction > mActionPrint
Definition schematiceditor.h:179
QScopedPointer< QAction > mActionGridDecrease
Definition schematiceditor.h:194
QScopedPointer< QAction > mActionNextPage
Definition schematiceditor.h:186
virtual bool graphicsViewEventHandler(QEvent *event) override
The event handler method.
Definition schematiceditor.cpp:911
QScopedPointer< QAction > mActionRedo
Definition schematiceditor.h:200
void addSchematic() noexcept
Definition schematiceditor.cpp:1043
QScopedPointer< QAction > mActionBoardEditor
Definition schematiceditor.h:172
QScopedPointer< QAction > mActionAboutQt
Definition schematiceditor.h:163
QScopedPointer< QAction > mActionMirrorVertical
Definition schematiceditor.h:211
QScopedPointer< QAction > mActionToolMeasure
Definition schematiceditor.h:222
QVector< QMetaObject::Connection > mSchematicConnections
Definition schematiceditor.h:250
QScopedPointer< QAction > mActionRemove
Definition schematiceditor.h:214
void execGraphicsExportDialog(GraphicsExportDialog::Output output, const QString &settingsKey) noexcept
Definition schematiceditor.cpp:1213
ProjectEditor & getProjectEditor() const noexcept
Definition schematiceditor.h:84
QScopedPointer< QAction > mActionToolWire
Definition schematiceditor.h:217
QStringList getSearchToolBarCompleterList() noexcept
Definition schematiceditor.cpp:1110
QScopedPointer< QAction > mActionZoomOut
Definition schematiceditor.h:198
QScopedPointer< QAction > mActionToolText
Definition schematiceditor.h:220
~SchematicEditor()
Definition schematiceditor.cpp:215
QScopedPointer< QAction > mActionComponentInductor
Definition schematiceditor.h:224
The SchematicGraphicsScene class.
Definition schematicgraphicsscene.h:67
The SchematicPagesDock class.
Definition schematicpagesdock.h:59
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:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810