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++
913 B
Raw Blame
/*
 * SPDX-FileCopyrightText: 2023 Wolthera van Hövell tot Westerflier <[email protected]>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
#ifndef SVGSELECTTEXTSTRATEGY_H
#define SVGSELECTTEXTSTRATEGY_H

#include <KoInteractionStrategy.h>
#include <QPointF>

class SvgTextCursor;

class SvgSelectTextStrategy : public KoInteractionStrategy
{
public:
    SvgSelectTextStrategy(KoToolBase *tool, SvgTextCursor *cursor, const QPointF &clicked, Qt::KeyboardModifiers modifiers);
    ~SvgSelectTextStrategy() override = default;

    void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
    KUndo2Command *createCommand() override;
    void cancelInteraction() override;
    void finishInteraction(Qt::KeyboardModifiers modifiers) override;

private:
    SvgTextCursor *m_cursor;
    QPointF m_dragStart;
    QPointF m_dragEnd;
};

#endif // SVGSELECTTEXTSTRATEGY_H