Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgTextMergePropertiesRangeCommand.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6#ifndef SVGTEXTMERGEPROPERTIESRANGECOMMAND_H
7#define SVGTEXTMERGEPROPERTIESRANGECOMMAND_H
8
9#include <kundo2command.h>
10#include "kritatoolsvgtext_export.h"
11
12#include "KoSvgTextProperties.h"
13#include <KoSvgTextShape.h>
14
15class KoSvgTextShape;
17
24class KRITATOOLSVGTEXT_EXPORT SvgTextMergePropertiesRangeCommand : public KUndo2Command
25{
26public:
28 const KoSvgTextProperties props,
29 const int pos, const int anchor,
30 const QSet<KoSvgTextProperties::PropertyId> removeProperties = QSet<KoSvgTextProperties::PropertyId>(),
31 KUndo2Command *parent = 0);
33
34 void redo() override;
35
36 void undo() override;
37
38 int id() const override;
39 bool mergeWith(const KUndo2Command *other) override;
40private:
43 QSet<KoSvgTextProperties::PropertyId> m_removeProperties;
44
45 int m_pos;
47 int m_startIndex; // for testing merge.
48 int m_endIndex; // for testing merge.
50};
51
52#endif // SVGTEXTMERGEPROPERTIESRANGECOMMAND_H
virtual bool mergeWith(const KUndo2Command *other)
virtual void undo()
virtual void redo()
virtual int id() const
The SvgTextMergePropertiesRangeCommand class This sets properties on a specific range in a single tex...
QSet< KoSvgTextProperties::PropertyId > m_removeProperties
~SvgTextMergePropertiesRangeCommand() override=default