LibrePCB Developers Documentation
cmdremoveselectedschematicitems.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_CMDREMOVESELECTEDSCHEMATICITEMS_H
21 #define LIBREPCB_EDITOR_CMDREMOVESELECTEDSCHEMATICITEMS_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../../undocommandgroup.h"
27 
28 #include <QtCore>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 namespace librepcb {
34 
35 class ComponentSignalInstance;
36 class SI_NetLabel;
37 class SI_NetLine;
38 class SI_NetPoint;
39 class SI_NetSegment;
40 class SI_Symbol;
41 
42 namespace editor {
43 
44 class SchematicGraphicsScene;
45 
46 /*******************************************************************************
47  * Class CmdRemoveSelectedSchematicItems
48  ******************************************************************************/
49 
54 public:
55  // Constructors / Destructor
57  SchematicGraphicsScene& scene) noexcept;
59 
60 private:
61  // Private Methods
62 
64  bool performExecute() override;
65 
66  void removeNetSegmentItems(SI_NetSegment& netsegment,
67  const QSet<SI_NetPoint*>& netpointsToRemove,
68  const QSet<SI_NetLine*>& netlinesToRemove,
69  const QSet<SI_NetLabel*>& netlabelsToRemove);
70  void removeSymbol(SI_Symbol& symbol);
72 
73  // Attributes from the constructor
75 };
76 
77 /*******************************************************************************
78  * End of File
79  ******************************************************************************/
80 
81 } // namespace editor
82 } // namespace librepcb
83 
84 #endif
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition: undocommandgroup.h:44
~CmdRemoveSelectedSchematicItems() noexcept
Definition: cmdremoveselectedschematicitems.cpp:83
The CmdRemoveSelectedSchematicItems class.
Definition: cmdremoveselectedschematicitems.h:53
Definition: occmodel.cpp:77
bool performExecute() override
Execute the command the first time.
Definition: cmdremoveselectedschematicitems.cpp:90
CmdRemoveSelectedSchematicItems(SchematicGraphicsScene &scene) noexcept
Definition: cmdremoveselectedschematicitems.cpp:78
SchematicGraphicsScene & mScene
Definition: cmdremoveselectedschematicitems.h:74
The SchematicGraphicsScene class.
Definition: schematicgraphicsscene.h:67
void disconnectComponentSignalInstance(ComponentSignalInstance &signal)
Definition: cmdremoveselectedschematicitems.cpp:325
void removeNetSegmentItems(SI_NetSegment &netsegment, const QSet< SI_NetPoint *> &netpointsToRemove, const QSet< SI_NetLine *> &netlinesToRemove, const QSet< SI_NetLabel *> &netlabelsToRemove)
Definition: cmdremoveselectedschematicitems.cpp:154
The ComponentSignalInstance class.
Definition: componentsignalinstance.h:49
The SI_Symbol class.
Definition: si_symbol.h:54
void removeSymbol(SI_Symbol &symbol)
Definition: cmdremoveselectedschematicitems.cpp:301
The SI_NetSegment class.
Definition: si_netsegment.h:53