LibrePCB Developers Documentation
cmdpastefootprintitems.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_CMDPASTEFOOTPRINTITEMS_H
21#define LIBREPCB_EDITOR_CMDPASTEFOOTPRINTITEMS_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 Footprint;
40class Package;
41
42namespace editor {
43
44class FootprintClipboardData;
45class FootprintGraphicsItem;
46
47/*******************************************************************************
48 * Class CmdPasteFootprintItems
49 ******************************************************************************/
50
55public:
56 // Constructors / Destructor
59 CmdPasteFootprintItems(Package& package, Footprint& footprint,
60 FootprintGraphicsItem& graphicsItem,
61 std::unique_ptr<FootprintClipboardData> data,
62 const Point& posOffset) noexcept;
63 ~CmdPasteFootprintItems() noexcept;
64
65 // Operator Overloadings
66 CmdPasteFootprintItems& operator=(const CmdPasteFootprintItems& rhs) = delete;
67
68protected: // Methods
70 bool performExecute() override;
71
72private: // Data
76 std::unique_ptr<FootprintClipboardData> mData;
78};
79
80/*******************************************************************************
81 * End of File
82 ******************************************************************************/
83
84} // namespace editor
85} // namespace librepcb
86
87#endif
The Footprint class represents one footprint variant of a package.
Definition: footprint.h:55
The Package class represents a package of a component (including footprint and 3D model)
Definition: package.h:59
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The CmdPasteFootprintItems class.
Definition: cmdpastefootprintitems.h:54
Footprint & mFootprint
Definition: cmdpastefootprintitems.h:74
Package & mPackage
Definition: cmdpastefootprintitems.h:73
CmdPasteFootprintItems(const CmdPasteFootprintItems &other)=delete
~CmdPasteFootprintItems() noexcept
Definition: cmdpastefootprintitems.cpp:69
Point mPosOffset
Definition: cmdpastefootprintitems.h:77
bool performExecute() override
Execute the command the first time.
Definition: cmdpastefootprintitems.cpp:76
FootprintGraphicsItem & mGraphicsItem
Definition: cmdpastefootprintitems.h:75
std::unique_ptr< FootprintClipboardData > mData
Definition: cmdpastefootprintitems.h:76
The FootprintClipboardData class.
Definition: footprintclipboarddata.h:55
The FootprintGraphicsItem class.
Definition: footprintgraphicsitem.h:66
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition: undocommandgroup.h:44
Definition: occmodel.cpp:77