Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/x11/libinputtouchpad.h
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef LIBINPUTTOUCHPAD_H | 19 | #ifndef LIBINPUTTOUCHPAD_H | ||
20 | #define LIBINPUTTOUCHPAD_H | 20 | #define LIBINPUTTOUCHPAD_H | ||
21 | 21 | | |||
22 | #include <QObject> | | |||
23 | | ||||
24 | #include "xlibtouchpad.h" | 22 | #include "xlibtouchpad.h" | ||
25 | #include "backends/libinputcommon.h" | 23 | #include "backends/libinputcommon.h" | ||
26 | 24 | | |||
25 | #include <KSharedConfig> | ||||
26 | #include <KConfigGroup> | ||||
27 | | ||||
27 | class LibinputTouchpad : public LibinputCommon, public XlibTouchpad | 28 | class LibinputTouchpad : public LibinputCommon, public XlibTouchpad | ||
28 | { | 29 | { | ||
29 | Q_OBJECT | 30 | Q_OBJECT | ||
30 | 31 | | |||
31 | public: | 32 | public: | ||
32 | LibinputTouchpad(Display *display, int deviceId); | 33 | LibinputTouchpad(Display *display, int deviceId); | ||
33 | ~LibinputTouchpad() override {} | 34 | ~LibinputTouchpad() override {} | ||
34 | 35 | | |||
35 | bool getConfig() override; | 36 | bool getConfig() override; | ||
36 | bool applyConfig() override; | 37 | bool applyConfig() override; | ||
37 | bool getDefaultConfig() override; | 38 | bool getDefaultConfig() override; | ||
38 | bool isChangedConfig() override; | 39 | bool isChangedConfig() override; | ||
39 | 40 | | |||
40 | private: | 41 | private: | ||
41 | 42 | | |||
42 | template<typename T> | 43 | template<typename T> | ||
43 | bool valueLoader(Prop<T> &prop); | 44 | bool valueLoader(Prop<T> &prop); | ||
44 | 45 | | |||
45 | template<typename T> | 46 | template<typename T> | ||
46 | QString valueWriter(const Prop<T> &prop); | 47 | QString valueWriter(const Prop<T> &prop); | ||
47 | 48 | | |||
49 | KSharedConfigPtr m_config; | ||||
50 | | ||||
48 | // | 51 | // | ||
49 | // general | 52 | // general | ||
50 | QString name() const override { | 53 | QString name() const override { | ||
51 | return m_name; | 54 | return m_name; | ||
52 | } | 55 | } | ||
53 | bool supportsDisableEvents() const override { | 56 | bool supportsDisableEvents() const override { | ||
54 | return m_supportsDisableEvents.avail && m_supportsDisableEvents.val; | 57 | return m_supportsDisableEvents.avail && m_supportsDisableEvents.val; | ||
55 | } | 58 | } | ||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |