summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensorgestures/plugins/test1/qtestrecognizerdup.cpp
blob: bdd0155f54744dbe638fd1e79e3dab176c95ab5b (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
// 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 <QStringList>

#include "qtestrecognizerdup.h"
#include "qtestsensorgestureplugindup.h"

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

QTestRecognizerDup::~QTestRecognizerDup()
{
}

bool QTestRecognizerDup::start()
{
    active = true;
    Q_EMIT detected("test2_dup");
    Q_EMIT test2_dup();
    return true;
}

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

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

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

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


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

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