| 620 | |
| 621 | |
| 622 | void AccessibleInstanceViewItem::selectCell() |
| 623 | { |
| 624 | if (!isValid()) { |
| 625 | return; |
| 626 | } |
| 627 | QAbstractItemView::SelectionMode selectionMode = view->selectionMode(); |
| 628 | if (selectionMode == QAbstractItemView::NoSelection) { |
| 629 | return; |
| 630 | } |
| 631 | |
| 632 | Q_ASSERT(table()); |
| 633 | QAccessibleTableInterface *cellTable = table()->tableInterface(); |
| 634 | |
| 635 | switch (view->selectionBehavior()) { |
| 636 | case QAbstractItemView::SelectItems: |
| 637 | break; |
| 638 | case QAbstractItemView::SelectColumns: |
| 639 | if (cellTable) |
| 640 | cellTable->selectColumn(m_index.column()); |
| 641 | return; |
| 642 | case QAbstractItemView::SelectRows: |
| 643 | if (cellTable) |
| 644 | cellTable->selectRow(m_index.row()); |
| 645 | return; |
| 646 | } |
| 647 | |
| 648 | if (selectionMode == QAbstractItemView::SingleSelection) { |
| 649 | view->clearSelection(); |
| 650 | } |
| 651 | |
| 652 | view->selectionModel()->select(m_index, QItemSelectionModel::Select); |
| 653 | } |
| 654 | |
| 655 | void AccessibleInstanceViewItem::unselectCell() |
| 656 | { |
nothing calls this directly
no test coverage detected