Krita Source Code Documentation
Loading...
Searching...
No Matches
KoToolProxy_p.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006-2010 Thomas Zander <zander@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KOTOOLPROXYPRIVATE_P
8#define KOTOOLPROXYPRIVATE_P
9
10#include <QTimer>
11#include <QElapsedTimer>
12#include <QPointF>
13#include <QEvent>
14#include <KoPointerEvent.h>
15#include <boost/optional.hpp>
16
17class KoPointerEvent;
18class KoToolBase;
20class KoToolProxy;
21
23{
24public:
26
27 void timeout(); // Auto scroll the canvas
28
29 void checkAutoScroll(const KoPointerEvent &event);
30
31 void selectionChanged(bool newSelection);
32
34
37
39 bool hasSelection {false};
44
45 // used to determine if the mouse-release is after a drag or a simple click
47
48 // up until at least 4.3.0 we get a mouse move event when the tablet leaves the canvas.
50
51 bool isToolPressed {false};
52
53 // for multi clicking (double click or triple click) we need the following
56 QElapsedTimer multiClickTimeStamp;
57 QEvent::Type multiClickSource;
58
60
61 boost::optional<KoPointerEventWrapper> lastPointerEvent;
62};
63
64#endif
const Params2D p
void selectionChanged(bool newSelection)
KoToolBase * activeTool
void setCanvasController(KoCanvasController *controller)
the toolManager tells us which KoCanvasController this toolProxy is working for.
QEvent::Type multiClickSource
QElapsedTimer multiClickTimeStamp
void checkAutoScroll(const KoPointerEvent &event)
boost::optional< KoPointerEventWrapper > lastPointerEvent
KoCanvasController * controller
KoToolProxyPrivate(KoToolProxy *p)
QPointF widgetScrollPointDoc
QPointF multiClickGlobalPoint
KoToolProxy * parent
QVector< QKeySequence > toolPriorityShortcuts