void SkirosGui::restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings) { std::string sceneNameParam; ros::NodeHandle skiros_nh(skiros_config::skiros_namespace); skiros_nh.param<std::string>(skiros_config::scene_name, sceneNameParam, ""); QString sceneName = instance_settings.value("sceneName", "").toString(); if(sceneNameParam!="") ui_.sceneFile_lineEdit->setText(sceneNameParam.c_str()); else if(!sceneName.isEmpty()) ui_.sceneFile_lineEdit->setText(sceneName); QSize size = instance_settings.value("sceneName", "").toSize(); widget_->resize(size); auto check = instance_settings.value("advancedOptions", "").toBool(); ui_.modality_checkBox->setChecked(check); QString logFile = instance_settings.value("logFile", "").toString(); if(logFile!="") ui_.logFile_lineEdit->setText(logFile); else { QString directory = QDir::homePath() + "/skiros/log.txt"; ui_.logFile_lineEdit->setText(directory); } logFileChanged(); if(instance_settings.value("saveLog", "").toBool()) this->startLogButtonClicked(); }
void PlaybackController::restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings) { ui_.recordingDirLineEdit->setText(instance_settings.value("recording_location").toString()); ui_.timeOffsetSpinBox->setValue(instance_settings.value("time_offset").toDouble()); ui_.stepsizeSpinBox->setValue(instance_settings.value("stepsize").toDouble()); }
void PlaybackController::saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const { instance_settings.setValue("recording_location", ui_.recordingDirLineEdit->text()); instance_settings.setValue("time_offset", ui_.timeOffsetSpinBox->value()); instance_settings.setValue("stepsize", ui_.stepsizeSpinBox->value()); }
void ServiceWidget::restoreSettings(const qt_gui_cpp::Settings& pluginSettings, const qt_gui_cpp::Settings& instanceSettings) { if(instanceSettings.contains("tableViewState")) m_view->horizontalHeader()->restoreState(instanceSettings.value("tableViewState").toByteArray()); if(instanceSettings.contains("connection")) m_connectionBox->addItem(instanceSettings.value("connection").toString()); }
void SkirosGui::saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const { instance_settings.setValue("sceneName", ui_.sceneFile_lineEdit->text()); instance_settings.setValue("advancedOptions", ui_.modality_checkBox->isChecked()); instance_settings.setValue("size", widget_->size()); instance_settings.setValue("logFile", ui_.logFile_lineEdit->text()); instance_settings.setValue("saveLog", logging_); }
void Autopilot::restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings) { double desired_heading = instance_settings.value("desired_heading", ui_.desired_heading_double_spin_box->value()).toDouble(); ui_.desired_heading_double_spin_box->setValue(desired_heading); double desired_depth = instance_settings.value("desired_depth", ui_.desired_depth_double_spin_box->value()).toDouble(); ui_.desired_depth_double_spin_box->setValue(desired_depth); }
void BandwidthGui::restoreSettings(const qt_gui_cpp::Settings& pluginSettings, const qt_gui_cpp::Settings& instanceSettings) { if(instanceSettings.contains("connection")) m_connectionBox->addItem(instanceSettings.value("connection").toString()); if(instanceSettings.contains("groups")) { m_grpYamlString = instanceSettings.value("groups").toString(); GroupMap groupMap; if(m_grpYamlString.isEmpty()) m_grpYamlString = QString::fromStdString(DEFAULT_GROUPS); if(!groupFromYaml(m_grpYamlString.toStdString(), &groupMap)) { m_grpYamlString = ""; return; } m_groupMap = groupMap; } }
void ImageView::restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings) { std::string topic = instance_settings.value("topic", "").toString().toStdString(); ui_.image_topic->setText(QString::fromStdString(topic)); }
void ImageView::saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const { instance_settings.setValue("topic", QString::fromStdString(topic)); }
void BandwidthGui::saveSettings(qt_gui_cpp::Settings& pluginSettings, qt_gui_cpp::Settings& instanceSettings) const { instanceSettings.setValue("connection", m_connectionBox->currentText()); instanceSettings.setValue("groups", m_grpYamlString); }
void ServiceWidget::saveSettings(qt_gui_cpp::Settings& pluginSettings, qt_gui_cpp::Settings& instanceSettings) const { instanceSettings.setValue("tableViewState", m_view->horizontalHeader()->saveState()); instanceSettings.setValue("connection", m_connectionBox->currentText()); }
void Autopilot::saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const { instance_settings.setValue("desired_heading", ui_.desired_heading_double_spin_box->value()); instance_settings.setValue("desired_depth", ui_.desired_depth_double_spin_box->value()); }