! Returns a list of the selected items. If no items are currently selected, the list is empty. \see setInteractions, QCPAbstractItem::setSelectable, QCPAbstractItem::setSelected */
| 13901 | \see setInteractions, QCPAbstractItem::setSelectable, QCPAbstractItem::setSelected |
| 13902 | */ |
| 13903 | QList<QCPAbstractItem*> QCustomPlot::selectedItems() const |
| 13904 | { |
| 13905 | QList<QCPAbstractItem*> result; |
| 13906 | foreach (QCPAbstractItem *item, mItems) |
| 13907 | { |
| 13908 | if (item->selected()) |
| 13909 | result.append(item); |
| 13910 | } |
| 13911 | return result; |
| 13912 | } |
| 13913 | |
| 13914 | /*! |
| 13915 | Returns the item at the pixel position \a pos. Items that only consist of single lines (e.g. \ref |