LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_LIBRARY_EDITOR_CMDPASTEFOOTPRINTITEMS_H
21 #define LIBREPCB_LIBRARY_EDITOR_CMDPASTEFOOTPRINTITEMS_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
28 
29 #include <QtCore>
30 
31 #include <memory>
32 
33 /*******************************************************************************
34  * Namespace / Forward Declarations
35  ******************************************************************************/
36 namespace librepcb {
37 namespace library {
38 
39 class Package;
40 class Footprint;
41 class FootprintGraphicsItem;
42 
43 namespace editor {
44 
45 class FootprintClipboardData;
46 
47 /*******************************************************************************
48  * Class CmdPasteFootprintItems
49  ******************************************************************************/
50 
55 public:
56  // Constructors / Destructor
57  CmdPasteFootprintItems() = delete;
58  CmdPasteFootprintItems(const CmdPasteFootprintItems& other) = delete;
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
67 
68 protected: // Methods
70  bool performExecute() override;
71 
72 private: // Data
76  std::unique_ptr<FootprintClipboardData> mData;
78 };
79 
80 /*******************************************************************************
81  * End of File
82  ******************************************************************************/
83 
84 } // namespace editor
85 } // namespace library
86 } // namespace librepcb
87 
88 #endif // LIBREPCB_LIBRARY_EDITOR_CMDPASTEFOOTPRINTITEMS_H
The CmdPasteFootprintItems class.
Definition: cmdpastefootprintitems.h:54
The Package class represents a package of a component (including footprint and 3D model) ...
Definition: package.h:56
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition: undocommandgroup.h:43
~CmdPasteFootprintItems() noexcept
Definition: cmdpastefootprintitems.cpp:63
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:78
CmdPasteFootprintItems & operator=(const CmdPasteFootprintItems &rhs)=delete
std::unique_ptr< FootprintClipboardData > mData
Definition: cmdpastefootprintitems.h:76
The FootprintGraphicsItem class.
Definition: footprintgraphicsitem.h:62
FootprintGraphicsItem & mGraphicsItem
Definition: cmdpastefootprintitems.h:75
bool performExecute() override
Execute the command the first time.
Definition: cmdpastefootprintitems.cpp:70
Point mPosOffset
Definition: cmdpastefootprintitems.h:77
Package & mPackage
Definition: cmdpastefootprintitems.h:73
The Footprint class represents one footprint variant of a package.
Definition: footprint.h:61
Footprint & mFootprint
Definition: cmdpastefootprintitems.h:74