MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / showCurrentLayerPreferences

Method showCurrentLayerPreferences

src/openms_gui/source/VISUAL/Plot1DCanvas.cpp:899–926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

897 }
898
899 void Plot1DCanvas::showCurrentLayerPreferences()
900 {
901 Internal::Plot1DPrefDialog dlg(this);
902 LayerDataBase& layer = getCurrentLayer();
903
904 ColorSelector* peak_color = dlg.findChild<ColorSelector*>("peak_color");
905 ColorSelector* icon_color = dlg.findChild<ColorSelector*>("icon_color");
906 ColorSelector* annotation_color = dlg.findChild<ColorSelector*>("annotation_color");
907 ColorSelector* bg_color = dlg.findChild<ColorSelector*>("bg_color");
908 ColorSelector* selected_color = dlg.findChild<ColorSelector*>("selected_color");
909
910 peak_color->setColor(QColor(String(layer.param.getValue("peak_color").toString()).toQString()));
911 icon_color->setColor(QColor(String(layer.param.getValue("icon_color").toString()).toQString()));
912 annotation_color->setColor(QColor(String(layer.param.getValue("annotation_color").toString()).toQString()));
913 bg_color->setColor(QColor(String(param_.getValue("background_color").toString()).toQString()));
914 selected_color->setColor(QColor(String(param_.getValue("highlighted_peak_color").toString()).toQString()));
915
916 if (dlg.exec())
917 {
918 layer.param.setValue("peak_color", peak_color->getColor().name().toStdString());
919 layer.param.setValue("icon_color", icon_color->getColor().name().toStdString());
920 layer.param.setValue("annotation_color", annotation_color->getColor().name().toStdString());
921 param_.setValue("background_color", bg_color->getColor().name().toStdString());
922 param_.setValue("highlighted_peak_color", selected_color->getColor().name().toStdString());
923
924 emit preferencesChange();
925 }
926 }
927
928 void Plot1DCanvas::currentLayerParamtersChanged_()
929 {

Callers

nothing calls this directly

Calls 8

QColorClass · 0.85
getColorMethod · 0.80
StringClass · 0.50
setColorMethod · 0.45
toQStringMethod · 0.45
toStringMethod · 0.45
getValueMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected