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

Method selectCell

launcher/ui/instanceview/AccessibleInstanceView.cpp:619–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619void 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
652void AccessibleInstanceViewItem::unselectCell()
653{

Callers

nothing calls this directly

Calls 2

selectColumnMethod · 0.80
selectRowMethod · 0.80

Tested by

no test coverage detected