LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cmddeviceinstanceeditall.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_PROJECT_CMDDEVICEINSTANCEEDITALL_H
21 #define LIBREPCB_PROJECT_CMDDEVICEINSTANCEEDITALL_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
28 
29 #include <QtCore>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 class CmdStrokeTextEdit;
37 
38 namespace project {
39 
40 class BI_Device;
41 class CmdDeviceInstanceEdit;
42 
43 /*******************************************************************************
44  * Class CmdDeviceInstanceEditAll
45  ******************************************************************************/
46 
51 public:
52  // Constructors / Destructor
53  explicit CmdDeviceInstanceEditAll(BI_Device& dev) noexcept;
54  ~CmdDeviceInstanceEditAll() noexcept;
55 
56  // General Methods
57  void setPosition(const Point& pos, bool immediate) noexcept;
58  void translate(const Point& deltaPos, bool immediate) noexcept;
59  void setRotation(const Angle& angle, bool immediate) noexcept;
60  void rotate(const Angle& angle, const Point& center, bool immediate) noexcept;
61  void setMirrored(bool mirrored, bool immediate);
62  void mirror(const Point& center, Qt::Orientation orientation, bool immediate);
63 
64 private:
66  QVector<CmdStrokeTextEdit*> mTextEditCmds;
67 };
68 
69 /*******************************************************************************
70  * End of File
71  ******************************************************************************/
72 
73 } // namespace project
74 } // namespace librepcb
75 
76 #endif // LIBREPCB_PROJECT_CMDDEVICEINSTANCEEDITALL_H
QVector< CmdStrokeTextEdit * > mTextEditCmds
Definition: cmddeviceinstanceeditall.h:66
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition: undocommandgroup.h:43
The CmdDeviceInstanceEditAll class.
Definition: cmddeviceinstanceeditall.h:50
void setMirrored(bool mirrored, bool immediate)
Definition: cmddeviceinstanceeditall.cpp:93
~CmdDeviceInstanceEditAll() noexcept
Definition: cmddeviceinstanceeditall.cpp:56
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
CmdDeviceInstanceEditAll(BI_Device &dev) noexcept
Definition: cmddeviceinstanceeditall.cpp:44
CmdDeviceInstanceEdit * mDevEditCmd
Definition: cmddeviceinstanceeditall.h:65
The CmdDeviceInstanceEdit class.
Definition: cmddeviceinstanceedit.h:47
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:78
void setPosition(const Point &pos, bool immediate) noexcept
Definition: cmddeviceinstanceeditall.cpp:63
void rotate(const Angle &angle, const Point &center, bool immediate) noexcept
Definition: cmddeviceinstanceeditall.cpp:84
The BI_Device class.
Definition: bi_device.h:62
void setRotation(const Angle &angle, bool immediate) noexcept
Definition: cmddeviceinstanceeditall.cpp:78
void translate(const Point &deltaPos, bool immediate) noexcept
Definition: cmddeviceinstanceeditall.cpp:69
void mirror(const Point &center, Qt::Orientation orientation, bool immediate)
Definition: cmddeviceinstanceeditall.cpp:100