! Returns true if this selection is identical (contains the same data ranges with the same begin and end indices) to \a other. Note that both data selections must be in simplified state (the usual state of the selection, see \ref simplify) for this operator to return correct results. */
| 2432 | \ref simplify) for this operator to return correct results. |
| 2433 | */ |
| 2434 | bool QCPDataSelection::operator==(const QCPDataSelection &other) const |
| 2435 | { |
| 2436 | if (mDataRanges.size() != other.mDataRanges.size()) |
| 2437 | return false; |
| 2438 | for (int i=0; i<mDataRanges.size(); ++i) |
| 2439 | { |
| 2440 | if (mDataRanges.at(i) != other.mDataRanges.at(i)) |
| 2441 | return false; |
| 2442 | } |
| 2443 | return true; |
| 2444 | } |
| 2445 | |
| 2446 | /*! |
| 2447 | Adds the data selection of \a other to this data selection, and then simplifies this data |