Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/x11/xlibtouchpad.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 XLIBTOUCHPAD_H | 19 | #ifndef XLIBTOUCHPAD_H | ||
20 | #define XLIBTOUCHPAD_H | 20 | #define XLIBTOUCHPAD_H | ||
21 | 21 | | |||
22 | #include <QObject> | ||||
22 | #include <QVariantHash> | 23 | #include <QVariantHash> | ||
23 | #include <QSet> | 24 | #include <QSet> | ||
24 | 25 | | |||
25 | #include <xcb/xcb.h> | 26 | #include <xcb/xcb.h> | ||
26 | #include "xcbatom.h" | 27 | #include "xcbatom.h" | ||
27 | #include "propertyinfo.h" | 28 | #include "propertyinfo.h" | ||
28 | 29 | | |||
29 | enum ParaType { | 30 | enum ParaType { | ||
Show All 9 Lines | 36 | struct Parameter { | |||
39 | double max_val; /* Maximum allowed value */ | 40 | double max_val; /* Maximum allowed value */ | ||
40 | const char *prop_name; /* Property name */ | 41 | const char *prop_name; /* Property name */ | ||
41 | int prop_format; /* Property format (0 for floats) */ | 42 | int prop_format; /* Property format (0 for floats) */ | ||
42 | unsigned prop_offset; /* Offset inside property */ | 43 | unsigned prop_offset; /* Offset inside property */ | ||
43 | }; | 44 | }; | ||
44 | 45 | | |||
45 | class XlibTouchpad | 46 | class XlibTouchpad | ||
46 | { | 47 | { | ||
48 | | ||||
romangg: Necessary? | |||||
47 | public: | 49 | public: | ||
48 | XlibTouchpad(Display *display, int deviceId); | 50 | XlibTouchpad(Display *display, int deviceId); | ||
49 | virtual ~XlibTouchpad() {}; | 51 | virtual ~XlibTouchpad() {} | ||
50 | 52 | | |||
51 | int deviceId() { return m_deviceId; } | 53 | int deviceId() { return m_deviceId; } | ||
52 | const QStringList &supportedParameters() const { return m_supported; } | 54 | const QStringList &supportedParameters() const { return m_supported; } | ||
53 | bool applyConfig(const QVariantHash &p); | 55 | bool applyConfig(const QVariantHash &p); | ||
54 | bool getConfig(QVariantHash &p); | 56 | bool getConfig(QVariantHash &p); | ||
57 | virtual bool getConfig() { return false; } | ||||
58 | virtual bool applyConfig() { return false; } | ||||
59 | virtual bool getDefaultConfig() { return false; } | ||||
60 | virtual bool isChangedConfig() { return false; } | ||||
55 | void setEnabled(bool enable); | 61 | void setEnabled(bool enable); | ||
56 | bool enabled(); | 62 | bool enabled(); | ||
57 | void setTouchpadOff(int touchpadOff); | 63 | void setTouchpadOff(int touchpadOff); | ||
58 | int touchpadOff(); | 64 | int touchpadOff(); | ||
59 | 65 | | |||
60 | XcbAtom &touchpadOffAtom(); | 66 | XcbAtom &touchpadOffAtom(); | ||
61 | 67 | | |||
62 | protected: | 68 | protected: | ||
Show All 24 Lines |
Necessary?