Changeset View
Changeset View
Standalone View
Standalone View
kcms/access/kcmaccess.cpp
Show All 27 Lines | |||||
28 | #include <QStandardPaths> | 28 | #include <QStandardPaths> | ||
29 | #include <QProcess> | 29 | #include <QProcess> | ||
30 | #include <QX11Info> | 30 | #include <QX11Info> | ||
31 | 31 | | |||
32 | #include <kaboutdata.h> | 32 | #include <kaboutdata.h> | ||
33 | #include <KConfigGroup> | 33 | #include <KConfigGroup> | ||
34 | #include <KSharedConfig> | 34 | #include <KSharedConfig> | ||
35 | #include <kkeyserver.h> | 35 | #include <kkeyserver.h> | ||
36 | #include <knotifyconfigwidget.h> | 36 | #include <KNotifyConfigWidget> | ||
37 | #include <KPluginFactory> | 37 | #include <KPluginFactory> | ||
38 | #include <ktoolinvocation.h> | 38 | #include <ktoolinvocation.h> | ||
39 | 39 | #include <KLocalizedString> | |||
40 | #include <X11/Xlib.h> | 40 | #include <X11/Xlib.h> | ||
41 | #include <X11/XKBlib.h> | 41 | #include <X11/XKBlib.h> | ||
42 | #define XK_MISCELLANY | 42 | #define XK_MISCELLANY | ||
43 | #define XK_XKB_KEYS | 43 | #define XK_XKB_KEYS | ||
44 | #include <X11/keysymdef.h> | 44 | #include <X11/keysymdef.h> | ||
45 | 45 | | |||
46 | K_PLUGIN_FACTORY(KAccessConfigFactory, registerPlugin<KAccessConfig>();) | 46 | K_PLUGIN_FACTORY_WITH_JSON(KCMColorsFactory, "kcmaccess.json", registerPlugin<KAccessConfig>();) | ||
47 | K_EXPORT_PLUGIN(KAccessConfigFactory("kcmaccess")) | | |||
48 | 47 | | |||
49 | QString mouseKeysShortcut(Display *display) | 48 | QString mouseKeysShortcut(Display *display) | ||
50 | { | 49 | { | ||
51 | // Calculate the keycode | 50 | // Calculate the keycode | ||
52 | KeySym sym = XK_MouseKeys_Enable; | 51 | KeySym sym = XK_MouseKeys_Enable; | ||
53 | KeyCode code = XKeysymToKeycode(display, sym); | 52 | KeyCode code = XKeysymToKeycode(display, sym); | ||
54 | if (code == 0) { | 53 | if (code == 0) { | ||
55 | sym = XK_Pointer_EnableKeys; | 54 | sym = XK_Pointer_EnableKeys; | ||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | |||||
151 | else if ((modifiers & NumMask) != 0) | 150 | else if ((modifiers & NumMask) != 0) | ||
152 | result = i18n("Press %1 while NumLock is active", keyname); | 151 | result = i18n("Press %1 while NumLock is active", keyname); | ||
153 | else | 152 | else | ||
154 | result = i18n("Press %1", keyname); | 153 | result = i18n("Press %1", keyname); | ||
155 | 154 | | |||
156 | return result; | 155 | return result; | ||
157 | } | 156 | } | ||
158 | 157 | | |||
159 | KAccessConfig::KAccessConfig(QWidget *parent, const QVariantList& args) | 158 | KAccessConfig::KAccessConfig(QObject *parent, const QVariantList& args) | ||
160 | : KCModule(parent, args) | 159 | : KQuickAddons::ConfigModule(parent, args) | ||
161 | { | 160 | { | ||
162 | KAboutData *about = | 161 | KAboutData *about = | ||
163 | new KAboutData(QStringLiteral("kcmaccess"), i18n("KDE Accessibility Tool"), QStringLiteral("1.0"), | 162 | new KAboutData(QStringLiteral("kcmaccess"), i18n("KDE Accessibility Tool"), QStringLiteral("1.0"), | ||
164 | QString(), KAboutLicense::GPL, i18n("(c) 2000, Matthias Hoelzer-Kluepfel")); | 163 | QString(), KAboutLicense::GPL, i18n("(c) 2000, Matthias Hoelzer-Kluepfel")); | ||
165 | 164 | | |||
166 | about->addAuthor(i18n("Matthias Hoelzer-Kluepfel"), i18n("Author") , QStringLiteral("hoelzer@kde.org")); | 165 | about->addAuthor(i18n("Matthias Hoelzer-Kluepfel"), i18n("Author") , QStringLiteral("hoelzer@kde.org")); | ||
167 | setAboutData(about); | 166 | setAboutData(about); | ||
168 | 167 | | |||
169 | ui.setupUi(this); | | |||
170 | | ||||
171 | connect(ui.soundButton, &QPushButton::clicked, this, &KAccessConfig::selectSound); | | |||
172 | connect(ui.customBell, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
173 | connect(ui.systemBell, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
174 | connect(ui.customBell, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
175 | connect(ui.soundEdit, &QLineEdit::textChanged, this, &KAccessConfig::configChanged); | | |||
176 | | ||||
177 | connect(ui.invertScreen, &QRadioButton::clicked, this, &KAccessConfig::configChanged); | | |||
178 | connect(ui.flashScreen, &QRadioButton::clicked, this, &KAccessConfig::configChanged); | | |||
179 | connect(ui.visibleBell, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
180 | connect(ui.visibleBell, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
181 | connect(ui.colorButton, &KColorButton::clicked, this, &KAccessConfig::changeFlashScreenColor); | | |||
182 | | ||||
183 | connect(ui.invertScreen, &QRadioButton::clicked, this, &KAccessConfig::invertClicked); | | |||
184 | connect(ui.flashScreen, &QRadioButton::clicked, this, &KAccessConfig::flashClicked); | | |||
185 | | ||||
186 | connect(ui.duration, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
187 | | ||||
188 | | ||||
189 | // modifier key settings ------------------------------- | | |||
190 | | ||||
191 | connect(ui.stickyKeys, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
192 | connect(ui.stickyKeysLock, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
193 | connect(ui.stickyKeysAutoOff, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
194 | connect(ui.stickyKeys, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
195 | | ||||
196 | connect(ui.stickyKeysBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
197 | connect(ui.toggleKeysBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
198 | connect(ui.kNotifyModifiers, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
199 | connect(ui.kNotifyModifiers, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
200 | connect(ui.kNotifyModifiersButton, &QPushButton::clicked, this, &KAccessConfig::configureKNotify); | | |||
201 | | ||||
202 | // key filter settings --------------------------------- | | |||
203 | | ||||
204 | connect(ui.slowKeysDelay, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
205 | connect(ui.slowKeys, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
206 | connect(ui.slowKeys, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
207 | | ||||
208 | connect(ui.slowKeysPressBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
209 | connect(ui.slowKeysAcceptBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
210 | connect(ui.slowKeysRejectBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
211 | | ||||
212 | connect(ui.bounceKeysDelay, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
213 | connect(ui.bounceKeys, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
214 | connect(ui.bounceKeysRejectBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
215 | connect(ui.bounceKeys, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
216 | | ||||
217 | // gestures -------------------------------------------- | 168 | // gestures -------------------------------------------- | ||
218 | 169 | #if 0 | |||
219 | QString shortcut = mouseKeysShortcut(QX11Info::display()); | 170 | QString shortcut = mouseKeysShortcut(QX11Info::display()); | ||
220 | if (shortcut.isEmpty()) | 171 | if (shortcut.isEmpty()) | ||
221 | ui.gestures->setToolTip(i18n("Here you can activate keyboard gestures that turn on the following features: \n" | 172 | ui.gestures->setToolTip(i18n("Here you can activate keyboard gestures that turn on the following features: \n" | ||
222 | "Sticky keys: Press Shift key 5 consecutive times\n" | 173 | "Sticky keys: Press Shift key 5 consecutive times\n" | ||
223 | "Slow keys: Hold down Shift for 8 seconds")); | 174 | "Slow keys: Hold down Shift for 8 seconds")); | ||
224 | else | 175 | else | ||
225 | ui.gestures->setToolTip(i18n("Here you can activate keyboard gestures that turn on the following features: \n" | 176 | ui.gestures->setToolTip(i18n("Here you can activate keyboard gestures that turn on the following features: \n" | ||
226 | "Mouse Keys: %1\n" | 177 | "Mouse Keys: %1\n" | ||
227 | "Sticky keys: Press Shift key 5 consecutive times\n" | 178 | "Sticky keys: Press Shift key 5 consecutive times\n" | ||
228 | "Slow keys: Hold down Shift for 8 seconds", shortcut)); | 179 | "Slow keys: Hold down Shift for 8 seconds", shortcut)); | ||
229 | 180 | #endif | |||
230 | connect(ui.gestures, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
231 | connect(ui.timeout, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
232 | connect(ui.timeout, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
233 | connect(ui.timeoutDelay, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
234 | connect(ui.accessxBeep, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
235 | connect(ui.gestureConfirmation, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
236 | connect(ui.kNotifyAccess, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
237 | connect(ui.kNotifyAccess, &QCheckBox::clicked, this, &KAccessConfig::checkAccess); | | |||
238 | connect(ui.kNotifyAccessButton, &QPushButton::clicked, this, &KAccessConfig::configureKNotify); | | |||
239 | | ||||
240 | // keynboard navigation | | |||
241 | connect(ui.mouseKeys, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
242 | connect(ui.mk_delay, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
243 | connect(ui.mk_interval, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
244 | connect(ui.mk_time_to_max, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
245 | connect(ui.mk_max_speed, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
246 | connect(ui.mk_curve, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KAccessConfig::configChanged); | | |||
247 | | ||||
248 | // screen reader | | |||
249 | connect(ui.screenReaderEnabled, &QCheckBox::clicked, this, &KAccessConfig::configChanged); | | |||
250 | connect(ui.launchOrcaConfiguration, &QPushButton::clicked, this, &KAccessConfig::launchOrcaConfiguration); | | |||
251 | } | 181 | } | ||
252 | 182 | | |||
253 | | ||||
254 | KAccessConfig::~KAccessConfig() | 183 | KAccessConfig::~KAccessConfig() | ||
255 | { | 184 | { | ||
256 | } | 185 | } | ||
257 | 186 | | |||
258 | void KAccessConfig::configureKNotify() | 187 | void KAccessConfig::configureKNotify() | ||
259 | { | 188 | { | ||
260 | KNotifyConfigWidget::configure(this, QStringLiteral("kaccess")); | 189 | KNotifyConfigWidget::configure(nullptr, QStringLiteral("kaccess")); | ||
261 | } | 190 | } | ||
262 | 191 | | |||
263 | void KAccessConfig::launchOrcaConfiguration() | 192 | void KAccessConfig::launchOrcaConfiguration() | ||
264 | { | 193 | { | ||
265 | const QStringList gsettingArgs = { QStringLiteral("set"), QStringLiteral("org.gnome.desktop.a11y.applications"), QStringLiteral("screen-reader-enabled"), QStringLiteral("true") }; | 194 | const QStringList gsettingArgs = { QStringLiteral("set"), QStringLiteral("org.gnome.desktop.a11y.applications"), QStringLiteral("screen-reader-enabled"), QStringLiteral("true") }; | ||
266 | int ret = QProcess::execute(QStringLiteral("gsettings"), gsettingArgs); | 195 | int ret = QProcess::execute(QStringLiteral("gsettings"), gsettingArgs); | ||
267 | if (ret) { | 196 | if (ret) { | ||
268 | const QString errorStr = QLatin1String("gsettings ") + gsettingArgs.join(QLatin1Char(' ')); | 197 | const QString errorStr = QLatin1String("gsettings ") + gsettingArgs.join(QLatin1Char(' ')); | ||
269 | ui.orcaLaunchFeedbackLabel->setText(i18n("Could not set gsettings for Orca: \"%1\" failed", errorStr)); | 198 | //ui.orcaLaunchFeedbackLabel->setText(i18n("Could not set gsettings for Orca: \"%1\" failed", errorStr)); | ||
270 | return; | 199 | return; | ||
271 | } | 200 | } | ||
272 | 201 | | |||
273 | qint64 pid = 0; | 202 | qint64 pid = 0; | ||
274 | bool started = QProcess::startDetached(QStringLiteral("orca"), {QStringLiteral("--setup")}, QString(), &pid); | 203 | bool started = QProcess::startDetached(QStringLiteral("orca"), {QStringLiteral("--setup")}, QString(), &pid); | ||
275 | if (!started) { | 204 | if (!started) { | ||
276 | ui.orcaLaunchFeedbackLabel->setText(i18n("Error: Could not launch \"orca --setup\"")); | 205 | // ui.orcaLaunchFeedbackLabel->setText(i18n("Error: Could not launch \"orca --setup\"")); | ||
277 | } | | |||
278 | } | | |||
279 | | ||||
280 | void KAccessConfig::changeFlashScreenColor() | | |||
281 | { | | |||
282 | ui.invertScreen->setChecked(false); | | |||
283 | ui.flashScreen->setChecked(true); | | |||
284 | configChanged(); | | |||
285 | } | 206 | } | ||
286 | | ||||
287 | void KAccessConfig::selectSound() | | |||
288 | { | | |||
289 | const QStringList list = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("sound/")); | | |||
290 | QString start; | | |||
291 | if (!list.isEmpty()) | | |||
292 | start = list[0]; | | |||
293 | const QString fname = QFileDialog::getOpenFileName(this, QString(), start); | | |||
294 | if (!fname.isEmpty()) | | |||
295 | ui.soundEdit->setText(fname); | | |||
296 | } | 207 | } | ||
297 | 208 | | |||
298 | | ||||
299 | void KAccessConfig::configChanged() | | |||
300 | { | | |||
301 | emit changed(true); | | |||
302 | } | | |||
303 | | ||||
304 | | ||||
305 | void KAccessConfig::load() | 209 | void KAccessConfig::load() | ||
306 | { | 210 | { | ||
307 | KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Bell"); | 211 | KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Bell"); | ||
308 | 212 | | |||
309 | ui.systemBell->setChecked(cg.readEntry("SystemBell", true)); | 213 | _systemBell = cg.readEntry("SystemBell", true); | ||
310 | ui.customBell->setChecked(cg.readEntry("ArtsBell", false)); | 214 | _customBell = cg.readEntry("ArtsBell", false); | ||
311 | ui.soundEdit->setText(cg.readPathEntry("ArtsBellFile", QString())); | 215 | _soundEdit = cg.readPathEntry("ArtsBellFile", QString()); | ||
312 | 216 | _visibleBell = cg.readEntry("VisibleBell", false); | |||
313 | ui.visibleBell->setChecked(cg.readEntry("VisibleBell", false)); | 217 | _invertScreen = cg.readEntry("VisibleBellInvert", true); | ||
314 | ui.invertScreen->setChecked(cg.readEntry("VisibleBellInvert", true)); | 218 | _flashScreen = !_invertScreen; | ||
315 | ui.flashScreen->setChecked(!ui.invertScreen->isChecked()); | 219 | _colorButton = cg.readEntry("VisibleBellColor", QColor(Qt::red)); | ||
316 | ui.colorButton->setColor(cg.readEntry("VisibleBellColor", QColor(Qt::red))); | 220 | _duration = cg.readEntry("VisibleBellPause", 500); | ||
317 | | ||||
318 | ui.duration->setValue(cg.readEntry("VisibleBellPause", 500)); | | |||
319 | 221 | | |||
320 | KConfigGroup keyboardGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Keyboard"); | 222 | KConfigGroup keyboardGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Keyboard"); | ||
321 | 223 | | |||
322 | ui.stickyKeys->setChecked(keyboardGroup.readEntry("StickyKeys", false)); | 224 | _stickyKeys = keyboardGroup.readEntry("StickyKeys", false); | ||
323 | ui.stickyKeysLock->setChecked(keyboardGroup.readEntry("StickyKeysLatch", true)); | 225 | _stickyKeysLock = keyboardGroup.readEntry("StickyKeysLatch", true); | ||
324 | ui.stickyKeysAutoOff->setChecked(keyboardGroup.readEntry("StickyKeysAutoOff", false)); | 226 | _stickyKeysAutoOff= keyboardGroup.readEntry("StickyKeysAutoOff", false); | ||
325 | ui.stickyKeysBeep->setChecked(keyboardGroup.readEntry("StickyKeysBeep", true)); | 227 | _stickyKeysBeep = keyboardGroup.readEntry("StickyKeysBeep", true); | ||
326 | ui.toggleKeysBeep->setChecked(keyboardGroup.readEntry("ToggleKeysBeep", false)); | 228 | _toggleKeysBeep = keyboardGroup.readEntry("ToggleKeysBeep", false); | ||
327 | ui.kNotifyModifiers->setChecked(keyboardGroup.readEntry("kNotifyModifiers", false)); | 229 | _keyboardNotifyModifiers = keyboardGroup.readEntry("kNotifyModifiers", false); | ||
328 | 230 | _slowKeysDelay = keyboardGroup.readEntry("SlowKeysDelay", 500); | |||
329 | ui.slowKeys->setChecked(keyboardGroup.readEntry("SlowKeys", false)); | 231 | _slowKeys = keyboardGroup.readEntry("SlowKeys", false); | ||
330 | ui.slowKeysDelay->setValue(keyboardGroup.readEntry("SlowKeysDelay", 500)); | 232 | _slowKeysPressBeep = keyboardGroup.readEntry("SlowKeysPressBeep", true); | ||
331 | ui.slowKeysPressBeep->setChecked(keyboardGroup.readEntry("SlowKeysPressBeep", true)); | 233 | _slowKeysAcceptBeep = keyboardGroup.readEntry("SlowKeysAcceptBeep", true); | ||
332 | ui.slowKeysAcceptBeep->setChecked(keyboardGroup.readEntry("SlowKeysAcceptBeep", true)); | 234 | _slowKeysRejectBeep = keyboardGroup.readEntry("SlowKeysRejectBeep", true); | ||
333 | ui.slowKeysRejectBeep->setChecked(keyboardGroup.readEntry("SlowKeysRejectBeep", true)); | 235 | _bounceKeys = keyboardGroup.readEntry("BounceKeys", false); | ||
334 | 236 | _bounceKeysDelay = keyboardGroup.readEntry("BounceKeysDelay", 500); | |||
335 | ui.bounceKeys->setChecked(keyboardGroup.readEntry("BounceKeys", false)); | 237 | _bounceKeysRejectBeep = keyboardGroup.readEntry("BounceKeysRejectBeep", true); | ||
336 | ui.bounceKeysDelay->setValue(keyboardGroup.readEntry("BounceKeysDelay", 500)); | 238 | _gestures = keyboardGroup.readEntry("Gestures", false); | ||
337 | ui.bounceKeysRejectBeep->setChecked(keyboardGroup.readEntry("BounceKeysRejectBeep", true)); | 239 | _timeout = keyboardGroup.readEntry("AccessXTimeout", false); | ||
338 | 240 | _timeoutDelay = keyboardGroup.readEntry("AccessXTimeoutDelay", 30); | |||
339 | ui.gestures->setChecked(keyboardGroup.readEntry("Gestures", false)); | 241 | _accessXBeep = keyboardGroup.readEntry("AccessXBeep", true); | ||
340 | ui.timeout->setChecked(keyboardGroup.readEntry("AccessXTimeout", false)); | 242 | _gestureConfirmation = keyboardGroup.readEntry("GestureConfirmation", false); | ||
341 | ui.timeoutDelay->setValue(keyboardGroup.readEntry("AccessXTimeoutDelay", 30)); | 243 | _keyboardNotifyAccess = keyboardGroup.readEntry("kNotifyAccess", false); | ||
342 | | ||||
343 | ui.accessxBeep->setChecked(keyboardGroup.readEntry("AccessXBeep", true)); | | |||
344 | ui.gestureConfirmation->setChecked(keyboardGroup.readEntry("GestureConfirmation", false)); | | |||
345 | ui.kNotifyAccess->setChecked(keyboardGroup.readEntry("kNotifyAccess", false)); | | |||
346 | 244 | | |||
347 | KConfigGroup mouseGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Mouse"); | 245 | KConfigGroup mouseGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Mouse"); | ||
348 | ui.mouseKeys->setChecked(mouseGroup.readEntry("MouseKeys", false)); | 246 | _mouseKeys = mouseGroup.readEntry("MouseKeys", false); | ||
349 | ui.mk_delay->setValue(mouseGroup.readEntry("MKDelay", 160)); | 247 | _mouseKeyDelay = mouseGroup.readEntry("MKDelay", 160); | ||
350 | 248 | _mouseKeyInterval = mouseGroup.readEntry("MKInterval", 5); | |||
351 | const int interval = mouseGroup.readEntry("MKInterval", 5); | | |||
352 | ui.mk_interval->setValue(interval); | | |||
353 | 249 | | |||
354 | // Default time to reach maximum speed: 5000 msec | 250 | // Default time to reach maximum speed: 5000 msec | ||
355 | int time_to_max = mouseGroup.readEntry("MKTimeToMax", (5000+interval/2)/interval); | 251 | // What?! | ||
356 | time_to_max = mouseGroup.readEntry("MK-TimeToMax", time_to_max*interval); | 252 | int time_to_max = mouseGroup.readEntry("MKTimeToMax", (5000 + _mouseKeyInterval / 2 ) / _mouseKeyInterval); | ||
357 | ui.mk_time_to_max->setValue(time_to_max); | 253 | time_to_max = mouseGroup.readEntry("MK-TimeToMax", time_to_max*_mouseKeyInterval); | ||
254 | _mouseKeyTimeToMax = time_to_max; | ||||
358 | 255 | | |||
359 | // Default maximum speed: 1000 pixels/sec | 256 | // Default maximum speed: 1000 pixels/sec | ||
360 | // (The old default maximum speed from KDE <= 3.4 | 257 | // (The old default maximum speed from KDE <= 3.4 | ||
361 | // (100000 pixels/sec) was way too fast) | 258 | // (100000 pixels/sec) was way too fast) | ||
362 | long max_speed = mouseGroup.readEntry("MKMaxSpeed", interval); | 259 | long max_speed = mouseGroup.readEntry("MKMaxSpeed", _mouseKeyInterval); | ||
363 | max_speed = max_speed * 1000 / interval; | 260 | max_speed = max_speed * 1000 / _mouseKeyInterval; | ||
364 | if (max_speed > 2000) { | 261 | if (max_speed > 2000) { | ||
365 | max_speed = 2000; | 262 | max_speed = 2000; | ||
366 | } | 263 | } | ||
367 | max_speed = mouseGroup.readEntry("MK-MaxSpeed", int(max_speed)); | 264 | max_speed = mouseGroup.readEntry("MK-MaxSpeed", int(max_speed)); | ||
368 | ui.mk_max_speed->setValue(max_speed); | 265 | _mouseKeyMaxSpeed = max_speed; | ||
369 | 266 | | |||
370 | ui.mk_curve->setValue(mouseGroup.readEntry("MKCurve", 0)); | 267 | _mouseKeyCurve = mouseGroup.readEntry("MKCurve", 0); | ||
371 | 268 | | |||
372 | KConfigGroup screenReaderGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "ScreenReader"); | 269 | KConfigGroup screenReaderGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "ScreenReader"); | ||
373 | ui.screenReaderEnabled->setChecked(screenReaderGroup.readEntry("Enabled", false)); | 270 | _screenReaderEnabled = screenReaderGroup.readEntry("Enabled", false); | ||
374 | | ||||
375 | checkAccess(); | | |||
376 | | ||||
377 | emit changed(false); | | |||
378 | } | 271 | } | ||
379 | 272 | | |||
380 | 273 | | |||
381 | void KAccessConfig::save() | 274 | void KAccessConfig::save() | ||
382 | { | 275 | { | ||
383 | KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Bell"); | 276 | KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Bell"); | ||
384 | 277 | | |||
385 | cg.writeEntry("SystemBell", ui.systemBell->isChecked()); | 278 | cg.writeEntry("SystemBell", _systemBell); | ||
386 | cg.writeEntry("ArtsBell", ui.customBell->isChecked()); | 279 | cg.writeEntry("ArtsBell", _customBell); | ||
387 | cg.writePathEntry("ArtsBellFile", ui.soundEdit->text()); | 280 | cg.writePathEntry("ArtsBellFile", _soundEdit); | ||
388 | 281 | | |||
389 | cg.writeEntry("VisibleBell", ui.visibleBell->isChecked()); | 282 | cg.writeEntry("VisibleBell", _visibleBell); | ||
390 | cg.writeEntry("VisibleBellInvert", ui.invertScreen->isChecked()); | 283 | cg.writeEntry("VisibleBellInvert", _invertScreen); | ||
391 | cg.writeEntry("VisibleBellColor", ui.colorButton->color()); | 284 | cg.writeEntry("VisibleBellColor", _colorButton); | ||
392 | 285 | | |||
393 | cg.writeEntry("VisibleBellPause", ui.duration->value()); | 286 | cg.writeEntry("VisibleBellPause", _duration); | ||
394 | cg.sync(); | 287 | cg.sync(); | ||
395 | 288 | | |||
396 | KConfigGroup keyboardGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Keyboard"); | 289 | KConfigGroup keyboardGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Keyboard"); | ||
397 | 290 | | |||
398 | keyboardGroup.writeEntry("StickyKeys", ui.stickyKeys->isChecked()); | 291 | keyboardGroup.writeEntry("StickyKeys", _stickyKeys); | ||
399 | keyboardGroup.writeEntry("StickyKeysLatch", ui.stickyKeysLock->isChecked()); | 292 | keyboardGroup.writeEntry("StickyKeysLatch", _stickyKeysLock); | ||
400 | keyboardGroup.writeEntry("StickyKeysAutoOff", ui.stickyKeysAutoOff->isChecked()); | 293 | keyboardGroup.writeEntry("StickyKeysAutoOff", _stickyKeysAutoOff); | ||
401 | keyboardGroup.writeEntry("StickyKeysBeep", ui.stickyKeysBeep->isChecked()); | 294 | keyboardGroup.writeEntry("StickyKeysBeep", _stickyKeysBeep); | ||
402 | keyboardGroup.writeEntry("ToggleKeysBeep", ui.toggleKeysBeep->isChecked()); | 295 | keyboardGroup.writeEntry("ToggleKeysBeep", _toggleKeysBeep); | ||
403 | keyboardGroup.writeEntry("kNotifyModifiers", ui.kNotifyModifiers->isChecked()); | 296 | keyboardGroup.writeEntry("kNotifyModifiers", _keyboardNotifyModifiers); | ||
404 | 297 | | |||
405 | keyboardGroup.writeEntry("SlowKeys", ui.slowKeys->isChecked()); | 298 | keyboardGroup.writeEntry("SlowKeys", _slowKeys); | ||
406 | keyboardGroup.writeEntry("SlowKeysDelay", ui.slowKeysDelay->value()); | 299 | keyboardGroup.writeEntry("SlowKeysDelay", _slowKeysDelay); | ||
407 | keyboardGroup.writeEntry("SlowKeysPressBeep", ui.slowKeysPressBeep->isChecked()); | 300 | keyboardGroup.writeEntry("SlowKeysPressBeep", _slowKeysPressBeep); | ||
408 | keyboardGroup.writeEntry("SlowKeysAcceptBeep", ui.slowKeysAcceptBeep->isChecked()); | 301 | keyboardGroup.writeEntry("SlowKeysAcceptBeep", _slowKeysAcceptBeep); | ||
409 | keyboardGroup.writeEntry("SlowKeysRejectBeep", ui.slowKeysRejectBeep->isChecked()); | 302 | keyboardGroup.writeEntry("SlowKeysRejectBeep", _slowKeysRejectBeep); | ||
410 | 303 | | |||
411 | 304 | | |||
412 | keyboardGroup.writeEntry("BounceKeys", ui.bounceKeys->isChecked()); | 305 | keyboardGroup.writeEntry("BounceKeys", _bounceKeys); | ||
413 | keyboardGroup.writeEntry("BounceKeysDelay", ui.bounceKeysDelay->value()); | 306 | keyboardGroup.writeEntry("BounceKeysDelay", _bounceKeysDelay); | ||
414 | keyboardGroup.writeEntry("BounceKeysRejectBeep", ui.bounceKeysRejectBeep->isChecked()); | 307 | keyboardGroup.writeEntry("BounceKeysRejectBeep", _bounceKeysRejectBeep); | ||
415 | 308 | | |||
416 | keyboardGroup.writeEntry("Gestures", ui.gestures->isChecked()); | 309 | keyboardGroup.writeEntry("Gestures", _gestures); | ||
417 | keyboardGroup.writeEntry("AccessXTimeout", ui.timeout->isChecked()); | 310 | keyboardGroup.writeEntry("AccessXTimeout", _timeout); | ||
418 | keyboardGroup.writeEntry("AccessXTimeoutDelay", ui.timeoutDelay->value()); | 311 | keyboardGroup.writeEntry("AccessXTimeoutDelay", _timeoutDelay); | ||
419 | 312 | | |||
420 | keyboardGroup.writeEntry("AccessXBeep", ui.accessxBeep->isChecked()); | 313 | keyboardGroup.writeEntry("AccessXBeep", _accessXBeep); | ||
421 | keyboardGroup.writeEntry("GestureConfirmation", ui.gestureConfirmation->isChecked()); | 314 | keyboardGroup.writeEntry("GestureConfirmation", _gestureConfirmation); | ||
422 | keyboardGroup.writeEntry("kNotifyAccess", ui.kNotifyAccess->isChecked()); | 315 | keyboardGroup.writeEntry("kNotifyAccess", _keyboardNotifyAccess); | ||
423 | | ||||
424 | 316 | | |||
425 | keyboardGroup.sync(); | 317 | keyboardGroup.sync(); | ||
426 | 318 | | |||
427 | KConfigGroup mouseGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Mouse"); | 319 | KConfigGroup mouseGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "Mouse"); | ||
428 | const int interval = ui.mk_interval->value(); | 320 | const int interval = _mouseKeyInterval; | ||
429 | mouseGroup.writeEntry("MouseKeys", ui.mouseKeys->isChecked()); | 321 | mouseGroup.writeEntry("MouseKeys", _mouseKeys); | ||
430 | mouseGroup.writeEntry("MKDelay", ui.mk_delay->value()); | 322 | mouseGroup.writeEntry("MKDelay", _mouseKeyDelay); | ||
431 | mouseGroup.writeEntry("MKInterval", interval); | 323 | mouseGroup.writeEntry("MKInterval", interval); | ||
432 | mouseGroup.writeEntry("MK-TimeToMax", ui.mk_time_to_max->value()); | 324 | mouseGroup.writeEntry("MK-TimeToMax", _mouseKeyTimeToMax); | ||
433 | mouseGroup.writeEntry("MKTimeToMax", (ui.mk_time_to_max->value() + interval/2)/interval); | 325 | mouseGroup.writeEntry("MKTimeToMax", (_mouseKeyTimeToMax + interval/2)/interval); | ||
434 | mouseGroup.writeEntry("MK-MaxSpeed", ui.mk_max_speed->value()); | 326 | mouseGroup.writeEntry("MK-MaxSpeed", _mouseKeyMaxSpeed); | ||
435 | mouseGroup.writeEntry("MKMaxSpeed", (ui.mk_max_speed->value()*interval + 500)/1000); | 327 | mouseGroup.writeEntry("MKMaxSpeed", (_mouseKeyMaxSpeed*interval + 500)/1000); | ||
436 | mouseGroup.writeEntry("MKCurve", ui.mk_curve->value()); | 328 | mouseGroup.writeEntry("MKCurve", _mouseKeyCurve); | ||
437 | mouseGroup.sync(); | 329 | mouseGroup.sync(); | ||
438 | 330 | | |||
439 | KConfigGroup screenReaderGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "ScreenReader"); | 331 | KConfigGroup screenReaderGroup(KSharedConfig::openConfig(QStringLiteral("kaccessrc")), "ScreenReader"); | ||
440 | screenReaderGroup.writeEntry("Enabled", ui.screenReaderEnabled->isChecked()); | 332 | screenReaderGroup.writeEntry("Enabled", _screenReaderEnabled); | ||
441 | 333 | | |||
442 | if (ui.systemBell->isChecked() || | 334 | if (_systemBell || _customBell || _visibleBell) { | ||
443 | ui.customBell->isChecked() || | | |||
444 | ui.visibleBell->isChecked()) { | | |||
445 | KConfig _cfg(QStringLiteral("kdeglobals"), KConfig::NoGlobals); | 335 | KConfig _cfg(QStringLiteral("kdeglobals"), KConfig::NoGlobals); | ||
446 | KConfigGroup cfg(&_cfg, "General"); | 336 | KConfigGroup cfg(&_cfg, "General"); | ||
447 | cfg.writeEntry("UseSystemBell", true); | 337 | cfg.writeEntry("UseSystemBell", true); | ||
448 | cfg.sync(); | 338 | cfg.sync(); | ||
449 | } | 339 | } | ||
450 | 340 | | |||
451 | // make kaccess reread the configuration | 341 | // make kaccess reread the configuration | ||
452 | // turning a11y features off needs to be done by kaccess | 342 | // turning a11y features off needs to be done by kaccess | ||
453 | // so run it to clear any enabled features and it will exit if it should | 343 | // so run it to clear any enabled features and it will exit if it should | ||
454 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | 344 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | ||
455 | | ||||
456 | emit changed(false); | | |||
457 | } | 345 | } | ||
458 | 346 | | |||
459 | 347 | | |||
460 | void KAccessConfig::defaults() | 348 | void KAccessConfig::defaults() | ||
461 | { | 349 | { | ||
462 | ui.systemBell->setChecked(true); | 350 | _systemBell = true; | ||
463 | ui.customBell->setChecked(false); | 351 | _customBell = false; | ||
464 | ui.soundEdit->setText(QString()); | 352 | _soundEdit = QString(); | ||
465 | 353 | | |||
466 | ui.visibleBell->setChecked(false); | 354 | _visibleBell = false; | ||
467 | ui.invertScreen->setChecked(true); | 355 | _invertScreen = true; | ||
468 | ui.flashScreen->setChecked(false); | 356 | _flashScreen = false; | ||
469 | ui.colorButton->setColor(QColor(Qt::red)); | 357 | _colorButton = QColor(Qt::red); | ||
470 | 358 | | |||
471 | ui.duration->setValue(500); | 359 | _duration = 500; | ||
472 | 360 | | |||
473 | ui.slowKeys->setChecked(false); | 361 | _slowKeys = false; | ||
474 | ui.slowKeysDelay->setValue(500); | 362 | _slowKeysDelay = 500; | ||
475 | ui.slowKeysPressBeep->setChecked(true); | 363 | _slowKeysPressBeep = true; | ||
476 | ui.slowKeysAcceptBeep->setChecked(true); | 364 | _slowKeysAcceptBeep = true; | ||
477 | ui.slowKeysRejectBeep->setChecked(true); | 365 | _slowKeysRejectBeep = true; | ||
478 | 366 | | |||
479 | ui.bounceKeys->setChecked(false); | 367 | _bounceKeys = false; | ||
480 | ui.bounceKeysDelay->setValue(500); | 368 | _bounceKeysDelay = 500; | ||
481 | ui.bounceKeysRejectBeep->setChecked(true); | 369 | _bounceKeysRejectBeep = true; | ||
370 | | ||||
371 | _stickyKeys = false; | ||||
372 | _stickyKeysLock = true; | ||||
373 | _stickyKeysAutoOff = false; | ||||
374 | _stickyKeysBeep = true; | ||||
375 | _toggleKeysBeep = false; | ||||
376 | _keyboardNotifyModifiers = false; | ||||
377 | | ||||
378 | _gestures = false; | ||||
379 | _timeout = false; | ||||
380 | _timeoutDelay = 30; | ||||
381 | | ||||
382 | _accessXBeep = true; | ||||
383 | _gestureConfirmation = true; | ||||
384 | _keyboardNotifyAccess = false; | ||||
385 | | ||||
386 | _mouseKeys = false; | ||||
387 | _mouseKeyDelay = 160; | ||||
388 | _mouseKeyInterval = 5; | ||||
389 | _mouseKeyTimeToMax = 5000; | ||||
390 | _mouseKeyMaxSpeed = 1000; | ||||
391 | _mouseKeyCurve = 0; | ||||
482 | 392 | | |||
483 | ui.stickyKeys->setChecked(false); | 393 | _screenReaderEnabled = false; | ||
484 | ui.stickyKeysLock->setChecked(true); | | |||
485 | ui.stickyKeysAutoOff->setChecked(false); | | |||
486 | ui.stickyKeysBeep->setChecked(true); | | |||
487 | ui.toggleKeysBeep->setChecked(false); | | |||
488 | ui.kNotifyModifiers->setChecked(false); | | |||
489 | | ||||
490 | ui.gestures->setChecked(false); | | |||
491 | ui.timeout->setChecked(false); | | |||
492 | ui.timeoutDelay->setValue(30); | | |||
493 | | ||||
494 | ui.accessxBeep->setChecked(true); | | |||
495 | ui.gestureConfirmation->setChecked(true); | | |||
496 | ui.kNotifyAccess->setChecked(false); | | |||
497 | | ||||
498 | ui.mouseKeys->setChecked(false); | | |||
499 | ui.mk_delay->setValue(160); | | |||
500 | ui.mk_interval->setValue(5); | | |||
501 | ui.mk_time_to_max->setValue(5000); | | |||
502 | ui.mk_max_speed->setValue(1000); | | |||
503 | ui.mk_curve->setValue(0); | | |||
504 | | ||||
505 | ui.screenReaderEnabled->setChecked(false); | | |||
506 | | ||||
507 | checkAccess(); | | |||
508 | | ||||
509 | emit changed(true); | | |||
510 | } | | |||
511 | | ||||
512 | | ||||
513 | void KAccessConfig::invertClicked() | | |||
514 | { | | |||
515 | ui.flashScreen->setChecked(false); | | |||
516 | } | | |||
517 | | ||||
518 | | ||||
519 | void KAccessConfig::flashClicked() | | |||
520 | { | | |||
521 | ui.invertScreen->setChecked(false); | | |||
522 | } | | |||
523 | | ||||
524 | | ||||
525 | void KAccessConfig::checkAccess() | | |||
526 | { | | |||
527 | bool custom = ui.customBell->isChecked(); | | |||
528 | ui.soundEdit->setEnabled(custom); | | |||
529 | ui.soundButton->setEnabled(custom); | | |||
530 | ui.soundLabel->setEnabled(custom); | | |||
531 | | ||||
532 | bool visible = ui.visibleBell->isChecked(); | | |||
533 | ui.invertScreen->setEnabled(visible); | | |||
534 | ui.flashScreen->setEnabled(visible); | | |||
535 | ui.colorButton->setEnabled(visible); | | |||
536 | ui.duration->setEnabled(visible); | | |||
537 | | ||||
538 | bool sticky = ui.stickyKeys->isChecked(); | | |||
539 | ui.stickyKeysLock->setEnabled(sticky); | | |||
540 | ui.stickyKeysAutoOff->setEnabled(sticky); | | |||
541 | ui.stickyKeysBeep->setEnabled(sticky); | | |||
542 | | ||||
543 | bool slow = ui.slowKeys->isChecked(); | | |||
544 | ui.slowKeysDelay->setEnabled(slow); | | |||
545 | ui.slowKeysPressBeep->setEnabled(slow); | | |||
546 | ui.slowKeysAcceptBeep->setEnabled(slow); | | |||
547 | ui.slowKeysRejectBeep->setEnabled(slow); | | |||
548 | | ||||
549 | bool bounce = ui.bounceKeys->isChecked(); | | |||
550 | ui.bounceKeysDelay->setEnabled(bounce); | | |||
551 | ui.bounceKeysRejectBeep->setEnabled(bounce); | | |||
552 | | ||||
553 | bool useTimeout = ui.timeout->isChecked(); | | |||
554 | ui.timeoutDelay->setEnabled(useTimeout); | | |||
555 | } | 394 | } | ||
556 | 395 | | |||
557 | extern "C" | 396 | extern "C" | ||
558 | { | 397 | { | ||
559 | /* This one gets called by kcminit | 398 | /* This one gets called by kcminit | ||
560 | 399 | | |||
561 | */ | 400 | */ | ||
562 | Q_DECL_EXPORT void kcminit_access() | 401 | Q_DECL_EXPORT void kcminit_access() | ||
563 | { | 402 | { | ||
564 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | 403 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | ||
565 | } | 404 | } | ||
566 | } | 405 | } | ||
567 | 406 | | |||
568 | #include "kcmaccess.moc" | 407 | //---- | ||
408 | #define DEFINE_PROPERTY_METHODS(Type, Getter, Setter) \ | ||||
409 | void KAccessConfig::set##Setter(Type value) { \ | ||||
410 | if (_##Getter != value) { \ | ||||
411 | _##Getter = value; \ | ||||
412 | Q_EMIT Getter##Changed(value); \ | ||||
413 | } \ | ||||
414 | } \ | ||||
415 | Type KAccessConfig:: Getter () const { return _##Getter ; } | ||||
416 | | ||||
417 | | ||||
418 | DEFINE_PROPERTY_METHODS(int, timeoutDelay , TimeoutDelay ) | ||||
419 | DEFINE_PROPERTY_METHODS(int, bounceKeysDelay , BounceKeysDelay ) | ||||
420 | DEFINE_PROPERTY_METHODS(int, duration , Duration ) | ||||
421 | DEFINE_PROPERTY_METHODS(int, slowKeysDelay , SlowKeysDelay ) | ||||
422 | DEFINE_PROPERTY_METHODS(int, mouseKeyDelay , MouseKeyDelay ) | ||||
423 | DEFINE_PROPERTY_METHODS(int, mouseKeyInterval , MouseKeyInterval ) | ||||
424 | DEFINE_PROPERTY_METHODS(int, mouseKeyTimeToMax , MouseKeyTimeToMax ) | ||||
425 | DEFINE_PROPERTY_METHODS(int, mouseKeyMaxSpeed , MouseKeyMaxSpeed ) | ||||
426 | DEFINE_PROPERTY_METHODS(int, mouseKeyCurve , MouseKeyCurve ) | ||||
427 | DEFINE_PROPERTY_METHODS(bool, systemBell , SystemBell ) | ||||
428 | DEFINE_PROPERTY_METHODS(bool, customBell , CustomBell ) | ||||
429 | DEFINE_PROPERTY_METHODS(bool, visibleBell , VisibleBell ) | ||||
430 | DEFINE_PROPERTY_METHODS(bool, invertScreen , InvertScreen ) | ||||
431 | DEFINE_PROPERTY_METHODS(bool, flashScreen , FlashScreen ) | ||||
432 | DEFINE_PROPERTY_METHODS(bool, slowKeys , SlowKeys ) | ||||
433 | DEFINE_PROPERTY_METHODS(bool, slowKeysPressBeep , SlowKeysPressBeep ) | ||||
434 | DEFINE_PROPERTY_METHODS(bool, slowKeysAcceptBeep , SlowKeysAcceptBeep ) | ||||
435 | DEFINE_PROPERTY_METHODS(bool, slowKeysRejectBeep , SlowKeysRejectBeep ) | ||||
436 | DEFINE_PROPERTY_METHODS(bool, bounceKeys , BounceKeys ) | ||||
437 | DEFINE_PROPERTY_METHODS(bool, bounceKeysRejectBeep, BounceKeysRejectBeep) | ||||
438 | DEFINE_PROPERTY_METHODS(bool, stickyKeys , StickyKeys ) | ||||
439 | DEFINE_PROPERTY_METHODS(bool, stickyKeysLock , StickyKeysLock ) | ||||
440 | DEFINE_PROPERTY_METHODS(bool, stickyKeysAutoOff , StickyKeysAutoOff ) | ||||
441 | DEFINE_PROPERTY_METHODS(bool, stickyKeysBeep , StickyKeysBeep ) | ||||
442 | DEFINE_PROPERTY_METHODS(bool, toggleKeysBeep , ToggleKeysBeep ) | ||||
443 | DEFINE_PROPERTY_METHODS(bool, keyboardNotifyModifiers , KeyboardNotifyModifiers) | ||||
444 | DEFINE_PROPERTY_METHODS(bool, gestures , Gestures ) | ||||
445 | DEFINE_PROPERTY_METHODS(bool, timeout , Timeout ) | ||||
446 | DEFINE_PROPERTY_METHODS(bool, accessXBeep , AccessXBeep ) | ||||
447 | DEFINE_PROPERTY_METHODS(bool, gestureConfirmation , GestureConfirmation ) | ||||
448 | DEFINE_PROPERTY_METHODS(bool, keyboardNotifyAccess , KeyboardNotifyAccess) | ||||
449 | DEFINE_PROPERTY_METHODS(bool, mouseKeys , MouseKeys ) | ||||
450 | DEFINE_PROPERTY_METHODS(bool, screenReaderEnabled , ScreenReaderEnabled ) | ||||
451 | DEFINE_PROPERTY_METHODS(QString, soundEdit , SoundEdit ) | ||||
452 | DEFINE_PROPERTY_METHODS(QColor, colorButton , ColorButton ) | ||||
569 | 453 | | |||
454 | #include "kcmaccess.moc" |