Marble

MarbleWidgetInputHandler.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2005-2007 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
5// SPDX-FileCopyrightText: 2014 Adam Dabrowski <adamdbrw@gmail.com>
6//
7
8#ifndef MARBLE_MARBLEWIDGETINPUTHANDLER_H
9#define MARBLE_MARBLEWIDGETINPUTHANDLER_H
10
11#include "MarbleInputHandler.h"
12#include <QObject>
13#include <QPinchGesture>
14#include <QSharedPointer>
15
16namespace Marble
17{
18
19class MarbleWidget;
20class RenderPlugin;
21class MarbleWidgetInputHandlerPrivate;
22
23class MARBLE_EXPORT MarbleWidgetInputHandler : public MarbleDefaultInputHandler
24{
25 Q_OBJECT
26
27public:
28 MarbleWidgetInputHandler(MarbleAbstractPresenter *marblePresenter, MarbleWidget *marbleWidget);
29
30 void setDebugModeEnabled(bool enabled);
31
32private Q_SLOTS:
33 void installPluginEventFilter(RenderPlugin *renderPlugin) override;
34 void showLmbMenu(int x, int y) override;
35 void showRmbMenu(int x, int y) override;
36 void openItemToolTip() override;
37 void setCursor(const QCursor &cursor) override;
38
39private:
40 bool handleKeyPress(QKeyEvent *event) override;
41 bool handleTouch(QTouchEvent *event) override;
42 bool handleGesture(QGestureEvent *e) override;
43 AbstractSelectionRubber *selectionRubber() override;
44 bool layersEventFilter(QObject *o, QEvent *e) override;
45
46 void handlePinchGesture(QPinchGesture *pinch);
47
48 using MarbleWidgetInputHandlerPrivatePtr = QSharedPointer<MarbleWidgetInputHandlerPrivate>;
49 MarbleWidgetInputHandlerPrivatePtr d;
50 friend class MarbleWidgetInputHandlerPrivate;
51
52 Q_DISABLE_COPY(MarbleWidgetInputHandler)
53};
54
55}
56
57#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.