LibrePCB Developers Documentation
cmdcomponentpinsignalmapitemedit.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_CMDCOMPONENTPINSIGNALMAPITEMEDIT_H
21#define LIBREPCB_EDITOR_CMDCOMPONENTPINSIGNALMAPITEMEDIT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../undocommand.h"
27
30
31#include <QtCore>
32
33/*******************************************************************************
34 * Namespace / Forward Declarations
35 ******************************************************************************/
36namespace librepcb {
37
38class ComponentPinSignalMapItem;
39
40namespace editor {
41
42/*******************************************************************************
43 * Class CmdComponentPinSignalMapItemEdit
44 ******************************************************************************/
45
50public:
51 // Constructors / Destructor
54 const CmdComponentPinSignalMapItemEdit& other) = delete;
56 ComponentPinSignalMapItem& item) noexcept;
58
59 // Setters
60 void setSignalUuid(const tl::optional<Uuid>& uuid) noexcept;
61 void setDisplayType(const CmpSigPinDisplayType& type) noexcept;
62
63 // Operator Overloadings
65 const CmdComponentPinSignalMapItemEdit& rhs) = delete;
66
67private: // Methods
69 bool performExecute() override;
70
72 void performUndo() override;
73
75 void performRedo() override;
76
77private: // Data
79
84};
85
86/*******************************************************************************
87 * End of File
88 ******************************************************************************/
89
90} // namespace editor
91} // namespace librepcb
92
93#endif
The CmpSigPinDisplayType clas.
Definition: cmpsigpindisplaytype.h:40
The ComponentPinSignalMapItem class maps a symbol pin to a component signal.
Definition: componentpinsignalmap.h:50
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The CmdComponentPinSignalMapItemEdit class.
Definition: cmdcomponentpinsignalmapitemedit.h:49
void performRedo() override
Redo the command.
Definition: cmdcomponentpinsignalmapitemedit.cpp:85
CmdComponentPinSignalMapItemEdit(const CmdComponentPinSignalMapItemEdit &other)=delete
ComponentPinSignalMapItem & mItem
Definition: cmdcomponentpinsignalmapitemedit.h:78
tl::optional< Uuid > mNewSignalUuid
Definition: cmdcomponentpinsignalmapitemedit.h:81
void setSignalUuid(const tl::optional< Uuid > &uuid) noexcept
Definition: cmdcomponentpinsignalmapitemedit.cpp:56
tl::optional< Uuid > mOldSignalUuid
Definition: cmdcomponentpinsignalmapitemedit.h:80
void setDisplayType(const CmpSigPinDisplayType &type) noexcept
Definition: cmdcomponentpinsignalmapitemedit.cpp:62
CmpSigPinDisplayType mOldDisplayType
Definition: cmdcomponentpinsignalmapitemedit.h:82
void performUndo() override
Undo the command.
Definition: cmdcomponentpinsignalmapitemedit.cpp:80
~CmdComponentPinSignalMapItemEdit() noexcept
Definition: cmdcomponentpinsignalmapitemedit.cpp:49
CmpSigPinDisplayType mNewDisplayType
Definition: cmdcomponentpinsignalmapitemedit.h:83
bool performExecute() override
Execute the command the first time.
Definition: cmdcomponentpinsignalmapitemedit.cpp:72
The UndoCommand class represents a command which you can undo/redo.
Definition: undocommand.h:46
Definition: occmodel.cpp:77
Definition: uuid.h:183