/** Set the color bar to use log scale * * @param log :: true to use log scale */ void ColorBarWidget::setLog(bool log) { m_log = log; m_colorMap.changeScaleType( m_log ? GraphOptions::Log10 : GraphOptions::Linear ); ui.checkLog->setChecked( m_log ); ui.valMin->setLogSteps( m_log ); ui.valMax->setLogSteps( m_log ); setSpinBoxesSteps(); updateColorMap(); }
/* * Update display if different scale type is selected */ void ColorBarWidget::changedScaleType(int type) { // If power scale option is selected, enable "n =" widget ui.dspnN->setEnabled(type == 2); // Record if log scale option is selected m_log = (type == 1); m_colorMap.changeScaleType( GraphOptions::ScaleType(type) ); ui.valMin->setLogSteps( m_log ); ui.valMax->setLogSteps( m_log ); setSpinBoxesSteps(); updateColorMap(); emit changedColorRange(m_min,m_max,m_log); }