| 650 | } |
| 651 | |
| 652 | void AccessibleInstanceViewItem::unselectCell() |
| 653 | { |
| 654 | if (!isValid()) |
| 655 | return; |
| 656 | QAbstractItemView::SelectionMode selectionMode = view->selectionMode(); |
| 657 | if (selectionMode == QAbstractItemView::NoSelection) |
| 658 | return; |
| 659 | |
| 660 | QAccessibleTableInterface* cellTable = table()->tableInterface(); |
| 661 | |
| 662 | switch (view->selectionBehavior()) { |
| 663 | case QAbstractItemView::SelectItems: |
| 664 | break; |
| 665 | case QAbstractItemView::SelectColumns: |
| 666 | if (cellTable) |
| 667 | cellTable->unselectColumn(m_index.column()); |
| 668 | return; |
| 669 | case QAbstractItemView::SelectRows: |
| 670 | if (cellTable) |
| 671 | cellTable->unselectRow(m_index.row()); |
| 672 | return; |
| 673 | } |
| 674 | |
| 675 | // If the mode is not MultiSelection or ExtendedSelection and only |
| 676 | // one cell is selected it cannot be unselected by the user |
| 677 | if ((selectionMode != QAbstractItemView::MultiSelection) && (selectionMode != QAbstractItemView::ExtendedSelection) && |
| 678 | (view->selectionModel()->selectedIndexes().count() <= 1)) |
| 679 | return; |
| 680 | |
| 681 | view->selectionModel()->select(m_index, QItemSelectionModel::Deselect); |
| 682 | } |
| 683 | |
| 684 | QAccessibleInterface* AccessibleInstanceViewItem::table() const |
| 685 | { |
nothing calls this directly
no test coverage detected