31 #include <opencv2/core/core.hpp> 
   50     ui_.color->setColor(Qt::green);
 
   54     p.setColor(QPalette::Background, Qt::white);
 
   58     QPalette p3(
ui_.status->palette());
 
   59     p3.setColor(QPalette::Text, Qt::red);
 
   60     ui_.status->setPalette(p3);
 
   62     QObject::connect(
ui_.selecttopic, SIGNAL(clicked()), 
this,
 
   64     QObject::connect(
ui_.topic, SIGNAL(editingFinished()), 
this,
 
   66     QObject::connect(
ui_.positiontolerance, SIGNAL(valueChanged(
double)), 
this,
 
   68     QObject::connect(
ui_.buffersize, SIGNAL(valueChanged(
int)), 
this,
 
   70     QObject::connect(
ui_.drawstyle, SIGNAL(activated(QString)), 
this,
 
   72     QObject::connect(
ui_.static_arrow_sizes, SIGNAL(clicked(
bool)),
 
   74     QObject::connect(
ui_.arrow_size, SIGNAL(valueChanged(
int)),
 
   76     QObject::connect(
ui_.use_latest_transforms, SIGNAL(clicked(
bool)),
 
   78     QObject::connect(
ui_.color, SIGNAL(colorEdited(
const QColor&)), 
this,
 
   80     QObject::connect(
ui_.show_laps, SIGNAL(toggled(
bool)), 
this,
 
   82     QObject::connect(
ui_.buttonResetBuffer, SIGNAL(pressed()), 
this,
 
   95     if (!topic.
name.empty())
 
   97       ui_.topic->setText(QString::fromStdString(topic.
name));
 
  104     std::string topic = 
ui_.topic->text().trimmed().toStdString();
 
  137     stamped_point.
stamp = gps->header.stamp;
 
  141     tf_manager_->LocalXyUtil()->ToLocalXy(gps->latitude, gps->longitude, x, y);
 
  198       node[
"topic"] >> topic;
 
  199       ui_.topic->setText(topic.c_str());
 
  205       node[
"color"] >> color;
 
  206       QColor qcolor(color.c_str());
 
  208       ui_.color->setColor(qcolor);
 
  211     if (node[
"draw_style"])
 
  213       std::string draw_style;
 
  214       node[
"draw_style"] >> draw_style;
 
  216       if (draw_style == 
"lines")
 
  218         ui_.drawstyle->setCurrentIndex(0);
 
  221       else if (draw_style == 
"points")
 
  223         ui_.drawstyle->setCurrentIndex(1);
 
  226       else if (draw_style == 
"arrows")
 
  228         ui_.drawstyle->setCurrentIndex(2);
 
  233     if (node[
"position_tolerance"])
 
  235       double position_tolerance;
 
  236       node[
"position_tolerance"] >> position_tolerance;
 
  237       ui_.positiontolerance->setValue(position_tolerance);
 
  241     if (node[
"buffer_size"])
 
  244       node[
"buffer_size"] >> buffer_size;
 
  245       ui_.buffersize->setValue(buffer_size);
 
  249     if (node[
"show_laps"])
 
  251       bool show_laps = 
false;
 
  252       node[
"show_laps"] >> show_laps;
 
  253       ui_.show_laps->setChecked(show_laps);
 
  257     if (node[
"static_arrow_sizes"])
 
  259       bool static_arrow_sizes = node[
"static_arrow_sizes"].as<
bool>();
 
  260       ui_.static_arrow_sizes->setChecked(static_arrow_sizes);
 
  264     if (node[
"arrow_size"])
 
  266       int arrow_size = node[
"arrow_size"].as<
int>();
 
  267       ui_.arrow_size->setValue(arrow_size);
 
  271     if (node[
"use_latest_transforms"])
 
  273       bool use_latest_transforms = node[
"use_latest_transforms"].as<
bool>();
 
  274       ui_.use_latest_transforms->setChecked(use_latest_transforms);
 
  283     std::string topic = 
ui_.topic->text().toStdString();
 
  284     emitter << YAML::Key << 
"topic" << YAML::Value << topic;
 
  286     emitter << YAML::Key << 
"color" << YAML::Value
 
  287             << 
ui_.color->color().name().toStdString();
 
  289     std::string draw_style = 
ui_.drawstyle->currentText().toStdString();
 
  290     emitter << YAML::Key << 
"draw_style" << YAML::Value << draw_style;
 
  292     emitter << YAML::Key << 
"position_tolerance" <<
 
  295     emitter << YAML::Key << 
"buffer_size" << YAML::Value << 
bufferSize();
 
  297     bool show_laps = 
ui_.show_laps->isChecked();
 
  298     emitter << YAML::Key << 
"show_laps" << YAML::Value << show_laps;
 
  300     emitter << YAML::Key << 
"static_arrow_sizes" << YAML::Value << 
ui_.static_arrow_sizes->isChecked();
 
  302     emitter << YAML::Key << 
"arrow_size" << YAML::Value << 
ui_.arrow_size->value();
 
  304     emitter << YAML::Key << 
"use_latest_transforms" << YAML::Value << 
ui_.use_latest_transforms->isChecked();