LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdboardnetsegmentremoveelements.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_CMDBOARDNETSEGMENTREMOVEELEMENTS_H
21#define LIBREPCB_EDITOR_CMDBOARDNETSEGMENTREMOVEELEMENTS_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../undocommand.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class BI_NetLine;
36class BI_NetPoint;
37class BI_NetSegment;
38class BI_Via;
39
40namespace editor {
41
42/*******************************************************************************
43 * Class CmdBoardNetSegmentRemoveElements
44 ******************************************************************************/
45
50public:
51 // Constructors / Destructor
54
55 // General Methods
56 void removeVia(BI_Via& via);
57 void removeNetPoint(BI_NetPoint& netpoint);
58 void removeNetLine(BI_NetLine& netline);
59
60private:
61 // Private Methods
62
64 bool performExecute() override;
65
67 void performUndo() override;
68
70 void performRedo() override;
71
72 // Private Member Variables
74 QList<BI_Via*> mVias;
75 QList<BI_NetPoint*> mNetPoints;
76 QList<BI_NetLine*> mNetLines;
77};
78
79/*******************************************************************************
80 * End of File
81 ******************************************************************************/
82
83} // namespace editor
84} // namespace librepcb
85
86#endif
The BI_NetLine class.
Definition bi_netline.h:71
The BI_NetPoint class.
Definition bi_netpoint.h:46
The BI_NetSegment class.
Definition bi_netsegment.h:52
The BI_Via class.
Definition bi_via.h:44
The CmdBoardNetSegmentRemoveElements class.
Definition cmdboardnetsegmentremoveelements.h:49
void performRedo() override
Redo the command.
Definition cmdboardnetsegmentremoveelements.cpp:80
void removeNetLine(BI_NetLine &netline)
Definition cmdboardnetsegmentremoveelements.cpp:62
void removeVia(BI_Via &via)
Definition cmdboardnetsegmentremoveelements.cpp:54
QList< BI_NetLine * > mNetLines
Definition cmdboardnetsegmentremoveelements.h:76
void performUndo() override
Undo the command.
Definition cmdboardnetsegmentremoveelements.cpp:76
QList< BI_NetPoint * > mNetPoints
Definition cmdboardnetsegmentremoveelements.h:75
BI_NetSegment & mNetSegment
Definition cmdboardnetsegmentremoveelements.h:73
QList< BI_Via * > mVias
Definition cmdboardnetsegmentremoveelements.h:74
~CmdBoardNetSegmentRemoveElements() noexcept
Definition cmdboardnetsegmentremoveelements.cpp:47
void removeNetPoint(BI_NetPoint &netpoint)
Definition cmdboardnetsegmentremoveelements.cpp:58
bool performExecute() override
Execute the command the first time.
Definition cmdboardnetsegmentremoveelements.cpp:70
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
Definition occmodel.cpp:76