Example #1
0
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 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());
}
Example #4
0
     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);
     }
Example #5
0
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;
	}
}
Example #6
0
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));
}