MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / animateSelectedIndex

Method animateSelectedIndex

pj_widgets/src/DualOptionsWidget.cpp:206–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void DualOptionsWidget::animateSelectedIndex(int index) {
207 const qreal target = static_cast<qreal>(index);
208 if (selection_animation_ == nullptr || !isVisible()) {
209 visual_selection_ = target;
210 update();
211 return;
212 }
213
214 selection_animation_->stop();
215 selection_animation_->setStartValue(visual_selection_);
216 selection_animation_->setEndValue(target);
217 selection_animation_->start();
218}
219
220} // namespace PJ

Callers

nothing calls this directly

Calls 2

stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected