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" 48 class ExclusiveActionGroup;
52 class SchematicEditorFsm;
53 class SchematicGraphicsScene;
54 class SchematicPagesDock;
56 class StandardEditorCommandHandler;
58 class UndoStackActionGroup;
61 class SchematicEditor;
87 Schematic* getActiveSchematic()
const noexcept;
89 return mGraphicsScene.data();
93 virtual std::shared_ptr<GraphicsLayer>
getLayer(
const QString& name)
const 95 foreach (std::shared_ptr<GraphicsLayer> layer, mLayers) {
96 if (layer->getName() == name) {
109 bool setActiveSchematicIndex(
int index) noexcept;
112 void abortAllCommands() noexcept;
113 void abortBlockingToolsInOtherEditors() noexcept;
119 virtual void closeEvent(QCloseEvent* event) noexcept
override;
122 void activeSchematicChanged(
int index);
126 void addLayers(
const Theme& theme) noexcept;
127 void createActions() noexcept;
128 void createToolBars() noexcept;
129 void createDockWidgets() noexcept;
130 void createMenus() noexcept;
131 virtual bool graphicsViewEventHandler(QEvent* event)
override;
132 void toolRequested(
const QVariant& newTool) noexcept;
133 void addSchematic() noexcept;
134 void removeSchematic(
int index) noexcept;
135 void renameSchematic(
int index) noexcept;
136 QList<SI_Symbol*> getSearchCandidates() noexcept;
137 QStringList getSearchToolBarCompleterList() noexcept;
138 void goToSymbol(
const QString& name,
int index) noexcept;
139 void updateEmptySchematicMessage() noexcept;
140 void updateComponentToolbarIcons() noexcept;
143 bool applyToSchematics) noexcept;
144 void execGridPropertiesDialog() noexcept;
146 const QString& settingsKey) noexcept;
147 bool useIeee315Symbols()
const noexcept;
152 QScopedPointer<Ui::SchematicEditor>
mUi;
156 QList<std::shared_ptr<GraphicsLayer>>
mLayers;
159 QScopedPointer<SchematicEditorFsm>
mFsm;
QScopedPointer< QAction > mActionExportPdf
Definition: schematiceditor.h:178
QScopedPointer< QAction > mActionFind
Definition: schematiceditor.h:188
QScopedPointer< QAction > mActionFileManager
Definition: schematiceditor.h:171
The ProjectEditor class.
Definition: projecteditor.h:62
QScopedPointer< QAction > mActionToolMeasure
Definition: schematiceditor.h:222
QScopedPointer< QAction > mActionRedo
Definition: schematiceditor.h:200
QScopedPointer< QAction > mActionZoomIn
Definition: schematiceditor.h:197
virtual std::shared_ptr< GraphicsLayer > getLayer(const QString &name) const noexcept override
Definition: schematiceditor.h:93
Project & mProject
Definition: schematiceditor.h:151
QScopedPointer< QAction > mActionComponentVcc
Definition: schematiceditor.h:228
QScopedPointer< Ui::SchematicEditor > mUi
Definition: schematiceditor.h:152
QScopedPointer< QAction > mActionRemove
Definition: schematiceditor.h:214
QScopedPointer< QAction > mActionMirrorVertical
Definition: schematiceditor.h:211
QScopedPointer< QAction > mActionExportLppz
Definition: schematiceditor.h:176
virtual QList< std::shared_ptr< GraphicsLayer > > getAllLayers() const noexcept override
Definition: schematiceditor.h:103
QScopedPointer< QAction > mActionKeyboardShortcutsReference
Definition: schematiceditor.h:165
QScopedPointer< ToolBarProxy > mCommandToolBarProxy
Definition: schematiceditor.h:153
QScopedPointer< QAction > mActionNewSheet
Definition: schematiceditor.h:183
QScopedPointer< QAction > mActionDockPages
Definition: schematiceditor.h:229
Definition: occmodel.cpp:76
QScopedPointer< QAction > mActionOrderPcb
Definition: schematiceditor.h:182
QScopedPointer< QAction > mActionResetAllTexts
Definition: schematiceditor.h:212
QScopedPointer< QAction > mActionToolText
Definition: schematiceditor.h:220
QScopedPointer< QAction > mActionCloseWindow
Definition: schematiceditor.h:169
QScopedPointer< QAction > mActionCopy
Definition: schematiceditor.h:202
QScopedPointer< QAction > mActionMoveRight
Definition: schematiceditor.h:205
QScopedPointer< QAction > mActionComponentCapacitorBipolar
Definition: schematiceditor.h:225
The SchematicEditor class.
Definition: schematiceditor.h:71
QScopedPointer< QAction > mActionControlPanel
Definition: schematiceditor.h:173
QScopedPointer< QAction > mActionNextPage
Definition: schematiceditor.h:186
QScopedPointer< QAction > mActionUpdateLibrary
Definition: schematiceditor.h:175
QScopedPointer< QAction > mActionToolWire
Definition: schematiceditor.h:217
QScopedPointer< QAction > mActionAboutLibrePcb
Definition: schematiceditor.h:162
int getActiveSchematicIndex() const noexcept
Definition: schematiceditor.h:86
QScopedPointer< QAction > mActionZoomFit
Definition: schematiceditor.h:196
QScopedPointer< QToolBar > mToolBarTools
Definition: schematiceditor.h:242
QList< std::shared_ptr< GraphicsLayer > > mLayers
Definition: schematiceditor.h:156
QScopedPointer< QAction > mActionMoveDown
Definition: schematiceditor.h:207
QScopedPointer< QAction > mActionSaveProject
Definition: schematiceditor.h:167
QScopedPointer< QAction > mActionSelectAll
Definition: schematiceditor.h:191
The SchematicGraphicsScene class.
Definition: schematicgraphicsscene.h:67
QVector< QMetaObject::Connection > mSchematicConnections
Definition: schematiceditor.h:250
QScopedPointer< QAction > mActionRemoveSheet
Definition: schematiceditor.h:185
int mActiveSchematicIndex
Definition: schematiceditor.h:155
QScopedPointer< QAction > mActionFindPrevious
Definition: schematiceditor.h:190
QScopedPointer< QToolBar > mToolBarComponents
Definition: schematiceditor.h:243
The Schematic class represents one schematic page of a project and is always part of a circuit...
Definition: schematic.h:74
QScopedPointer< QAction > mActionPreviousPage
Definition: schematiceditor.h:187
QScopedPointer< SchematicEditorFsm > mFsm
Definition: schematiceditor.h:159
QScopedPointer< QAction > mActionMoveUp
Definition: schematiceditor.h:206
QScopedPointer< QAction > mActionUndo
Definition: schematiceditor.h:199
QScopedPointer< RuleCheckDock > mDockErc
Definition: schematiceditor.h:247
QScopedPointer< QAction > mActionGridProperties
Definition: schematiceditor.h:192
Project & getProject() const noexcept
Definition: schematiceditor.h:85
QScopedPointer< StandardEditorCommandHandler > mStandardCommandHandler
Definition: schematiceditor.h:154
QScopedPointer< QToolBar > mToolBarCommand
Definition: schematiceditor.h:241
QScopedPointer< QAction > mActionOnlineDocumentation
Definition: schematiceditor.h:164
QScopedPointer< SchematicGraphicsScene > mGraphicsScene
Definition: schematiceditor.h:157
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers...
Definition: graphicslayer.h:111
QScopedPointer< QAction > mActionAbort
Definition: schematiceditor.h:215
The IF_GraphicsViewEventHandler class.
Definition: if_graphicsvieweventhandler.h:41
QScopedPointer< QAction > mActionDockErc
Definition: schematiceditor.h:230
QScopedPointer< QAction > mActionComponentInductor
Definition: schematiceditor.h:224
QScopedPointer< QAction > mActionToolPolygon
Definition: schematiceditor.h:219
QScopedPointer< QAction > mActionRenameSheet
Definition: schematiceditor.h:184
QScopedPointer< QToolBar > mToolBarFile
Definition: schematiceditor.h:237
QScopedPointer< QAction > mActionToolSelect
Definition: schematiceditor.h:216
GridStyle
Definition: theme.h:49
QScopedPointer< QAction > mActionAboutQt
Definition: schematiceditor.h:163
QScopedPointer< QAction > mActionGridDecrease
Definition: schematiceditor.h:194
QScopedPointer< QAction > mActionShowPinNumbers
Definition: schematiceditor.h:195
ProjectEditor & getProjectEditor() const noexcept
Definition: schematiceditor.h:84
QScopedPointer< ExclusiveActionGroup > mToolsActionGroup
Definition: schematiceditor.h:234
The Project class represents a whole (opened) project with all its content.
Definition: project.h:71
QScopedPointer< QAction > mActionBoardEditor
Definition: schematiceditor.h:172
QScopedPointer< QAction > mActionZoomOut
Definition: schematiceditor.h:198
QScopedPointer< QAction > mActionCloseProject
Definition: schematiceditor.h:168
QScopedPointer< QAction > mActionQuit
Definition: schematiceditor.h:170
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:785
QScopedPointer< SchematicPagesDock > mDockPages
Definition: schematiceditor.h:246
QScopedPointer< QAction > mActionToolNetLabel
Definition: schematiceditor.h:218
QScopedPointer< QAction > mActionComponentGnd
Definition: schematiceditor.h:227
QHash< Uuid, QRectF > mVisibleSceneRect
Definition: schematiceditor.h:158
QScopedPointer< QAction > mActionExportImage
Definition: schematiceditor.h:177
QScopedPointer< QAction > mActionMirrorHorizontal
Definition: schematiceditor.h:210
QScopedPointer< QAction > mActionWebsite
Definition: schematiceditor.h:166
ProjectEditor & mProjectEditor
Definition: schematiceditor.h:150
QScopedPointer< QAction > mActionProperties
Definition: schematiceditor.h:213
Output
Definition: graphicsexportdialog.h:83
SchematicGraphicsScene * getActiveSchematicScene() noexcept
Definition: schematiceditor.h:88
QScopedPointer< QAction > mActionRotateCcw
Definition: schematiceditor.h:208
QScopedPointer< QAction > mActionMoveLeft
Definition: schematiceditor.h:204
QScopedPointer< UndoStackActionGroup > mUndoStackActionGroup
Definition: schematiceditor.h:233
QScopedPointer< QAction > mActionFindNext
Definition: schematiceditor.h:189
QScopedPointer< QAction > mActionToolComponent
Definition: schematiceditor.h:221
QScopedPointer< QToolBar > mToolBarEdit
Definition: schematiceditor.h:238
QScopedPointer< QAction > mActionCut
Definition: schematiceditor.h:201
QScopedPointer< QAction > mActionOutputJobs
Definition: schematiceditor.h:181
QScopedPointer< SearchToolBar > mToolBarSearch
Definition: schematiceditor.h:240
Theme class as used by librepcb::WorkspaceSettingsItem_Themes.
Definition: theme.h:44
QScopedPointer< QAction > mActionPaste
Definition: schematiceditor.h:203
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
QScopedPointer< QAction > mActionComponentCapacitorUnipolar
Definition: schematiceditor.h:226
QScopedPointer< QToolBar > mToolBarView
Definition: schematiceditor.h:239
QScopedPointer< QAction > mActionRotateCw
Definition: schematiceditor.h:209
QScopedPointer< QAction > mActionPrint
Definition: schematiceditor.h:179
QScopedPointer< QAction > mActionComponentResistor
Definition: schematiceditor.h:223
QScopedPointer< QAction > mActionProjectSetup
Definition: schematiceditor.h:174
QScopedPointer< QAction > mActionGridIncrease
Definition: schematiceditor.h:193
QScopedPointer< QAction > mActionGenerateBom
Definition: schematiceditor.h:180