summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensorgestures/plugins/test1/qtest2recognizerdup.cpp
blob: 96c35c982369645e2edfb55c156c6459562b6552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "qtest2recognizerdup.h"

#include "qtestsensorgestureplugindup.h"

QTest2RecognizerDup::QTest2RecognizerDup(QObject *parent)
    : QSensorGestureRecognizer(parent),
    active(0)
{
}

QTest2RecognizerDup::~QTest2RecognizerDup()
{
}

bool QTest2RecognizerDup::start()
{
    Q_EMIT test2_dup();

    active = true;

    return true;
}

bool QTest2RecognizerDup::stop()
{
    active = false;
    return true;
}

bool QTest2RecognizerDup::isActive()
{
    return active;
}


void QTest2RecognizerDup::create()
{
    active = false;
}

QString QTest2RecognizerDup::id() const
{
    return QString("QtSensors.test.dup");
}

int QTest2RecognizerDup::thresholdTime() const
{
    return timerTimeout;
}

void QTest2RecognizerDup::setThresholdTime(int msec)
{
    timer->setInterval(msec);
}