LibrePCB Developers Documentation
cmddevicepadsignalmapitemedit.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_CMDDEVICEPADSIGNALMAPITEMEDIT_H
21#define LIBREPCB_EDITOR_CMDDEVICEPADSIGNALMAPITEMEDIT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../cmd/cmdlistelementinsert.h"
27#include "../../cmd/cmdlistelementremove.h"
28#include "../../cmd/cmdlistelementsswap.h"
29#include "../../undocommand.h"
30
33
34#include <QtCore>
35
36/*******************************************************************************
37 * Namespace / Forward Declarations
38 ******************************************************************************/
39namespace librepcb {
40namespace editor {
41
42/*******************************************************************************
43 * Class CmdDevicePadSignalMapItemEdit
44 ******************************************************************************/
45
50public:
51 // Constructors / Destructor
54 delete;
57
58 // Setters
59 void setSignalUuid(const tl::optional<Uuid>& uuid) noexcept;
60
61 // Operator Overloadings
63 const CmdDevicePadSignalMapItemEdit& rhs) = delete;
64
65private: // Methods
67 bool performExecute() override;
68
70 void performUndo() override;
71
73 void performRedo() override;
74
75private: // Data
77
80};
81
82/*******************************************************************************
83 * Undo Commands
84 ******************************************************************************/
85
95
96/*******************************************************************************
97 * End of File
98 ******************************************************************************/
99
100} // namespace editor
101} // namespace librepcb
102
103#endif
The DevicePadSignalMapItem class.
Definition: devicepadsignalmap.h:42
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The CmdDevicePadSignalMapItemEdit class.
Definition: cmddevicepadsignalmapitemedit.h:49
void performRedo() override
Redo the command.
Definition: cmddevicepadsignalmapitemedit.cpp:73
tl::optional< Uuid > mNewSignalUuid
Definition: cmddevicepadsignalmapitemedit.h:79
void setSignalUuid(const tl::optional< Uuid > &uuid) noexcept
Definition: cmddevicepadsignalmapitemedit.cpp:52
tl::optional< Uuid > mOldSignalUuid
Definition: cmddevicepadsignalmapitemedit.h:78
void performUndo() override
Undo the command.
Definition: cmddevicepadsignalmapitemedit.cpp:69
DevicePadSignalMapItem & mItem
Definition: cmddevicepadsignalmapitemedit.h:76
CmdDevicePadSignalMapItemEdit(const CmdDevicePadSignalMapItemEdit &other)=delete
~CmdDevicePadSignalMapItemEdit() noexcept
Definition: cmddevicepadsignalmapitemedit.cpp:45
bool performExecute() override
Execute the command the first time.
Definition: cmddevicepadsignalmapitemedit.cpp:62
The CmdListElementInsert class.
Definition: cmdlistelementinsert.h:46
The CmdListElementRemove class.
Definition: cmdlistelementremove.h:46
The CmdListElementsSwap class.
Definition: cmdlistelementsswap.h:46
The UndoCommand class represents a command which you can undo/redo.
Definition: undocommand.h:46
Definition: occmodel.cpp:77
Definition: uuid.h:183
Definition: devicepadsignalmap.h:97