MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / unselectCell

Method unselectCell

launcher/ui/instanceview/AccessibleInstanceView.cpp:652–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652void 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
684QAccessibleInterface* AccessibleInstanceViewItem::table() const
685{

Callers

nothing calls this directly

Calls 3

unselectColumnMethod · 0.80
unselectRowMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected