void ColorPickerProxy::set(const string& value, const string& wavelength_range) { m_line_edit->setText(QString::fromStdString(value)); set_tool_button_color( m_picker_button, color_to_qcolor( get_color_from_string(value, wavelength_range))); }
void ColorPickerProxy::set(const string& value) { m_line_edit->setText(QString::fromStdString(value)); const QColor color = color_to_qcolor(get_color_from_string(value)); m_picker_button->setStyleSheet( QString("background-color: rgb(%1, %2, %3)") .arg(color.red()) .arg(color.green()) .arg(color.blue())); emit signal_changed(); }