-
Notifications
You must be signed in to change notification settings - Fork 6
/
globalpinchgestures.h
43 lines (31 loc) · 995 Bytes
/
globalpinchgestures.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
34
35
36
37
38
39
40
41
42
43
/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2021 yongrui li <liyongrui@jingos.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef GLOBALPINCHGESTUREMGRS_H
#define GLOBALPINCHGESTUREMGRS_H
#include "gestures.h"
#include <QObject>
namespace KWin {
class PinchGesture;
class GestureRecognizer;
class GlobalPinchGestures : public QObject
{
Q_OBJECT
public:
explicit GlobalPinchGestures(QObject *parent = nullptr);
void registerGesture(GestureRecognizer *recongnizer);
void unregisterGesture(GestureRecognizer *recongnizer);
protected:
void init5FingersPinchGesture();
private slots:
void on5FingersPinchTriggered(quint32 time, const qreal &lastSpeed);
void on5FingersPinchCancelled(quint32 time, const qreal &lastSpeed);
private:
void showTaskPanel();
PinchGesture *m_5FingersPinchGesture = nullptr;
}; // GlobalPinchGesture
} // namespace
#endif // GLOBALPINCHGESTUREMGR_H