| 776 | } |
| 777 | |
| 778 | void InstanceView::setSelection(const QRect &rect, const QItemSelectionModel::SelectionFlags commands) |
| 779 | { |
| 780 | executeDelayedItemsLayout(); |
| 781 | |
| 782 | for (int i = 0; i < model()->rowCount(); ++i) |
| 783 | { |
| 784 | QModelIndex index = model()->index(i, 0); |
| 785 | QRect itemRect = visualRect(index); |
| 786 | if (itemRect.intersects(rect)) |
| 787 | { |
| 788 | selectionModel()->select(index, commands); |
| 789 | update(itemRect.translated(-offset())); |
| 790 | } |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | QPixmap InstanceView::renderToPixmap(const QModelIndexList &indices, QRect *r) const |
| 795 | { |