Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/mouse.h
Show All 30 Lines | |||||
31 | #ifndef __MOUSECONFIG_H__ | 31 | #ifndef __MOUSECONFIG_H__ | ||
32 | #define __MOUSECONFIG_H__ | 32 | #define __MOUSECONFIG_H__ | ||
33 | 33 | | |||
34 | #include <QX11Info> | 34 | #include <QX11Info> | ||
35 | 35 | | |||
36 | #include <config-workspace.h> | 36 | #include <config-workspace.h> | ||
37 | 37 | | |||
38 | #include <kcmodule.h> | 38 | #include <kcmodule.h> | ||
39 | #include "ui_kmousedlg.h" | 39 | #include <KConfigGroup> | ||
40 | #include "ui_kcmmouse.h" | ||||
40 | 41 | | |||
41 | #define RIGHT_HANDED 0 | 42 | #define RIGHT_HANDED 0 | ||
42 | #define LEFT_HANDED 1 | 43 | #define LEFT_HANDED 1 | ||
43 | 44 | | |||
44 | class QCheckBox; | 45 | class QCheckBox; | ||
45 | class QDoubleSpinBox; | 46 | class QDoubleSpinBox; | ||
46 | class QSlider; | 47 | class QSlider; | ||
47 | class QSpinBox; | 48 | class QSpinBox; | ||
48 | class QTabWidget; | 49 | class QTabWidget; | ||
49 | 50 | | |||
50 | class KMouseDlg : public QWidget, public Ui::KMouseDlg | | |||
51 | { | | |||
52 | public: | | |||
53 | KMouseDlg( QWidget *parent ) : QWidget( parent ) { | | |||
54 | setupUi( this ); | | |||
55 | } | | |||
56 | }; | | |||
57 | | ||||
58 | class MouseSettings | 51 | class MouseSettings | ||
59 | { | 52 | { | ||
60 | public: | 53 | public: | ||
61 | void save(KConfig *); | 54 | void save(KConfig *); | ||
62 | void load(KConfig *, Display *dpy = QX11Info::display()); | 55 | void load(KConfig *, Display *dpy = QX11Info::display()); | ||
63 | void apply(bool force=false); | 56 | void apply(bool force=false); | ||
64 | 57 | | |||
65 | public: | 58 | public: | ||
66 | int num_buttons; | 59 | int num_buttons; | ||
67 | int middle_button; | 60 | int middle_button; | ||
68 | bool handedEnabled; | 61 | bool handedEnabled; | ||
69 | bool m_handedNeedsApply; | 62 | bool m_handedNeedsApply; | ||
70 | int handed; | 63 | int handed; | ||
71 | double accelRate; | 64 | double accelRate; | ||
72 | int thresholdMove; | 65 | int thresholdMove; | ||
73 | int doubleClickInterval; | 66 | int doubleClickInterval; | ||
74 | int dragStartTime; | 67 | int dragStartTime; | ||
75 | int dragStartDist; | 68 | int dragStartDist; | ||
76 | bool singleClick; | 69 | bool singleClick; | ||
77 | int wheelScrollLines; | 70 | int wheelScrollLines; | ||
78 | bool reverseScrollPolarity; | 71 | bool reverseScrollPolarity; | ||
79 | }; | 72 | }; | ||
80 | 73 | | |||
81 | class MouseConfig : public KCModule | 74 | class MouseConfig : public KCModule, public Ui::KCMMouse | ||
82 | { | 75 | { | ||
83 | Q_OBJECT | 76 | Q_OBJECT | ||
84 | public: | 77 | public: | ||
85 | MouseConfig(QWidget *parent, const QVariantList &args); | 78 | MouseConfig(QWidget *parent, const QVariantList &args); | ||
86 | ~MouseConfig(); | 79 | ~MouseConfig(); | ||
87 | 80 | | |||
88 | void save(); | 81 | void save(); | ||
89 | void load(); | 82 | void load(); | ||
Show All 11 Lines | 93 | private: | |||
101 | double getAccel(); | 94 | double getAccel(); | ||
102 | int getThreshold(); | 95 | int getThreshold(); | ||
103 | int getHandedness(); | 96 | int getHandedness(); | ||
104 | 97 | | |||
105 | void setAccel(double); | 98 | void setAccel(double); | ||
106 | void setThreshold(int); | 99 | void setThreshold(int); | ||
107 | void setHandedness(int); | 100 | void setHandedness(int); | ||
108 | 101 | | |||
109 | QDoubleSpinBox *accel; | | |||
110 | QSpinBox *thresh; | | |||
111 | QSpinBox *doubleClickInterval; | | |||
112 | QSpinBox *dragStartTime; | | |||
113 | QSpinBox *dragStartDist; | | |||
114 | QSpinBox *wheelScrollLines; | | |||
115 | | ||||
116 | QTabWidget *tabwidget; | | |||
117 | QWidget *advancedTab; | | |||
118 | KMouseDlg* generalTab; | | |||
119 | MouseSettings *settings; | 102 | MouseSettings *settings; | ||
120 | | ||||
121 | QCheckBox *mouseKeys; | | |||
122 | QSpinBox *mk_delay; | | |||
123 | QSpinBox *mk_interval; | | |||
124 | QSpinBox *mk_time_to_max; | | |||
125 | QSpinBox *mk_max_speed; | | |||
126 | QSpinBox *mk_curve; | | |||
127 | }; | 103 | }; | ||
128 | 104 | | |||
129 | #endif | 105 | #endif | ||
130 | 106 | |