QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskGesture.cpp
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#include "QskGesture.h"
7
8QskGesture::QskGesture( Type type )
9 : m_type( type )
10 , m_state( NoGesture )
11{
12}
13
14QskGesture::~QskGesture()
15{
16}
17
18void QskGesture::setState( State state )
19{
20 m_state = state;
21}
22
23QskTapGesture::QskTapGesture()
24 : QskGesture( Tap )
25{
26}
27
28QskTapGesture::~QskTapGesture()
29{
30}
31
32void QskTapGesture::setPosition( const QPointF& position )
33{
34 m_position = position;
35}
36
37QskTapAndHoldGesture::QskTapAndHoldGesture()
38 : QskGesture( TapAndHold )
39 , m_timeout( 0 )
40{
41}
42
43QskTapAndHoldGesture::~QskTapAndHoldGesture()
44{
45}
46
47void QskTapAndHoldGesture::setPosition( const QPointF& position )
48{
49 m_position = position;
50}
51
52void QskTapAndHoldGesture::setTimeout( int timeout )
53{
54 m_timeout = timeout;
55}
56
57QskPanGesture::QskPanGesture()
58 : QskGesture( Pan )
59 , m_angle( 0.0 )
60 , m_velocity( 0.0 )
61{
62}
63
64QskPanGesture::~QskPanGesture()
65{
66}
67
68void QskPanGesture::setVelocity( qreal velocity )
69{
70 m_velocity = velocity;
71}
72
73void QskPanGesture::setAngle( qreal degrees )
74{
75 m_angle = degrees;
76}
77
78void QskPanGesture::setOrigin( const QPointF& pos )
79{
80 m_origin = pos;
81}
82
83void QskPanGesture::setLastPosition( const QPointF& pos )
84{
85 m_lastPosition = pos;
86}
87
88void QskPanGesture::setPosition( const QPointF& pos )
89{
90 m_position = pos;
91}
92
93QskSwipeGesture::QskSwipeGesture()
94 : QskGesture( Swipe )
95 , m_angle( 0.0 )
96{
97}
98
99QskSwipeGesture::~QskSwipeGesture()
100{
101}
102
103void QskSwipeGesture::setAngle( qreal angle )
104{
105 m_angle = angle;
106}
107
108#include "moc_QskGesture.cpp"