Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeRubberSelectStrategy.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2
3 SPDX-FileCopyrightText: 2006 Thorsten Zachmann <zachmann@kde.org>
4 SPDX-FileCopyrightText: 2006 Thomas Zander <zander@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KOSHAPERUBBERSELECTSTRATEGY_H
10#define KOSHAPERUBBERSELECTSTRATEGY_H
11
13
14#include <QRectF>
15
16#include "kritaflake_export.h"
17
18class KoToolBase;
20
28class KRITAFLAKE_EXPORT KoShapeRubberSelectStrategy : public KoInteractionStrategy
29{
30public:
40 KoShapeRubberSelectStrategy(KoToolBase *tool, const QPointF &clicked, bool useSnapToGrid = false);
41
42 void paint(QPainter &painter, const KoViewConverter &converter) override;
43 void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override;
44 KUndo2Command *createCommand() override;
45
46protected:
49
50 QRectF selectedRectangle() const;
51
54 CoveringSelection
55 };
56
57 virtual SelectionMode currentMode() const;
58
59private:
60 Q_DECLARE_PRIVATE(KoShapeRubberSelectStrategy)
61};
62
63#endif /* KOSHAPERUBBERSELECTSTRATEGY_H */
SelectionMode
virtual void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers)=0
virtual KUndo2Command * createCommand()=0
virtual void paint(QPainter &painter, const KoViewConverter &converter)
KoShapeRubberSelectStrategy(KoShapeRubberSelectStrategyPrivate &)
constructor