Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgTextInsertCommand.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6#ifndef SVGTEXTINSERTCOMMAND_H
7#define SVGTEXTINSERTCOMMAND_H
8
9#include <kundo2command.h>
10#include "kritatoolsvgtext_export.h"
11#include <KoSvgTextShape.h>
12
13class KRITATOOLSVGTEXT_EXPORT SvgTextInsertCommand : public KUndo2Command
14{
15public:
16 SvgTextInsertCommand(KoSvgTextShape *shape, int pos, int anchor, QString text, KUndo2Command *parent = 0);
17 ~SvgTextInsertCommand() override = default;
18
19 void redo() override;
20
21 void undo() override;
22
23 int id() const override;
24 bool mergeWith(const KUndo2Command *other) override;
25
26private:
28
29 int m_pos;
31 QString m_text;
33};
34
35#endif // SVGTEXTINSERTCOMMAND_H
virtual bool mergeWith(const KUndo2Command *other)
virtual void undo()
virtual void redo()
virtual int id() const
KoSvgTextShapeMementoSP m_textData
~SvgTextInsertCommand() override=default