2 #include "ui_settingsdialog.h" 11 settings_ = workspace_->settings();
12 settings_->beginGroup(
"environment");
13 QString r_home = settings_->value(
"R_HOME").toString();
14 settings_->endGroup();
15 settings_->beginGroup(
"specdata");
16 QString abs_label = settings_->value(
"absLabel").toString();
17 QString abs_units = settings_->value(
"absUnits").toString();
18 QString ord_label = settings_->value(
"ordLabel").toString();
19 QString ord_units = settings_->value(
"ordUnits").toString();
20 settings_->endGroup();
22 ui->rHomeLineEdit->setText(r_home);
23 ui->absLabelLineEdit->setText(abs_label);
24 ui->absUnitsLineEdit->setText(abs_units);
25 ui->ordLabelLineEdit->setText(ord_label);
26 ui->ordUnitsLineEdit->setText(ord_units);
34 void SettingsDialog::on_buttonBox_accepted()
36 QString r_home = ui->rHomeLineEdit->text();
37 QString abs_label = ui->absLabelLineEdit->text();
38 QString abs_units = ui->absUnitsLineEdit->text();
39 QString ord_label = ui->ordLabelLineEdit->text();
40 QString ord_units = ui->ordUnitsLineEdit->text();
42 settings_->beginGroup(
"environment");
43 settings_->setValue(
"R_HOME", r_home);
44 settings_->endGroup();
45 settings_->beginGroup(
"specdata");
46 settings_->setValue(
"absLabel", abs_label);
47 settings_->setValue(
"absUnits", abs_units);
48 settings_->setValue(
"ordLabel", ord_label);
49 settings_->setValue(
"ordUnits", ord_units);
50 settings_->endGroup();
SettingsDialog(QWidget *parent, QSharedPointer< VespucciWorkspace > ws)