Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/kcm/xlib/xlib_config.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca | ||||
3 | * Copyright 1999 Dirk A. Mueller <dmuell@gmx.net> | ||||
4 | * Copyright 2000 David Faure <faure@kde.org> | ||||
5 | * Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||||
6 | * | ||||
7 | * This program is free software; you can redistribute it and/or modify | ||||
8 | * it under the terms of the GNU General Public License as published by | ||||
9 | * the Free Software Foundation; either version 2 of the License, or | ||||
10 | * (at your option) any later version. | ||||
11 | * | ||||
12 | * This program is distributed in the hope that it will be useful, | ||||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | * GNU General Public License for more details. | ||||
16 | * | ||||
17 | * You should have received a copy of the GNU General Public License | ||||
18 | * along with this program; if not, write to the Free Software | ||||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
20 | */ | ||||
21 | | ||||
22 | #ifndef XLIBCONFIG_H | ||||
23 | #define XLIBCONFIG_H | ||||
24 | | ||||
25 | #include "../configplugin.h" | ||||
26 | #include "backends/x11/evdev_settings.h" | ||||
27 | | ||||
28 | #include "ui_kcmmouse.h" | ||||
29 | #include <config-workspace.h> | ||||
30 | | ||||
31 | #include <kcmodule.h> | ||||
32 | | ||||
33 | class QCheckBox; | ||||
34 | class QDoubleSpinBox; | ||||
35 | class QSlider; | ||||
36 | class QSpinBox; | ||||
37 | class QTabWidget; | ||||
38 | | ||||
39 | class X11Backend; | ||||
40 | | ||||
41 | class XlibConfig : public ConfigPlugin, public Ui::KCMMouse | ||||
42 | { | ||||
43 | Q_OBJECT | ||||
44 | public: | ||||
45 | XlibConfig(ConfigContainer *parent, InputBackend *backend); | ||||
46 | ~XlibConfig() = default; | ||||
47 | | ||||
48 | static void kcmInit(); | ||||
49 | | ||||
50 | void load() override; | ||||
51 | void save() override; | ||||
52 | void defaults() override; | ||||
53 | | ||||
54 | private Q_SLOTS: | ||||
55 | void slotHandedChanged(int val); | ||||
56 | void slotScrollPolarityChanged(); | ||||
57 | void checkAccess(); | ||||
58 | void slotThreshChanged(int value); | ||||
59 | void slotDragStartDistChanged(int value); | ||||
60 | void slotWheelScrollLinesChanged(int value); | ||||
61 | | ||||
62 | private: | ||||
63 | double getAccel(); | ||||
64 | int getThreshold(); | ||||
65 | Handed getHandedness(); | ||||
66 | | ||||
67 | void setAccel(double); | ||||
68 | void setThreshold(int); | ||||
69 | void setHandedness(Handed); | ||||
70 | | ||||
71 | X11Backend *m_backend; | ||||
72 | }; | ||||
73 | | ||||
74 | #endif // XLIBCONFIG_H |