! Sets the range of the axis. This slot may be connected with the \ref rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes. To invert the direction of an axis, use \ref setRangeReversed. */
| 8387 | To invert the direction of an axis, use \ref setRangeReversed. |
| 8388 | */ |
| 8389 | void QCPAxis::setRange(const QCPRange &range) |
| 8390 | { |
| 8391 | if (range.lower == mRange.lower && range.upper == mRange.upper) |
| 8392 | return; |
| 8393 | |
| 8394 | if (!QCPRange::validRange(range)) return; |
| 8395 | QCPRange oldRange = mRange; |
| 8396 | if (mScaleType == stLogarithmic) |
| 8397 | { |
| 8398 | mRange = range.sanitizedForLogScale(); |
| 8399 | } else |
| 8400 | { |
| 8401 | mRange = range.sanitizedForLinScale(); |
| 8402 | } |
| 8403 | emit rangeChanged(mRange); |
| 8404 | emit rangeChanged(mRange, oldRange); |
| 8405 | } |
| 8406 | |
| 8407 | /*! |
| 8408 | Sets whether the user can (de-)select the parts in \a selectable by clicking on the QCustomPlot surface. |
no test coverage detected