LibrePCB Developers Documentation
Loading...
Searching...
No Matches
schematiceditor.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITOR_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITOR_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "appwindow.h"
27
29
30#include <QtCore>
31
32/*******************************************************************************
33 * Namespace / Forward Declarations
34 ******************************************************************************/
35namespace librepcb {
36
37class Schematic;
38
39namespace editor {
40
41class ProjectEditor;
42
43/*******************************************************************************
44 * Class SchematicEditor
45 ******************************************************************************/
46
50class SchematicEditor final : public QObject {
51 Q_OBJECT
52
53public:
54 // Signals
56
57 // Constructors / Destructor
58 SchematicEditor() = delete;
59 SchematicEditor(const SchematicEditor& other) = delete;
60 explicit SchematicEditor(ProjectEditor& prjEditor, Schematic& schematic,
61 int uiIndex, QObject* parent = nullptr) noexcept;
62 ~SchematicEditor() noexcept;
63
64 // General Methods
66 Schematic& getSchematic() noexcept { return mSchematic; }
67 int getUiIndex() const noexcept { return mUiIndex; }
68 void setUiIndex(int index) noexcept;
69 ui::SchematicData getUiData() const noexcept;
70 void setUiData(const ui::SchematicData& data) noexcept;
71
72 // Operator Overloadings
73 SchematicEditor& operator=(const SchematicEditor& rhs) = delete;
74
75signals:
78
79private:
83};
84
85/*******************************************************************************
86 * End of File
87 ******************************************************************************/
88
89} // namespace editor
90} // namespace librepcb
91
92#endif
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition schematic.h:74
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The ProjectEditor class.
Definition projecteditor.h:63
The SchematicEditor class.
Definition schematiceditor.h:50
SchematicEditor(const SchematicEditor &other)=delete
void setUiData(const ui::SchematicData &data) noexcept
Definition schematiceditor.cpp:73
Schematic & mSchematic
Definition schematiceditor.h:81
ProjectEditor & getProjectEditor() noexcept
Definition schematiceditor.h:65
Signal< SchematicEditor > onUiDataChanged
Definition schematiceditor.h:55
ProjectEditor & mProjectEditor
Definition schematiceditor.h:80
ui::SchematicData getUiData() const noexcept
Definition schematiceditor.cpp:67
int mUiIndex
Definition schematiceditor.h:82
void setUiIndex(int index) noexcept
Definition schematiceditor.cpp:60
int getUiIndex() const noexcept
Definition schematiceditor.h:67
Schematic & getSchematic() noexcept
Definition schematiceditor.h:66
Definition occmodel.cpp:77