LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdsymbolinstanceeditall.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_CMDSYMBOLINSTANCEEDITALL_H
21#define LIBREPCB_EDITOR_CMDSYMBOLINSTANCEEDITALL_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 Point;
37class SI_Symbol;
38
39namespace editor {
40
41class CmdSymbolInstanceEdit;
42class CmdTextEdit;
43
44/*******************************************************************************
45 * Class CmdSymbolInstanceEditAll
46 ******************************************************************************/
47
52public:
53 // Constructors / Destructor
54 explicit CmdSymbolInstanceEditAll(SI_Symbol& symbol) 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, bool immediate) noexcept;
63 void mirror(const Point& center, Qt::Orientation orientation,
64 bool immediate) noexcept;
65
66private:
68 QVector<CmdTextEdit*> mTextEditCmds;
69};
70
71/*******************************************************************************
72 * End of File
73 ******************************************************************************/
74
75} // namespace editor
76} // namespace librepcb
77
78#endif
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The SI_Symbol class.
Definition si_symbol.h:54
The CmdSymbolInstanceEditAll class.
Definition cmdsymbolinstanceeditall.h:51
void setPosition(const Point &pos, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:62
void translate(const Point &deltaPos, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:68
void setMirrored(bool mirrored, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:96
void mirror(const Point &center, Qt::Orientation orientation, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:107
CmdSymbolInstanceEdit * mSymEditCmd
Definition cmdsymbolinstanceeditall.h:67
QVector< CmdTextEdit * > mTextEditCmds
Definition cmdsymbolinstanceeditall.h:68
void rotate(const Angle &angle, const Point &center, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:87
~CmdSymbolInstanceEditAll() noexcept
Definition cmdsymbolinstanceeditall.cpp:55
void setRotation(const Angle &angle, bool immediate) noexcept
Definition cmdsymbolinstanceeditall.cpp:77
The CmdSymbolInstanceEdit class.
Definition cmdsymbolinstanceedit.h:49
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