! 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 */
| 20244 | \see setDataScaleType, setGradient, rescaleDataRange |
| 20245 | */ |
| 20246 | void QCPColorScale::setDataRange(const QCPRange &dataRange) |
| 20247 | { |
| 20248 | if (mDataRange.lower != dataRange.lower || mDataRange.upper != dataRange.upper) |
| 20249 | { |
| 20250 | mDataRange = dataRange; |
| 20251 | if (mColorAxis) |
| 20252 | mColorAxis.data()->setRange(mDataRange); |
| 20253 | emit dataRangeChanged(mDataRange); |
| 20254 | } |
| 20255 | } |
| 20256 | |
| 20257 | /*! |
| 20258 | Sets the scale type of the color scale, i.e. whether values are associated with colors linearly |
nothing calls this directly
no test coverage detected