void QmitkFloatingPointSpanSlider::IntSpanChanged(int lower, int upper) { if (m_IntMode) { m_LowerValue = lower; m_UpperValue = upper; } else { m_LowerValue = unscaleValue(lower); m_UpperValue = unscaleValue(upper); } emit spanChanged(m_LowerValue, m_UpperValue); }
void DoubleSpanSlider::scaleSpan(int l, int u) { double low = int2double(l); double up = int2double(u); if (low != lowerDoubleValue()) { setLowerDoubleValue(low); } if (up != upperDoubleValue()) { setUpperDoubleValue(up); } Q_EMIT lowerValueChanged(low); Q_EMIT upperValueChanged(up); Q_EMIT spanChanged(low, up); }
void QmitkFloatingPointSpanSlider::setSpan(double lower, double upper) { //MITK_INFO << "QmitkFloatingPointSpanSlider new span: " << lower << " - " << upper; m_LowerValue = lower; m_UpperValue = upper; if (m_IntMode) { this->QxtSpanSlider::setLowerValue(lower); this->QxtSpanSlider::setUpperValue(upper); } else { this->QxtSpanSlider::setLowerValue(scaleValue(lower)); this->QxtSpanSlider::setUpperValue(scaleValue(upper)); emit spanChanged(lower, upper); } }
/*! Sets the span from \a lower to \a upper. */ void QxtSpanSlider::setSpan(int lower, int upper) { const int low = qBound(minimum(), qMin(lower, upper), maximum()); const int upp = qBound(minimum(), qMax(lower, upper), maximum()); if (low != qxt_d().lower || upp != qxt_d().upper) { if (low != qxt_d().lower) { qxt_d().lower = low; qxt_d().lowerPos = low; emit lowerValueChanged(low); } if (upp != qxt_d().upper) { qxt_d().upper = upp; qxt_d().upperPos = upp; emit upperValueChanged(upp); } emit spanChanged(qxt_d().lower, qxt_d().upper); update(); } }