LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdlibrarycategoryedit.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_CMDLIBRARYCATEGORYEDIT_H
21#define LIBREPCB_EDITOR_CMDLIBRARYCATEGORYEDIT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
29
30#include <QtCore>
31
32/*******************************************************************************
33 * Namespace / Forward Declarations
34 ******************************************************************************/
35namespace librepcb {
36namespace editor {
37
38/*******************************************************************************
39 * Class CmdLibraryCategoryEdit
40 ******************************************************************************/
41
46public:
47 // Constructors / Destructor
50 explicit CmdLibraryCategoryEdit(LibraryCategory& category) noexcept;
51 virtual ~CmdLibraryCategoryEdit() noexcept;
52
53 // Setters
54 void setParentUuid(const std::optional<Uuid>& parentUuid) noexcept;
55
56 // Operator Overloadings
57 CmdLibraryCategoryEdit& operator=(const CmdLibraryCategoryEdit& rhs) = delete;
58
59private: // Methods
61 virtual bool performExecute() override;
62
64 virtual void performUndo() override;
65
67 virtual void performRedo() override;
68
69private: // Data
71
74};
75
76/*******************************************************************************
77 * End of File
78 ******************************************************************************/
79
80} // namespace editor
81} // namespace librepcb
82
83#endif
The LibraryCategory class extends the LibraryBaseElement class with some attributes and methods which...
Definition librarycategory.h:43
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The CmdLibraryBaseElementEdit class.
Definition cmdlibrarybaseelementedit.h:45
The CmdLibraryCategoryEdit class.
Definition cmdlibrarycategoryedit.h:45
virtual void performRedo() override
Redo the command.
Definition cmdlibrarycategoryedit.cpp:73
virtual ~CmdLibraryCategoryEdit() noexcept
Definition cmdlibrarycategoryedit.cpp:45
void setParentUuid(const std::optional< Uuid > &parentUuid) noexcept
Definition cmdlibrarycategoryedit.cpp:52
virtual void performUndo() override
Undo the command.
Definition cmdlibrarycategoryedit.cpp:68
std::optional< Uuid > mNewParentUuid
Definition cmdlibrarycategoryedit.h:73
std::optional< Uuid > mOldParentUuid
Definition cmdlibrarycategoryedit.h:72
CmdLibraryCategoryEdit(const CmdLibraryCategoryEdit &other)=delete
virtual bool performExecute() override
Execute the command the first time.
Definition cmdlibrarycategoryedit.cpp:62
LibraryCategory & mCategory
Definition cmdlibrarycategoryedit.h:70
Definition occmodel.cpp:76
Definition uuid.h:186