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

Method writeMouseDeviceList

QKeyMapper/qinputdevicelistwindow.cpp:334–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void QInputDeviceListWindow::writeMouseDeviceList()
335{
336 QList<InputDevice> mouselist = Interception_Worker::getMouseDeviceList();
337
338 int rowCount = ui->mouseDeviceTable->rowCount();
339 for (int row = 0; row < rowCount; ++row) {
340 QTableWidgetItem* item = ui->mouseDeviceTable->item(row, DEVICE_TABLE_DISABLE_COLUMN);
341 if (item != Q_NULLPTR) {
342 QString devicedesc_str = ui->mouseDeviceTable->item(row, DEVICE_TABLE_DEVICEDESC_COLUMN)->text();
343 QString hardwareid_str = ui->mouseDeviceTable->item(row, DEVICE_TABLE_HARDWAREID_COLUMN)->text();
344 QString disabled_device_str = devicedesc_str + JOIN_DEVICE + hardwareid_str;
345 if (Qt::Checked == item->checkState()) {
346 Interception_Worker::updateDisabledMouseList(disabled_device_str, true);
347 }
348 else {
349 Interception_Worker::updateDisabledMouseList(disabled_device_str, false);
350 }
351 }
352 }
353
354 Interception_Worker::syncDisabledMouseList();
355 Interception_Worker::saveDisabledMouseList();
356}
357
358void QInputDeviceListWindow::showEvent(QShowEvent *event)
359{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected