| 733 | } |
| 734 | |
| 735 | void InstanceView::setSelection(const QRect &rect, const QItemSelectionModel::SelectionFlags commands) |
| 736 | { |
| 737 | executeDelayedItemsLayout(); |
| 738 | |
| 739 | for (int i = 0; i < model()->rowCount(); ++i) |
| 740 | { |
| 741 | QModelIndex index = model()->index(i, 0); |
| 742 | QRect itemRect = visualRect(index); |
| 743 | if (itemRect.intersects(rect)) |
| 744 | { |
| 745 | selectionModel()->select(index, commands); |
| 746 | update(itemRect.translated(-offset())); |
| 747 | } |
| 748 | } |
| 749 | } |
| 750 | |
| 751 | QPixmap InstanceView::renderToPixmap(const QModelIndexList &indices, QRect *r) const |
| 752 | { |