forked from N1coc4colA/DA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswipinggesture.h
33 lines (25 loc) · 968 Bytes
/
swipinggesture.h
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
#ifndef SWIPINGGESTURE_H
#define SWIPINGGESTURE_H
#include "libda_global.h"
#include <QGesture>
LDA_BEGIN_NAMESPACE
class LIBDA_SHARED_EXPORT SwipingGesture : public QSwipeGesture
{
Q_OBJECT
public:
explicit SwipingGesture(QSwipeGesture *event);
SwipingGesture(QObject *parent = nullptr);
Qt::GestureState state() const;
QSwipeGesture::SwipeDirection horizontalDirection() const;
QSwipeGesture::SwipeDirection verticalDirection() const;
void setHorizontalDirection(QSwipeGesture::SwipeDirection);
void setVerticalDirection(QSwipeGesture::SwipeDirection);
void setGestureState(Qt::GestureState state);
private:
bool usingInState = false;
Qt::GestureState m_state = Qt::GestureState::NoGesture;
QSwipeGesture::SwipeDirection m_horiz = QSwipeGesture::SwipeDirection::NoDirection;
QSwipeGesture::SwipeDirection m_vert = QSwipeGesture::SwipeDirection::NoDirection;
};
LDA_END_NAMESPACE
#endif // SWIPINGGESTURE_H