LibrePCB Developers Documentation
Loading...
Searching...
No Matches
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_EDITOR_CMDDEVICEINSTANCEEDITALL_H
21#define LIBREPCB_EDITOR_CMDDEVICEINSTANCEEDITALL_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../undocommandgroup.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class Angle;
36class BI_Device;
37class Point;
38
39namespace editor {
40
41class CmdBoardStrokeTextEdit;
42class CmdDeviceInstanceEdit;
43
44/*******************************************************************************
45 * Class CmdDeviceInstanceEditAll
46 ******************************************************************************/
47
52public:
53 // Constructors / Destructor
54 explicit CmdDeviceInstanceEditAll(BI_Device& dev) noexcept;
56
57 // General Methods
58 void setPosition(const Point& pos, bool immediate) noexcept;
59 void translate(const Point& deltaPos, bool immediate) noexcept;
60 void setRotation(const Angle& angle, bool immediate) noexcept;
61 void rotate(const Angle& angle, const Point& center, bool immediate) noexcept;
62 void setMirrored(bool mirrored, int innerLayerCount, bool immediate);
63 void mirror(const Point& center, Qt::Orientation orientation,
64 int innerLayerCount, bool immediate);
65 void setLocked(bool locked) noexcept;
66
67private:
69 QVector<CmdBoardStrokeTextEdit*> mTextEditCmds;
70};
71
72/*******************************************************************************
73 * End of File
74 ******************************************************************************/
75
76} // namespace editor
77} // namespace librepcb
78
79#endif
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The BI_Device class.
Definition bi_device.h:57
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The CmdDeviceInstanceEditAll class.
Definition cmddeviceinstanceeditall.h:51
void setPosition(const Point &pos, bool immediate) noexcept
Definition cmddeviceinstanceeditall.cpp:62
void translate(const Point &deltaPos, bool immediate) noexcept
Definition cmddeviceinstanceeditall.cpp:68
QVector< CmdBoardStrokeTextEdit * > mTextEditCmds
Definition cmddeviceinstanceeditall.h:69
CmdDeviceInstanceEdit * mDevEditCmd
Definition cmddeviceinstanceeditall.h:68
void setMirrored(bool mirrored, int innerLayerCount, bool immediate)
Definition cmddeviceinstanceeditall.cpp:96
void mirror(const Point &center, Qt::Orientation orientation, int innerLayerCount, bool immediate)
Definition cmddeviceinstanceeditall.cpp:109
~CmdDeviceInstanceEditAll() noexcept
Definition cmddeviceinstanceeditall.cpp:55
void setLocked(bool locked) noexcept
Definition cmddeviceinstanceeditall.cpp:120
void rotate(const Angle &angle, const Point &center, bool immediate) noexcept
Definition cmddeviceinstanceeditall.cpp:87
void setRotation(const Angle &angle, bool immediate) noexcept
Definition cmddeviceinstanceeditall.cpp:77
The CmdDeviceInstanceEdit class.
Definition cmddeviceinstanceedit.h:53
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