File indexing completed on 2024-06-23 04:28:11

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef SHAPEGRADIENTEDITSTRATEGY_H
0008 #define SHAPEGRADIENTEDITSTRATEGY_H
0009 
0010 #include <QScopedPointer>
0011 #include <KoInteractionStrategy.h>
0012 #include "KoShapeGradientHandles.h"
0013 
0014 class ShapeGradientEditStrategy : public KoInteractionStrategy
0015 {
0016 public:
0017     ShapeGradientEditStrategy(KoToolBase *tool,
0018                               KoFlake::FillVariant fillVariant,
0019                               KoShape *shape,
0020                               KoShapeGradientHandles::Handle::Type startHandleType,
0021                               const QPointF &clicked);
0022     ~ShapeGradientEditStrategy() override;
0023 
0024     void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
0025     KUndo2Command *createCommand() override;
0026     void finishInteraction(Qt::KeyboardModifiers modifiers) override;
0027     void paint(QPainter &painter, const KoViewConverter &converter) override;
0028 
0029 private:
0030     struct Private;
0031     QScopedPointer<Private> m_d;
0032 };
0033 
0034 #endif // SHAPEGRADIENTEDITSTRATEGY_H