LunaSysMgr
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
WebosTapAndHoldGesture.h
Go to the documentation of this file.
1
/* @@@LICENSE
2
*
3
* Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
* LICENSE@@@ */
18
19
#ifndef WEBOSTAPANDHOLDGESTURE_H
20
#define WEBOSTAPANDHOLDGESTURE_H
21
#include <QPoint>
22
#include <QGesture>
23
24
class
WebosTapAndHoldGesture
:
public
QGesture
25
{
26
Q_OBJECT
27
28
QPointF pos;
29
int
timerId;
30
int
tapTimeout;
31
static
Qt::GestureType type;
32
public
:
33
WebosTapAndHoldGesture
(
QObject
*parent = 0) {
34
tapTimeout = 700;
35
}
36
37
QPointF
position
()
const
{
return
pos;}
38
void
setPosition
(
const
QPointF &p) { pos = p;}
39
40
void
setTimeout
(
int
msecs) { tapTimeout = msecs;}
41
int
timeout
() {
return
tapTimeout;}
42
int
tapTimerId
() {
return
timerId;}
43
void
startTapTimer
() { timerId = this->startTimer(tapTimeout);}
44
void
stopTapTimer
() {
45
if
(timerId)
46
this->killTimer(timerId);
47
timerId = 0;
48
}
49
50
static
Qt::GestureType
gestureType
() {
return
type;}
51
static
void
setGestureType
(Qt::GestureType t) { type = t;}
52
53
friend
class
WebosTapAndHoldGestureRecognizer
;
54
};
55
56
#endif // WEBOSTAPANDHOLDGESTURE_H
luna-sysmgr
Src
base
gesture
WebosTapAndHoldGesture.h
Generated on Fri Jun 21 2013 00:53:53 for LunaSysMgr by
1.8.3.1