LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdsimplifyschematicsegments.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_CMDSIMPLIFYSCHEMATICSEGMENTS_H
21#define LIBREPCB_EDITOR_CMDSIMPLIFYSCHEMATICSEGMENTS_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../undocommandgroup.h"
27
29
30#include <QtCore>
31
32/*******************************************************************************
33 * Namespace / Forward Declarations
34 ******************************************************************************/
35namespace librepcb {
36
37class Point;
38class SI_BusJunction;
39class SI_BusSegment;
40class SI_NetLineAnchor;
41class SI_NetSegment;
42
43namespace editor {
44
45/*******************************************************************************
46 * Class CmdSimplifySchematicSegments
47 ******************************************************************************/
48
54public:
55 // Constructors / Destructor
58 delete;
60 const QSet<SI_NetSegment*>& netSegments,
61 const QSet<SI_BusSegment*>& busSegments) noexcept;
63
64 // Operator Overloadings
66 const CmdSimplifySchematicSegments& rhs) = delete;
67
68private: // Methods
70 bool performExecute() override;
71
72 void simplifySegment(SI_BusSegment& segment);
73 void simplifySegment(SI_NetSegment& segment);
74
75private: // Data
78
81};
82
83/*******************************************************************************
84 * End of File
85 ******************************************************************************/
86
87} // namespace editor
88} // namespace librepcb
89
90#endif
The SI_BusJunction class.
Definition si_busjunction.h:45
The SI_BusSegment class.
Definition si_bussegment.h:52
The SI_NetSegment class.
Definition si_netsegment.h:55
Undo command which runs librepcb::NetSegmentSimplifier on several librepcb::SI_NetSegment and librepc...
Definition cmdsimplifyschematicsegments.h:53
QHash< SI_BusJunction *, SI_BusJunction * > mReplacedBusJunctions
Definition cmdsimplifyschematicsegments.h:80
QSet< SI_NetSegment * > mNetSegments
Definition cmdsimplifyschematicsegments.h:76
CmdSimplifySchematicSegments(const CmdSimplifySchematicSegments &other)=delete
QSet< SI_BusSegment * > mBusSegments
Definition cmdsimplifyschematicsegments.h:77
~CmdSimplifySchematicSegments() noexcept
Definition cmdsimplifyschematicsegments.cpp:65
QSet< SI_NetSegment * > mTemporarilyRemovedNetSegments
Definition cmdsimplifyschematicsegments.h:79
bool performExecute() override
Execute the command the first time.
Definition cmdsimplifyschematicsegments.cpp:72
void simplifySegment(SI_BusSegment &segment)
Definition cmdsimplifyschematicsegments.cpp:93
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition undocommandgroup.h:44
Definition occmodel.cpp:77