Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_take_all_shapes_command.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
8
9#include <klocalizedstring.h>
10#include "kis_shape_selection.h"
11#include <kis_image.h>
12
13
14KisTakeAllShapesCommand::KisTakeAllShapesCommand(KisShapeSelection *shapeSelection, bool takeSilently, bool restoreSilently)
15 : KUndo2Command(kundo2_i18n("Clear Vector Selection")),
16 m_shapeSelection(shapeSelection),
17 m_takeSilently(takeSilently),
18 m_restoreSilently(restoreSilently)
19{
20}
21
23{
24 Q_FOREACH (KoShape *shape, m_shapes) {
25 delete shape;
26 }
27}
28
30{
31 if (m_takeSilently) {
33 }
34
36
37 Q_FOREACH (KoShape *shape, m_shapes) {
39 }
40
41 if (m_takeSilently) {
43 }
44}
45
47{
50 }
51
52 Q_FOREACH (KoShape *shape, m_shapes) {
54 }
55
56 m_shapes.clear();
57
60 }
61}
62
void setUpdatesEnabled(bool enabled)
KisTakeAllShapesCommand(KisShapeSelection *shapeSelection, bool takeSilently, bool restoreSilently)
void removeShape(KoShape *shape)
QList< KoShape * > shapes() const
void addShape(KoShape *shape)
KUndo2MagicString kundo2_i18n(const char *text)