| 321 | } |
| 322 | |
| 323 | void 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 | |
| 343 | bool SidepanelReplay::eventFilter(QObject *object, QEvent *event) |
nothing calls this directly
no outgoing calls
no test coverage detected