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

Method setParam

src/openms_gui/source/VISUAL/DIALOGS/TOPPViewPrefDialog.cpp:44–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 const char* tsg_prefix = "idview:tsg:";
43
44 void TOPPViewPrefDialog::setParam(const Param& param)
45 {
46 param_ = getParam(); // get our own defaults
47
48 // make sure the params we write (using getParam) are the same as the ones we can read
49 param_.update(param, true, true, true, true, OpenMS_Log_info);
50
51 // general tab
52 ui_->default_path->setText(String(param_.getValue("default_path").toString()).toQString());
53 ui_->default_path_current->setChecked(param_.getValue("default_path_current").toBool());
54 ui_->plugins_path->setText(String(param_.getValue("plugins_path").toString()).toQString());
55 ui_->use_cached_ms1->setChecked(param_.getValue("use_cached_ms1").toBool());
56 ui_->use_cached_ms2->setChecked(param_.getValue("use_cached_ms2").toBool());
57
58 ui_->map_default->setCurrentIndex(ui_->map_default->findText(String(param_.getValue("default_map_view").toString()).toQString()));
59 ui_->map_cutoff->setCurrentIndex(ui_->map_cutoff->findText(String(param_.getValue("intensity_cutoff").toString()).toQString()));
60 ui_->on_file_change->setCurrentIndex(ui_->on_file_change->findText(String(param_.getValue("on_file_change").toString()).toQString()));
61
62 // 1D view
63 ui_->color_1D->setColor(QColor(String(param_.getValue("1d:peak_color").toString()).toQString()));
64 ui_->selected_1D->setColor(QColor(String(param_.getValue("1d:highlighted_peak_color").toString()).toQString()));
65 ui_->icon_1D->setColor(QColor(String(param_.getValue("1d:icon_color").toString()).toQString()));
66
67 // 2D view
68 ui_->peak_2D->gradient().fromString(param_.getValue("2d:dot:gradient"));
69 ui_->feature_icon_2D->setCurrentIndex(ui_->feature_icon_2D->findText(String(param_.getValue("2d:dot:feature_icon").toString()).toQString()));
70 ui_->feature_icon_size_2D->setValue((Int)param_.getValue("2d:dot:feature_icon_size"));
71
72 // 3D view
73 ui_->peak_3D->gradient().fromString(param_.getValue("3d:dot:gradient"));
74 ui_->shade_3D->setCurrentIndex((Int)param_.getValue("3d:dot:shade_mode"));
75 ui_->line_width_3D->setValue((Int)param_.getValue("3d:dot:line_width"));
76
77 // TSG view
78 tsg_param_ = param_.copy(tsg_prefix, true);
79 ui_->param_editor_spec_gen_->load(tsg_param_);
80 ui_->tolerance->setValue((double)param_.getValue("idview:align:tolerance"));
81 ui_->unit->setCurrentIndex(ui_->unit->findText(String(param_.getValue("idview:align:is_relative_tolerance") == "true" ? "ppm" : "Da").toQString()));
82 }
83
84 String fromCheckState(const Qt::CheckState cs)
85 {

Callers 1

preferencesDialogMethod · 0.45

Calls 15

QColorClass · 0.85
setTextMethod · 0.80
setCurrentIndexMethod · 0.80
gradientMethod · 0.80
StringClass · 0.50
updateMethod · 0.45
toQStringMethod · 0.45
toStringMethod · 0.45
getValueMethod · 0.45
toBoolMethod · 0.45
setColorMethod · 0.45
fromStringMethod · 0.45

Tested by

no test coverage detected