38 #include <QHBoxLayout>
48 slider_ =
new QSlider(Qt::Horizontal);
52 slider_->setTickPosition(QSlider::TicksBelow);
66 QHBoxLayout* layout =
new QHBoxLayout;
67 layout->addWidget(
new QLabel(
"Waypoint:"));
75 parentWidget()->setVisible(
false);
79 parentWidget()->show();
84 parentWidget()->hide();
88 int max_way_point = std::max(1, way_point_count - 1);
89 empty_ = (way_point_count == 0);
91 slider_->setEnabled(way_point_count >= 0);
92 button_->setEnabled(way_point_count >= 0);
95 slider_->setMaximum(max_way_point);
96 maximum_label_->setText(way_point_count >= 0 ? QString::number(way_point_count) :
"");
113 slider_->setSliderPosition(position);
123 text = QString::number(value + 1);