| 368 | } |
| 369 | |
| 370 | void QInputDeviceListWindow::initKeyboardDeviceTable() |
| 371 | { |
| 372 | ui->keyboardDeviceTable->setFocusPolicy(Qt::NoFocus); |
| 373 | ui->keyboardDeviceTable->setColumnCount(KEYBOARD_TABLE_COLUMN_COUNT); |
| 374 | ui->keyboardDeviceTable->horizontalHeader()->setStretchLastSection(true); |
| 375 | ui->keyboardDeviceTable->horizontalHeader()->setHighlightSections(false); |
| 376 | ui->keyboardDeviceTable->verticalHeader()->setVisible(false); |
| 377 | ui->keyboardDeviceTable->verticalHeader()->setDefaultSectionSize(25); |
| 378 | ui->keyboardDeviceTable->setSelectionBehavior(QAbstractItemView::SelectRows); |
| 379 | ui->keyboardDeviceTable->setSelectionMode(QAbstractItemView::NoSelection); |
| 380 | ui->keyboardDeviceTable->setEditTriggers(QAbstractItemView::NoEditTriggers); |
| 381 | |
| 382 | int number_width = 26; |
| 383 | int devicedesc_width = ui->keyboardDeviceTable->width()/7; |
| 384 | int vendorid_width = 60; |
| 385 | int productid_width = 60; |
| 386 | int vendorstr_width = ui->keyboardDeviceTable->width()/7 - 40; |
| 387 | int productstr_width = ui->keyboardDeviceTable->width()/5 - 30; |
| 388 | int manufacturer_width = vendorstr_width; |
| 389 | int disable_width = 30; |
| 390 | int hardwareid_width = ui->keyboardDeviceTable->width() - number_width - devicedesc_width - vendorid_width - productid_width - vendorstr_width - productstr_width - manufacturer_width - disable_width - 12; |
| 391 | |
| 392 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_NUMBER_COLUMN, number_width); |
| 393 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_DEVICEDESC_COLUMN, devicedesc_width); |
| 394 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_HARDWAREID_COLUMN, hardwareid_width); |
| 395 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_VENDORID_COLUMN, vendorid_width); |
| 396 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_PRODUCTID_COLUMN, productid_width); |
| 397 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_VENDORSTR_COLUMN, vendorstr_width); |
| 398 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_PRODUCTSTR_COLUMN, productstr_width); |
| 399 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_MANUFACTURER_COLUMN, manufacturer_width); |
| 400 | ui->keyboardDeviceTable->setColumnWidth(DEVICE_TABLE_DISABLE_COLUMN, disable_width); |
| 401 | } |
| 402 | |
| 403 | void QInputDeviceListWindow::initMouseDeviceTable() |
| 404 | { |
nothing calls this directly
no outgoing calls
no test coverage detected