56 ui_.color->setColor(Qt::green);
60 p.setColor(QPalette::Background, Qt::white);
64 QPalette p3(
ui_.status->palette());
65 p3.setColor(QPalette::Text, Qt::red);
66 ui_.status->setPalette(p3);
68 QObject::connect(
ui_.selectframe, SIGNAL(clicked()),
this,
70 QObject::connect(
ui_.frame, SIGNAL(editingFinished()),
this,
72 QObject::connect(
ui_.positiontolerance, SIGNAL(valueChanged(
double)),
this,
74 QObject::connect(
ui_.buffersize, SIGNAL(valueChanged(
int)),
this,
76 QObject::connect(
ui_.drawstyle, SIGNAL(activated(QString)),
this,
78 QObject::connect(
ui_.static_arrow_sizes, SIGNAL(clicked(
bool)),
80 QObject::connect(
ui_.use_latest_transforms, SIGNAL(clicked(
bool)),
82 QObject::connect(
ui_.arrow_size, SIGNAL(valueChanged(
int)),
84 QObject::connect(
ui_.color, SIGNAL(colorEdited(
const QColor&)),
this,
86 QObject::connect(
ui_.buttonResetBuffer, SIGNAL(pressed()),
this,
88 QObject::connect(
this,
103 ui_.frame->setText(QString::fromStdString(frame));
178 const std::string& path)
189 node[
"color"] >> color;
190 QColor qcolor(color.c_str());
192 ui_.color->setColor(qcolor);
195 if (node[
"draw_style"])
197 std::string draw_style;
198 node[
"draw_style"] >> draw_style;
200 if (draw_style ==
"lines")
202 ui_.drawstyle->setCurrentIndex(0);
205 else if (draw_style ==
"points")
207 ui_.drawstyle->setCurrentIndex(1);
210 else if (draw_style ==
"arrows")
212 ui_.drawstyle->setCurrentIndex(2);
217 if (node[
"position_tolerance"])
219 double position_tolerance;
220 node[
"position_tolerance"] >> position_tolerance;
221 ui_.positiontolerance->setValue(position_tolerance);
225 if (node[
"buffer_size"])
228 node[
"buffer_size"] >> buffer_size;
229 ui_.buffersize->setValue(buffer_size);
233 if (node[
"static_arrow_sizes"])
235 bool static_arrow_sizes = node[
"static_arrow_sizes"].as<
bool>();
236 ui_.static_arrow_sizes->setChecked(static_arrow_sizes);
240 if (node[
"arrow_size"])
242 int arrow_size = node[
"arrow_size"].as<
int>();
243 ui_.arrow_size->setValue(arrow_size);
247 if (node[
"use_latest_transforms"])
249 bool use_latest_transforms = node[
"use_latest_transforms"].as<
bool>();
250 ui_.use_latest_transforms->setChecked(use_latest_transforms);
258 const std::string& path)
260 emitter << YAML::Key <<
"frame" << YAML::Value
261 <<
ui_.frame->text().toStdString();
262 emitter << YAML::Key <<
"color" << YAML::Value
263 <<
ui_.color->color().name().toStdString();
265 std::string draw_style =
ui_.drawstyle->currentText().toStdString();
266 emitter << YAML::Key <<
"draw_style" << YAML::Value << draw_style;
268 emitter << YAML::Key <<
"position_tolerance" <<
271 emitter << YAML::Key <<
"buffer_size" << YAML::Value <<
bufferSize();
273 emitter << YAML::Key <<
"static_arrow_sizes" << YAML::Value <<
ui_.static_arrow_sizes->isChecked();
275 emitter << YAML::Key <<
"arrow_size" << YAML::Value <<
ui_.arrow_size->value();
277 emitter << YAML::Key <<
"use_latest_transforms" << YAML::Value <<
ui_.use_latest_transforms->isChecked();