+ CLIPTYPE t = m_clip->clipType();
+ QMap <QString, QString> old_props = m_clip->properties();
+
+ if (old_props.value("description") != m_view.clip_description->text())
+ props["description"] = m_view.clip_description->text();
+
+ double aspect = m_view.clip_ar->value();
+ if (m_view.clip_force_ar->isChecked()) {
+ if (aspect != old_props.value("force_aspect_ratio").toDouble()) {
+ props["force_aspect_ratio"] = QString::number(aspect);
+ m_clipNeedsRefresh = true;
+ }
+ } else if (old_props.contains("force_aspect_ratio")) {
+ props["force_aspect_ratio"].clear();
+ m_clipNeedsRefresh = true;
+ }
+
+ int threads = m_view.clip_threads->value();
+ if (m_view.clip_force_threads->isChecked()) {
+ if (threads != old_props.value("threads").toInt()) {
+ props["threads"] = QString::number(threads);
+ }
+ } else if (old_props.contains("threads")) {
+ props["threads"].clear();
+ }
+
+ int vindex = m_view.clip_vindex->value();
+ if (m_view.clip_force_vindex->isChecked()) {
+ if (vindex != old_props.value("video_index").toInt()) {
+ props["video_index"] = QString::number(vindex);
+ }
+ } else if (old_props.contains("video_index")) {
+ props["video_index"].clear();
+ }
+
+ int aindex = m_view.clip_aindex->value();
+ if (m_view.clip_force_aindex->isChecked()) {
+ if (aindex != old_props.value("audio_index").toInt()) {
+ props["audio_index"] = QString::number(aindex);
+ }
+ } else if (old_props.contains("audio_index")) {
+ props["audio_index"].clear();
+ }
+
+ if (t == COLOR) {
+ QString new_color = m_view.clip_color->color().name();
+ if (new_color != QString('#' + old_props.value("colour").right(8).left(6))) {
+ m_clipNeedsRefresh = true;
+ props["colour"] = "0x" + new_color.right(6) + "ff";
+ }
+ int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
+ if (duration != m_clip->duration().frames(m_fps)) {
+ props["out"] = QString::number(duration);
+ }
+ } else if (t == IMAGE) {
+ if ((int) m_view.image_transparency->isChecked() != old_props.value("transparency").toInt()) {
+ props["transparency"] = QString::number((int)m_view.image_transparency->isChecked());
+ m_clipNeedsRefresh = true;
+ }
+ int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
+ if (duration != m_clip->duration().frames(m_fps)) {
+ props["out"] = QString::number(duration);
+ }
+ } else if (t == SLIDESHOW) {
+ QString value = QString::number((int) m_view.slide_loop->isChecked());
+ if (old_props.value("loop") != value) props["loop"] = value;
+ value = QString::number((int) m_view.slide_fade->isChecked());
+ if (old_props.value("fade") != value) props["fade"] = value;
+ value = QString::number((int) m_view.luma_softness->value());
+ if (old_props.value("softness") != value) props["softness"] = value;
+
+ QString extension;
+ switch (m_view.image_type->currentIndex()) {
+ case TYPE_PNG:
+ extension = "/.all.png";
+ break;
+ case TYPE_BMP:
+ extension = "/.all.bmp";
+ break;
+ case TYPE_GIF:
+ extension = "/.all.gif";
+ break;
+ default:
+ extension = "/.all.jpg";
+ break;
+ }
+ QString new_path = m_view.clip_path->text() + extension;
+ if (new_path != old_props.value("resource")) {
+ m_clipNeedsRefresh = true;
+ props["resource"] = new_path;
+ kDebug() << "//// SLIDE EDIT, NEW:" << new_path << ", OLD; " << old_props.value("resource");
+ }
+ int duration;
+ if (m_view.slide_duration_format->currentIndex() == 1) {
+ // we are in frames mode
+ duration = m_view.slide_duration_frames->value();
+ } else duration = m_tc.getFrameCount(m_view.slide_duration->text(), m_fps);
+ if (duration != old_props.value("ttl").toInt()) {
+ m_clipNeedsRefresh = true;
+ props["ttl"] = QString::number(duration);
+ props["out"] = QString::number(duration * m_count);
+ }
+ if (duration * m_count != old_props.value("out").toInt()) {
+ m_clipNeedsRefresh = true;
+ props["out"] = QString::number(duration * m_count);
+ }
+ if (m_view.slide_fade->isChecked()) {
+ int luma_duration;
+ if (m_view.slide_duration_format->currentIndex() == 1) {
+ // we are in frames mode
+ luma_duration = m_view.luma_duration_frames->value();
+ } else luma_duration = m_tc.getFrameCount(m_view.luma_duration->text(), m_fps);
+ if (luma_duration != old_props.value("luma_duration").toInt()) {
+ m_clipNeedsRefresh = true;
+ props["luma_duration"] = QString::number(luma_duration);
+ }
+ QString lumaFile;
+ if (m_view.slide_luma->isChecked())
+ lumaFile = m_view.luma_file->itemData(m_view.luma_file->currentIndex()).toString();
+ if (lumaFile != old_props.value("luma_file")) {
+ m_clipNeedsRefresh = true;
+ props["luma_file"] = lumaFile;
+ }
+ } else {
+ if (!old_props.value("luma_file").isEmpty()) {
+ props["luma_file"].clear();
+ }
+ }
+
+ }