| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#ifndef TOUCHWIDGET_H |
| 5 |
#define TOUCHWIDGET_H |
| 6 |
|
| 7 |
#include <QWidget> |
| 8 |
|
| 9 |
class TouchWidget : public QWidget |
| 10 |
{ |
| 11 |
Q_OBJECT |
| 12 |
|
| 13 |
public: |
| 14 |
bool acceptTouchBegin, acceptTouchUpdate, acceptTouchEnd; |
| 15 |
bool seenTouchBegin, seenTouchUpdate, seenTouchEnd; |
| 16 |
bool closeWindowOnTouchEnd; |
| 17 |
int touchPointCount; |
| 18 |
|
| 19 |
bool acceptMousePress, acceptMouseMove, acceptMouseRelease; |
| 20 |
bool seenMousePress, seenMouseMove, seenMouseRelease; |
| 21 |
bool closeWindowOnMouseRelease; |
| 22 |
|
| 23 |
inline TouchWidget(QWidget *parent = nullptr) |
| 24 |
: QWidget(parent) |
| 25 |
{ |
| 26 |
reset(); |
| 27 |
} |
| 28 |
|
| 29 |
void reset(); |
| 30 |
|
| 31 |
bool event(QEvent *event); |
| 32 |
}; |
| 33 |
|
| 34 |
#endif // TOUCHWIDGET_H |