MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / writeKeyboardDeviceList

Method writeKeyboardDeviceList

QKeyMapper/qinputdevicelistwindow.cpp:310–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310void QInputDeviceListWindow::writeKeyboardDeviceList()
311{
312 QList<InputDevice> keyboardlist = Interception_Worker::getKeyboardDeviceList();
313
314 int rowCount = ui->keyboardDeviceTable->rowCount();
315 for (int row = 0; row < rowCount; ++row) {
316 QTableWidgetItem* item = ui->keyboardDeviceTable->item(row, DEVICE_TABLE_DISABLE_COLUMN);
317 if (item != Q_NULLPTR) {
318 QString devicedesc_str = ui->keyboardDeviceTable->item(row, DEVICE_TABLE_DEVICEDESC_COLUMN)->text();
319 QString hardwareid_str = ui->keyboardDeviceTable->item(row, DEVICE_TABLE_HARDWAREID_COLUMN)->text();
320 QString disabled_device_str = devicedesc_str + JOIN_DEVICE + hardwareid_str;
321 if (Qt::Checked == item->checkState()) {
322 Interception_Worker::updateDisabledKeyboardList(disabled_device_str, true);
323 }
324 else {
325 Interception_Worker::updateDisabledKeyboardList(disabled_device_str, false);
326 }
327 }
328 }
329
330 Interception_Worker::syncDisabledKeyboardList();
331 Interception_Worker::saveDisabledKeyboardList();
332}
333
334void QInputDeviceListWindow::writeMouseDeviceList()
335{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected