LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdpastesymbolitems.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_CMDPASTESYMBOLITEMS_H
21#define LIBREPCB_EDITOR_CMDPASTESYMBOLITEMS_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../undocommandgroup.h"
27
29
30#include <QtCore>
31
32#include <memory>
33
34/*******************************************************************************
35 * Namespace / Forward Declarations
36 ******************************************************************************/
37namespace librepcb {
38
39class Symbol;
40
41namespace editor {
42
43class SymbolClipboardData;
44class SymbolGraphicsItem;
45
46/*******************************************************************************
47 * Class CmdPasteSymbolItems
48 ******************************************************************************/
49
54public:
55 // Constructors / Destructor
58 CmdPasteSymbolItems(Symbol& symbol, SymbolGraphicsItem& graphicsItem,
59 std::unique_ptr<SymbolClipboardData> data,
60 const Point& posOffset) noexcept;
61 ~CmdPasteSymbolItems() noexcept;
62
63 // Operator Overloadings
64 CmdPasteSymbolItems& operator=(const CmdPasteSymbolItems& rhs) = delete;
65
66protected: // Methods
68 bool performExecute() override;
69
70private: // Data
75};
76
77/*******************************************************************************
78 * End of File
79 ******************************************************************************/
80
81} // namespace editor
82} // namespace librepcb
83
84#endif
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The Symbol class represents the part of a component which is added to schematics.
Definition symbol.h:55
The CmdPasteSymbolItems class.
Definition cmdpastesymbolitems.h:53
SymbolGraphicsItem & mGraphicsItem
Definition cmdpastesymbolitems.h:72
Symbol & mSymbol
Definition cmdpastesymbolitems.h:71
CmdPasteSymbolItems(const CmdPasteSymbolItems &other)=delete
Point mPosOffset
Definition cmdpastesymbolitems.h:74
~CmdPasteSymbolItems() noexcept
Definition cmdpastesymbolitems.cpp:64
bool performExecute() override
Execute the command the first time.
Definition cmdpastesymbolitems.cpp:71
std::unique_ptr< SymbolClipboardData > mData
Definition cmdpastesymbolitems.h:73
The SymbolClipboardData class.
Definition symbolclipboarddata.h:52
The SymbolGraphicsItem class.
Definition symbolgraphicsitem.h:56
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition undocommandgroup.h:44
Definition occmodel.cpp:76
Definition uuid.h:186