Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgMoveTextCommand.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Alvin Wong <alvin@alvinhc.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7#ifndef SVG_MOVE_TEXT_COMMAND_H
8#define SVG_MOVE_TEXT_COMMAND_H
9
10#include <kundo2command.h>
11
12class KoSvgTextShape;
13
15{
16public:
18 const QPointF &newPosition,
19 const QPointF &oldPosition,
20 KUndo2Command *parent = nullptr);
21 ~SvgMoveTextCommand() override = default;
22
23 void redo() override;
24 void undo() override;
25
26 int id() const override;
27 bool mergeWith(const KUndo2Command *other) override;
28
29private:
30 void applyPosition(const QPointF &position);
31
32private:
36};
37
38#endif /* SVG_MOVE_TEXT_COMMAND_H */
int id() const override
SvgMoveTextCommand(KoSvgTextShape *shape, const QPointF &newPosition, const QPointF &oldPosition, KUndo2Command *parent=nullptr)
KoSvgTextShape * m_shape
void applyPosition(const QPointF &position)
bool mergeWith(const KUndo2Command *other) override
~SvgMoveTextCommand() override=default