Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/Tests/EsriMapTouchTest/gestures.h
T
2026-08-13 18:33:10 +02:00

72 lines
1.8 KiB
C++
Executable File

/**
**
** @RDE_HEADER@
** Gesture recognition
** $Id$
** $HeadURL$
** $Author$
**
** -----------------------------------------------------------------------------------------------
**
** Hardware-Environment: Intel-PC
** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5
**
** Language ........: C++ 11
**
** -----------------------------------------------------------------------------------------------
**
** Author ...........: Jörg Turla, SPD G, Tel. 3132
**
** -----------------------------------------------------------------------------------------------
**
** Notes .........:
**
** 09.12.2015, JT : First edition for use with Qt5
**
** -----------------------------------------------------------------------------------------------
*/
#pragma once
#include <QtCore/QObject>
#include <QtWidgets/QGesture>
#include <QtWidgets/QGestureRecognizer>
namespace SituationMap { namespace RB
{
class ApplyGestureRecognizer : public QGestureRecognizer
{
public:
ApplyGestureRecognizer();
virtual ~ApplyGestureRecognizer();
QGesture * create( QObject * target ) override;
QGestureRecognizer::Result recognize( QGesture * gesture, QObject * watched, QEvent * event) override;
void reset( QGesture * gesture ) override;
}; // ApplyGestureRecognizer
class ApplyGesture : public QGesture
{
friend class ApplyGestureRecognizer;
public:
ApplyGesture() = default;
~ApplyGesture() = default;
ApplyGesture( const ApplyGesture & ) = delete;
ApplyGesture & operator = ( const ApplyGesture & ) = delete;
QPointF position() const { return _position; }
private:
QPointF _position;
bool _tripleTouch;
}; // ApplyGesture
}} // namespaces