Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.0 KB
Raw Blame
/*
 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <[email protected]>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
#ifndef SVGCHANGETEXTPATHINFOSTRATEGY_H
#define SVGCHANGETEXTPATHINFOSTRATEGY_H

#include <KoInteractionStrategy.h>

#include <KoSvgTextShape.h>
#include <KoSvgText.h>


class SvgTextTool;

class SvgChangeTextPathInfoStrategy : public KoInteractionStrategy
{
public:
    SvgChangeTextPathInfoStrategy(SvgTextTool *tool, KoSvgTextShape *shape, const QPointF &clicked, int textCursorPos);
    ~SvgChangeTextPathInfoStrategy() override = default;

    void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
    KUndo2Command *createCommand() override;
    void cancelInteraction() override;
    void finishInteraction(Qt::KeyboardModifiers modifiers) override;
private:
    KoSvgTextShape *m_shape;
    QPointF m_currentMousePos;
    int m_textCursorPos;
    KoSvgText::TextOnPathInfo m_oldInfo;
};

#endif // SVGCHANGETEXTPATHINFOSTRATEGY_H