Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/backends/x11/evdev_settings.h
- This file was copied from kcms/input/mousesettings.h.
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2017 Xuetian Weng <wengxt@gmail.com> | 2 | * Copyright 2017 Xuetian Weng <wengxt@gmail.com> | ||
3 | * Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. | ||
13 | * | 14 | * | ||
14 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 18 | */ | ||
18 | 19 | | |||
19 | #ifndef MOUSESETTINGS_H | 20 | #ifndef EVDEVSETTINGS_H | ||
20 | #define MOUSESETTINGS_H | 21 | #define EVDEVSETTINGS_H | ||
21 | 22 | | |||
22 | #include <KConfig> | 23 | #include <KConfig> | ||
23 | 24 | | |||
24 | class MouseBackend; | 25 | class X11Backend; | ||
25 | 26 | | |||
26 | enum class MouseHanded { | 27 | enum class Handed { | ||
27 | Right = 0, | 28 | Right = 0, | ||
28 | Left = 1, | 29 | Left = 1, | ||
29 | NotSupported = -1 | 30 | NotSupported = -1 | ||
30 | }; | 31 | }; | ||
31 | 32 | | |||
32 | struct MouseSettings | 33 | struct EvdevSettings | ||
33 | { | 34 | { | ||
34 | void save(KConfig *); | 35 | void save(); | ||
35 | void load(KConfig *, MouseBackend*); | 36 | void load(X11Backend *); | ||
36 | void apply(MouseBackend*, bool force = false); | 37 | void apply(X11Backend *, bool force = false); | ||
37 | 38 | | |||
38 | bool handedEnabled; | 39 | bool handedEnabled; | ||
39 | bool handedNeedsApply; | 40 | bool handedNeedsApply; | ||
40 | MouseHanded handed; | 41 | Handed handed; | ||
41 | double accelRate; | 42 | double accelRate; | ||
42 | int thresholdMove; | 43 | int thresholdMove; | ||
43 | int doubleClickInterval; | 44 | int doubleClickInterval; | ||
44 | int dragStartTime; | 45 | int dragStartTime; | ||
45 | int dragStartDist; | 46 | int dragStartDist; | ||
46 | bool singleClick; | 47 | bool singleClick; | ||
47 | int wheelScrollLines; | 48 | int wheelScrollLines; | ||
48 | bool reverseScrollPolarity; | 49 | bool reverseScrollPolarity; | ||
49 | QString currentAccelProfile; | 50 | QString currentAccelProfile; | ||
50 | }; | 51 | }; | ||
51 | 52 | | |||
52 | #endif // MOUSESETTINGS_H | 53 | #endif // EVDEVSETTINGS_H |