MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / updatedSpinAndSlider

Method updatedSpinAndSlider

bt_editor/sidepanel_replay.cpp:323–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void SidepanelReplay::updatedSpinAndSlider(int row)
324{
325 auto it = std::upper_bound( _timepoint.begin(), _timepoint.end(), row,
326 []( int val, const std::pair<double,int>& a ) -> bool
327 {
328 return val < a.second;
329 } );
330
331 QSignalBlocker block_spin( ui->spinBox );
332 QSignalBlocker block_Slider( ui->timeSlider );
333
334 int index = (it - _timepoint.begin()) -1;
335 index = std::min( index, static_cast<int>(_timepoint.size()) -1 );
336 index = std::max( index, 0 );
337
338 ui->spinBox->setValue(index);
339 ui->timeSlider->setValue(index);
340}
341
342
343bool SidepanelReplay::eventFilter(QObject *object, QEvent *event)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected