Krita Source Code Documentation
Loading...
Searching...
No Matches
KoInteractionStrategyFactory.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KOINTERACTIONSTRATEGYFACTORY_H
8#define KOINTERACTIONSTRATEGYFACTORY_H
9
10#include <QScopedPointer>
11#include <QSharedPointer>
12#include "kritaflake_export.h"
13
14class QString;
15class QPainter;
17class KoPointerEvent;
18class KoViewConverter;
19
22
23class KRITAFLAKE_EXPORT KoInteractionStrategyFactory
24{
25public:
26 KoInteractionStrategyFactory(int priority, const QString &id);
28
29 QString id() const;
30 int priority() const;
31
33 virtual bool hoverEvent(KoPointerEvent *ev) = 0;
34 virtual bool paintOnHover(QPainter &painter, const KoViewConverter &converter) = 0;
35 virtual bool tryUseCustomCursor() = 0;
36
38
39private:
40 struct Private;
41 QScopedPointer<Private> m_d;
42};
43
44
45
46#endif // KOINTERACTIONSTRATEGYFACTORY_H
QSharedPointer< KoInteractionStrategyFactory > KoInteractionStrategyFactorySP
virtual bool hoverEvent(KoPointerEvent *ev)=0
virtual bool paintOnHover(QPainter &painter, const KoViewConverter &converter)=0
virtual KoInteractionStrategy * createStrategy(KoPointerEvent *ev)=0
virtual bool tryUseCustomCursor()=0