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