case Column::DURATION:
return "Duration";
default:
- if (section >= int(Column::CAMERA_1) && section < int(Column::CAMERA_1) + num_cameras) {
+ if (is_camera_column(section)) {
return QString::fromStdString("Camera " + to_string(section - int(Column::CAMERA_1) + 1));
} else {
return "";
case Column::CAMERA: {
bool ok;
int camera_idx = value.toInt(&ok);
- if (!ok || camera_idx < 1 || camera_idx > num_cameras) {
+ if (!ok || camera_idx < 1 || camera_idx > int(num_cameras)) {
return false;
}
clips[row].stream_idx = camera_idx - 1;
emit any_content_changed();
}
-void PlayList::set_currently_playing(int index, double progress)
-{
- int old_index = currently_playing_index;
- int column = int(Column::PLAYING);
- if (index != old_index) {
- currently_playing_index = index;
- play_progress = progress;
- if (old_index != -1) {
- emit dataChanged(this->index(old_index, column), this->index(old_index, column));
- }
- if (index != -1) {
- emit dataChanged(this->index(index, column), this->index(index, column));
- }
- } else if (index != -1 && fabs(progress - play_progress) > 1e-3) {
- play_progress = progress;
- emit dataChanged(this->index(index, column), this->index(index, column));
- }
-}
-
void PlayList::set_progress(const map<size_t, double> &progress)
{
const int column = int(Column::PLAYING);