! Sets the range spanned by the color gradient and that is shown by the axis in the color scale. It is equivalent to calling QCPColorMap::setDataRange on any of the connected color maps. It is also equivalent to directly accessing the \ref axis and setting its range with \ref QCPAxis::setRange. \see setDataScaleType, setGradient, rescaleDataRange */
| 19448 | \see setDataScaleType, setGradient, rescaleDataRange |
| 19449 | */ |
| 19450 | void QCPColorScale::setDataRange(const QCPRange &dataRange) |
| 19451 | { |
| 19452 | if (mDataRange.lower != dataRange.lower || mDataRange.upper != dataRange.upper) |
| 19453 | { |
| 19454 | mDataRange = dataRange; |
| 19455 | if (mColorAxis) |
| 19456 | mColorAxis.data()->setRange(mDataRange); |
| 19457 | Q_EMIT dataRangeChanged(mDataRange); |
| 19458 | } |
| 19459 | } |
| 19460 | |
| 19461 | /*! |
| 19462 | Sets the scale type of the color scale, i.e. whether values are linearly associated with colors |
nothing calls this directly
no test coverage detected