LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdsimplifyboardnetsegments.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_CMDSIMPLIFYBOARDNETSEGMENTS_H
21#define LIBREPCB_EDITOR_CMDSIMPLIFYBOARDNETSEGMENTS_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 BI_NetLineAnchor;
38class BI_NetSegment;
39class Point;
40
41namespace editor {
42
43/*******************************************************************************
44 * Class CmdSimplifyBoardNetSegments
45 ******************************************************************************/
46
52public:
53 // Constructors / Destructor
56 delete;
58 const QList<BI_NetSegment*>& segments) noexcept;
60
61 // Operator Overloadings
63 const CmdSimplifyBoardNetSegments& rhs) = delete;
64
65private: // Methods
67 bool performExecute() override;
68
69 void simplifySegment(BI_NetSegment& segment);
70
71private: // Data
73};
74
75/*******************************************************************************
76 * End of File
77 ******************************************************************************/
78
79} // namespace editor
80} // namespace librepcb
81
82#endif
The BI_NetSegment class.
Definition bi_netsegment.h:53
Undo command which runs librepcb::NetSegmentSimplifier on a librepcb::BI_NetSegment.
Definition cmdsimplifyboardnetsegments.h:51
~CmdSimplifyBoardNetSegments() noexcept
Definition cmdsimplifyboardnetsegments.cpp:54
void simplifySegment(BI_NetSegment &segment)
Definition cmdsimplifyboardnetsegments.cpp:72
bool performExecute() override
Execute the command the first time.
Definition cmdsimplifyboardnetsegments.cpp:61
QList< BI_NetSegment * > mSegments
Definition cmdsimplifyboardnetsegments.h:72
CmdSimplifyBoardNetSegments(const CmdSimplifyBoardNetSegments &other)=delete
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