! Returns a list of all the items that are associated with this axis. An item is considered associated with an axis if at least one of its positions uses the axis as key or value axis. \see plottables, graphs */
| 8732 | \see plottables, graphs |
| 8733 | */ |
| 8734 | QList<QCPAbstractItem*> QCPAxis::items() const |
| 8735 | { |
| 8736 | QList<QCPAbstractItem*> result; |
| 8737 | if (!mParentPlot) return result; |
| 8738 | |
| 8739 | for (int itemId=0; itemId<mParentPlot->mItems.size(); ++itemId) |
| 8740 | { |
| 8741 | QList<QCPItemPosition*> positions = mParentPlot->mItems.at(itemId)->positions(); |
| 8742 | for (int posId=0; posId<positions.size(); ++posId) |
| 8743 | { |
| 8744 | if (positions.at(posId)->keyAxis() == this || positions.at(posId)->valueAxis() == this) |
| 8745 | { |
| 8746 | result.append(mParentPlot->mItems.at(itemId)); |
| 8747 | break; |
| 8748 | } |
| 8749 | } |
| 8750 | } |
| 8751 | return result; |
| 8752 | } |
| 8753 | |
| 8754 | /*! |
| 8755 | Transforms a margin side to the logically corresponding axis type. (QCP::msLeft to |
nothing calls this directly
no test coverage detected