]> git.sesse.net Git - kdenlive/blob - src/clipproperties.cpp
Clean up timecode handling, improves:
[kdenlive] / src / clipproperties.cpp
1 /***************************************************************************
2  *   Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20
21 #include "clipproperties.h"
22 #include "kdenlivesettings.h"
23 #include "kthumb.h"
24 #include "markerdialog.h"
25
26 #include <KStandardDirs>
27 #include <KDebug>
28 #include <KFileItem>
29
30 #include <QDir>
31
32 static const int VIDEOTAB = 0;
33 static const int AUDIOTAB = 1;
34 static const int COLORTAB = 2;
35 static const int SLIDETAB = 3;
36 static const int IMAGETAB = 4;
37 static const int MARKERTAB = 5;
38 static const int METATAB = 6;
39 static const int ADVANCEDTAB = 7;
40
41 static const int TYPE_JPEG = 0;
42 static const int TYPE_PNG = 1;
43 static const int TYPE_BMP = 2;
44 static const int TYPE_GIF = 3;
45
46 ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidget * parent) :
47         QDialog(parent),
48         m_clip(clip),
49         m_tc(tc),
50         m_fps(fps),
51         m_count(0),
52         m_clipNeedsRefresh(false)
53 {
54     setFont(KGlobalSettings::toolBarFont());
55     m_view.setupUi(this);
56     KUrl url = m_clip->fileURL();
57     m_view.clip_path->setText(url.path());
58     m_view.clip_description->setText(m_clip->description());
59     QMap <QString, QString> props = m_clip->properties();
60
61     if (props.contains("force_aspect_ratio") && props.value("force_aspect_ratio").toDouble() > 0) {
62         m_view.clip_force_ar->setChecked(true);
63         m_view.clip_ar->setEnabled(true);
64         m_view.clip_ar->setValue(props.value("force_aspect_ratio").toDouble());
65     }
66
67     if (props.contains("threads") && props.value("threads").toInt() != 1) {
68         m_view.clip_force_threads->setChecked(true);
69         m_view.clip_threads->setEnabled(true);
70         m_view.clip_threads->setValue(props.value("threads").toInt());
71     }
72
73     if (props.contains("video_index") && props.value("video_index").toInt() != 0) {
74         m_view.clip_force_vindex->setChecked(true);
75         m_view.clip_vindex->setEnabled(true);
76         m_view.clip_vindex->setValue(props.value("video_index").toInt());
77     }
78
79     if (props.contains("audio_index") && props.value("audio_index").toInt() != 0) {
80         m_view.clip_force_aindex->setChecked(true);
81         m_view.clip_aindex->setEnabled(true);
82         m_view.clip_aindex->setValue(props.value("audio_index").toInt());
83     }
84
85     if (props.contains("audio_max")) {
86         m_view.clip_aindex->setMaximum(props.value("audio_max").toInt());
87     }
88
89     if (props.contains("video_max")) {
90         m_view.clip_vindex->setMaximum(props.value("video_max").toInt());
91     }
92
93     // Check for Metadata
94     QMap<QString, QString> meta = m_clip->metadata();
95     QMap<QString, QString>::const_iterator i = meta.constBegin();
96     while (i != meta.constEnd()) {
97         QTreeWidgetItem *metaitem = new QTreeWidgetItem(m_view.metadata_list);
98         metaitem->setText(0, i.key()); //i18n(i.key().section('.', 2, 3).toUtf8().data()));
99         metaitem->setText(1, i.value());
100         ++i;
101     }
102
103     connect(m_view.clip_force_ar, SIGNAL(toggled(bool)), m_view.clip_ar, SLOT(setEnabled(bool)));
104     connect(m_view.clip_force_threads, SIGNAL(toggled(bool)), m_view.clip_threads, SLOT(setEnabled(bool)));
105     connect(m_view.clip_force_vindex, SIGNAL(toggled(bool)), m_view.clip_vindex, SLOT(setEnabled(bool)));
106     connect(m_view.clip_force_aindex, SIGNAL(toggled(bool)), m_view.clip_aindex, SLOT(setEnabled(bool)));
107
108     if (props.contains("audiocodec"))
109         m_view.clip_acodec->setText(props.value("audiocodec"));
110     if (props.contains("frequency"))
111         m_view.clip_frequency->setText(props.value("frequency"));
112     if (props.contains("channels"))
113         m_view.clip_channels->setText(props.value("channels"));
114
115     CLIPTYPE t = m_clip->clipType();
116     if (t != AUDIO && t != AV) {
117         m_view.clip_force_aindex->setEnabled(false);
118     }
119
120     if (t != VIDEO && t != AV) {
121         m_view.clip_force_vindex->setEnabled(false);
122     }
123
124     if (t == IMAGE) {
125         m_view.tabWidget->removeTab(SLIDETAB);
126         m_view.tabWidget->removeTab(COLORTAB);
127         m_view.tabWidget->removeTab(AUDIOTAB);
128         m_view.tabWidget->removeTab(VIDEOTAB);
129         if (props.contains("frame_size"))
130             m_view.image_size->setText(props.value("frame_size"));
131         if (props.contains("transparency"))
132             m_view.image_transparency->setChecked(props.value("transparency").toInt());
133         int width = 180.0 * KdenliveSettings::project_display_ratio();
134         if (width % 2 == 1) width++;
135         m_view.clip_thumb->setPixmap(QPixmap(url.path()).scaled(QSize(width, 180), Qt::KeepAspectRatio));
136     } else if (t == COLOR) {
137         m_view.clip_path->setEnabled(false);
138         m_view.tabWidget->removeTab(METATAB);
139         m_view.tabWidget->removeTab(IMAGETAB);
140         m_view.tabWidget->removeTab(SLIDETAB);
141         m_view.tabWidget->removeTab(AUDIOTAB);
142         m_view.tabWidget->removeTab(VIDEOTAB);
143         m_view.clip_thumb->setHidden(true);
144         m_view.clip_color->setColor(QColor('#' + props.value("colour").right(8).left(6)));
145     } else if (t == SLIDESHOW) {
146         m_view.clip_path->setText(url.directory());
147         m_view.tabWidget->removeTab(METATAB);
148         m_view.tabWidget->removeTab(IMAGETAB);
149         m_view.tabWidget->removeTab(COLORTAB);
150         m_view.tabWidget->removeTab(AUDIOTAB);
151         m_view.tabWidget->removeTab(VIDEOTAB);
152         QStringList types;
153         types << "JPG" << "PNG" << "BMP" << "GIF";
154         m_view.image_type->addItems(types);
155         m_view.slide_loop->setChecked(props.value("loop").toInt());
156         m_view.slide_fade->setChecked(props.value("fade").toInt());
157         m_view.luma_softness->setValue(props.value("softness").toInt());
158         QString path = props.value("resource");
159         if (path.endsWith("png")) m_view.image_type->setCurrentIndex(TYPE_PNG);
160         else if (path.endsWith("bmp")) m_view.image_type->setCurrentIndex(TYPE_BMP);
161         else if (path.endsWith("gif")) m_view.image_type->setCurrentIndex(TYPE_GIF);
162         m_view.slide_duration->setText(tc.getTimecodeFromFrames(props.value("ttl").toInt()));
163
164         m_view.slide_duration_format->addItem(i18n("hh:mm:ss::ff"));
165         m_view.slide_duration_format->addItem(i18n("Frames"));
166         connect(m_view.slide_duration_format, SIGNAL(activated(int)), this, SLOT(slotUpdateDurationFormat(int)));
167         m_view.slide_duration_frames->setHidden(true);
168         m_view.luma_duration_frames->setHidden(true);
169
170         parseFolder();
171
172         m_view.luma_duration->setText(tc.getTimecodeFromFrames(props.value("luma_duration").toInt()));
173         QString lumaFile = props.value("luma_file");
174
175         // Check for Kdenlive installed luma files
176         QStringList filters;
177         filters << "*.pgm" << "*.png";
178
179         QStringList customLumas = KGlobal::dirs()->findDirs("appdata", "lumas");
180         foreach(const QString &folder, customLumas) {
181             QStringList filesnames = QDir(folder).entryList(filters, QDir::Files);
182             foreach(const QString &fname, filesnames) {
183                 QString filePath = KUrl(folder).path(KUrl::AddTrailingSlash) + fname;
184                 m_view.luma_file->addItem(KIcon(filePath), fname, filePath);
185             }
186         }
187
188         // Check for MLT lumas
189         QString profilePath = KdenliveSettings::mltpath();
190         QString folder = profilePath.section('/', 0, -3);
191         folder.append("/lumas/PAL"); // TODO: cleanup the PAL / NTSC mess in luma files
192         QDir lumafolder(folder);
193         QStringList filesnames = lumafolder.entryList(filters, QDir::Files);
194         foreach(const QString &fname, filesnames) {
195             QString filePath = KUrl(folder).path(KUrl::AddTrailingSlash) + fname;
196             m_view.luma_file->addItem(KIcon(filePath), fname, filePath);
197         }
198
199         slotEnableLuma(m_view.slide_fade->checkState());
200         slotEnableLumaFile(m_view.slide_luma->checkState());
201
202         if (!lumaFile.isEmpty()) {
203             m_view.slide_luma->setChecked(true);
204             m_view.luma_file->setCurrentIndex(m_view.luma_file->findData(lumaFile));
205         } else m_view.luma_file->setEnabled(false);
206         connect(m_view.slide_fade, SIGNAL(stateChanged(int)), this, SLOT(slotEnableLuma(int)));
207         connect(m_view.slide_luma, SIGNAL(stateChanged(int)), this, SLOT(slotEnableLumaFile(int)));
208
209         connect(m_view.image_type, SIGNAL(currentIndexChanged(int)), this, SLOT(parseFolder()));
210     } else if (t != AUDIO) {
211         m_view.tabWidget->removeTab(IMAGETAB);
212         m_view.tabWidget->removeTab(SLIDETAB);
213         m_view.tabWidget->removeTab(COLORTAB);
214         if (props.contains("frame_size"))
215             m_view.clip_size->setText(props.value("frame_size"));
216         if (props.contains("videocodec"))
217             m_view.clip_vcodec->setText(props.value("videocodec"));
218         if (props.contains("fps"))
219             m_view.clip_fps->setText(props.value("fps"));
220         if (props.contains("aspect_ratio"))
221             m_view.clip_ratio->setText(props.value("aspect_ratio"));
222         int width = 180.0 * KdenliveSettings::project_display_ratio();
223         if (width % 2 == 1) width++;
224         QPixmap pix = m_clip->thumbProducer()->getImage(url, m_clip->getClipThumbFrame(), width, 180);
225         m_view.clip_thumb->setPixmap(pix);
226         if (t == IMAGE || t == VIDEO) m_view.tabWidget->removeTab(AUDIOTAB);
227     } else {
228         m_view.tabWidget->removeTab(IMAGETAB);
229         m_view.tabWidget->removeTab(SLIDETAB);
230         m_view.tabWidget->removeTab(COLORTAB);
231         m_view.tabWidget->removeTab(VIDEOTAB);
232         m_view.clip_thumb->setHidden(true);
233     }
234
235     KFileItem f(KFileItem::Unknown, KFileItem::Unknown, url, true);
236     m_view.clip_filesize->setText(KIO::convertSize(f.size()));
237     m_view.clip_duration->setText(tc.getTimecode(m_clip->duration()));
238     if (t != IMAGE && t != COLOR && t != TEXT) m_view.clip_duration->setReadOnly(true);
239     else connect(m_view.clip_duration, SIGNAL(editingFinished()), this, SLOT(slotCheckMaxLength()));
240
241     // markers
242     m_view.marker_new->setIcon(KIcon("document-new"));
243     m_view.marker_new->setToolTip(i18n("Add marker"));
244     m_view.marker_edit->setIcon(KIcon("document-properties"));
245     m_view.marker_edit->setToolTip(i18n("Edit marker"));
246     m_view.marker_delete->setIcon(KIcon("trash-empty"));
247     m_view.marker_delete->setToolTip(i18n("Delete marker"));
248
249     slotFillMarkersList();
250     connect(m_view.marker_new, SIGNAL(clicked()), this, SLOT(slotAddMarker()));
251     connect(m_view.marker_edit, SIGNAL(clicked()), this, SLOT(slotEditMarker()));
252     connect(m_view.marker_delete, SIGNAL(clicked()), this, SLOT(slotDeleteMarker()));
253     connect(m_view.markers_list, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(slotEditMarker()));
254
255     //adjustSize();
256 }
257
258 void ClipProperties::slotEnableLuma(int state)
259 {
260     bool enable = false;
261     if (state == Qt::Checked) enable = true;
262     m_view.luma_duration->setEnabled(enable);
263     m_view.luma_duration_frames->setEnabled(enable);
264     m_view.slide_luma->setEnabled(enable);
265     if (enable) {
266         m_view.luma_file->setEnabled(m_view.slide_luma->isChecked());
267     } else m_view.luma_file->setEnabled(false);
268     m_view.label_softness->setEnabled(m_view.slide_luma->isChecked() && enable);
269     m_view.luma_softness->setEnabled(m_view.label_softness->isEnabled());
270 }
271
272 void ClipProperties::slotEnableLumaFile(int state)
273 {
274     bool enable = false;
275     if (state == Qt::Checked) enable = true;
276     m_view.luma_file->setEnabled(enable);
277     m_view.luma_softness->setEnabled(enable);
278     m_view.label_softness->setEnabled(enable);
279 }
280
281 void ClipProperties::slotFillMarkersList()
282 {
283     m_view.markers_list->clear();
284     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
285     for (int count = 0; count < marks.count(); ++count) {
286         QString time = m_tc.getTimecode(marks[count].time());
287         QStringList itemtext;
288         itemtext << time << marks[count].comment();
289         (void) new QTreeWidgetItem(m_view.markers_list, itemtext);
290     }
291 }
292
293 void ClipProperties::slotAddMarker()
294 {
295     CommentedTime marker(GenTime(), i18n("Marker"));
296     MarkerDialog d(m_clip, marker, m_tc, i18n("Add Marker"), this);
297     if (d.exec() == QDialog::Accepted) {
298         emit addMarker(m_clip->getId(), d.newMarker().time(), d.newMarker().comment());
299     }
300     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
301 }
302
303 void ClipProperties::slotEditMarker()
304 {
305     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
306     int pos = m_view.markers_list->currentIndex().row();
307     if (pos < 0 || pos > marks.count() - 1) return;
308     MarkerDialog d(m_clip, marks.at(pos), m_tc, i18n("Edit Marker"), this);
309     if (d.exec() == QDialog::Accepted) {
310         emit addMarker(m_clip->getId(), d.newMarker().time(), d.newMarker().comment());
311     }
312     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
313 }
314
315 void ClipProperties::slotDeleteMarker()
316 {
317     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
318     int pos = m_view.markers_list->currentIndex().row();
319     if (pos < 0 || pos > marks.count() - 1) return;
320     emit addMarker(m_clip->getId(), marks.at(pos).time(), QString());
321
322     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
323 }
324
325 const QString &ClipProperties::clipId() const
326 {
327     return m_clip->getId();
328 }
329
330
331 QMap <QString, QString> ClipProperties::properties()
332 {
333     QMap <QString, QString> props;
334     CLIPTYPE t = m_clip->clipType();
335     QMap <QString, QString> old_props = m_clip->properties();
336
337     if (old_props.value("description") != m_view.clip_description->text())
338         props["description"] = m_view.clip_description->text();
339
340     double aspect = m_view.clip_ar->value();
341     if (m_view.clip_force_ar->isChecked()) {
342         if (aspect != old_props.value("force_aspect_ratio").toDouble()) {
343             props["force_aspect_ratio"] = QString::number(aspect);
344             m_clipNeedsRefresh = true;
345         }
346     } else if (old_props.contains("force_aspect_ratio")) {
347         props["force_aspect_ratio"].clear();
348         m_clipNeedsRefresh = true;
349     }
350
351     int threads = m_view.clip_threads->value();
352     if (m_view.clip_force_threads->isChecked()) {
353         if (threads != old_props.value("threads").toInt()) {
354             props["threads"] = QString::number(threads);
355         }
356     } else if (old_props.contains("threads")) {
357         props["threads"].clear();
358     }
359
360     int vindex = m_view.clip_vindex->value();
361     if (m_view.clip_force_vindex->isChecked()) {
362         if (vindex != old_props.value("video_index").toInt()) {
363             props["video_index"] = QString::number(vindex);
364         }
365     } else if (old_props.contains("video_index")) {
366         props["video_index"].clear();
367     }
368
369     int aindex = m_view.clip_aindex->value();
370     if (m_view.clip_force_aindex->isChecked()) {
371         if (aindex != old_props.value("audio_index").toInt()) {
372             props["audio_index"] = QString::number(aindex);
373         }
374     } else if (old_props.contains("audio_index")) {
375         props["audio_index"].clear();
376     }
377
378     if (t == COLOR) {
379         QString new_color = m_view.clip_color->color().name();
380         if (new_color != QString('#' + old_props.value("colour").right(8).left(6))) {
381             m_clipNeedsRefresh = true;
382             props["colour"] = "0x" + new_color.right(6) + "ff";
383         }
384         int duration = m_tc.getFrameCount(m_view.clip_duration->text());
385         if (duration != m_clip->duration().frames(m_fps)) {
386             props["out"] = QString::number(duration);
387         }
388     } else if (t == IMAGE) {
389         if ((int) m_view.image_transparency->isChecked() != old_props.value("transparency").toInt()) {
390             props["transparency"] = QString::number((int)m_view.image_transparency->isChecked());
391             m_clipNeedsRefresh = true;
392         }
393         int duration = m_tc.getFrameCount(m_view.clip_duration->text());
394         if (duration != m_clip->duration().frames(m_fps)) {
395             props["out"] = QString::number(duration);
396         }
397     } else if (t == SLIDESHOW) {
398         QString value = QString::number((int) m_view.slide_loop->isChecked());
399         if (old_props.value("loop") != value) props["loop"] = value;
400         value = QString::number((int) m_view.slide_fade->isChecked());
401         if (old_props.value("fade") != value) props["fade"] = value;
402         value = QString::number((int) m_view.luma_softness->value());
403         if (old_props.value("softness") != value) props["softness"] = value;
404
405         QString extension;
406         switch (m_view.image_type->currentIndex()) {
407         case TYPE_PNG:
408             extension = "/.all.png";
409             break;
410         case TYPE_BMP:
411             extension = "/.all.bmp";
412             break;
413         case TYPE_GIF:
414             extension = "/.all.gif";
415             break;
416         default:
417             extension = "/.all.jpg";
418             break;
419         }
420         QString new_path = m_view.clip_path->text() + extension;
421         if (new_path != old_props.value("resource")) {
422             m_clipNeedsRefresh = true;
423             props["resource"] = new_path;
424             kDebug() << "////  SLIDE EDIT, NEW:" << new_path << ", OLD; " << old_props.value("resource");
425         }
426         int duration;
427         if (m_view.slide_duration_format->currentIndex() == 1) {
428             // we are in frames mode
429             duration = m_view.slide_duration_frames->value();
430         } else duration = m_tc.getFrameCount(m_view.slide_duration->text());
431         if (duration != old_props.value("ttl").toInt()) {
432             m_clipNeedsRefresh = true;
433             props["ttl"] = QString::number(duration);
434             props["out"] = QString::number(duration * m_count);
435         }
436         if (duration * m_count != old_props.value("out").toInt()) {
437             m_clipNeedsRefresh = true;
438             props["out"] = QString::number(duration * m_count);
439         }
440         if (m_view.slide_fade->isChecked()) {
441             int luma_duration;
442             if (m_view.slide_duration_format->currentIndex() == 1) {
443                 // we are in frames mode
444                 luma_duration = m_view.luma_duration_frames->value();
445             } else luma_duration = m_tc.getFrameCount(m_view.luma_duration->text());
446             if (luma_duration != old_props.value("luma_duration").toInt()) {
447                 m_clipNeedsRefresh = true;
448                 props["luma_duration"] = QString::number(luma_duration);
449             }
450             QString lumaFile;
451             if (m_view.slide_luma->isChecked())
452                 lumaFile = m_view.luma_file->itemData(m_view.luma_file->currentIndex()).toString();
453             if (lumaFile != old_props.value("luma_file")) {
454                 m_clipNeedsRefresh = true;
455                 props["luma_file"] = lumaFile;
456             }
457         } else {
458             if (!old_props.value("luma_file").isEmpty()) {
459                 props["luma_file"].clear();
460             }
461         }
462
463     }
464     return props;
465 }
466
467 bool ClipProperties::needsTimelineRefresh() const
468 {
469     return m_clipNeedsRefresh;
470 }
471
472 void ClipProperties::parseFolder()
473 {
474
475     QDir dir(m_view.clip_path->text());
476     QStringList filters;
477     QString extension;
478     switch (m_view.image_type->currentIndex()) {
479     case TYPE_PNG:
480         filters << "*.png";
481         extension = "/.all.png";
482         break;
483     case TYPE_BMP:
484         filters << "*.bmp";
485         extension = "/.all.bmp";
486         break;
487     case TYPE_GIF:
488         filters << "*.gif";
489         extension = "/.all.gif";
490         break;
491     default:
492         filters << "*.jpg";
493         // TODO: improve jpeg image detection with extension like jpeg, requires change in MLT image producers
494         // << "*.jpeg";
495         extension = "/.all.jpg";
496         break;
497     }
498
499     dir.setNameFilters(filters);
500     QStringList result = dir.entryList(QDir::Files);
501     m_count = result.count();
502     m_view.slide_info->setText(i18n("%1 images found", m_count));
503     QDomElement xml = m_clip->toXML();
504     xml.setAttribute("resource", m_view.clip_path->text() + extension);
505     int width = 180.0 * KdenliveSettings::project_display_ratio();
506     if (width % 2 == 1) width++;
507     QPixmap pix = m_clip->thumbProducer()->getImage(KUrl(m_view.clip_path->text() + extension), 1, width, 180);
508     QMap <QString, QString> props = m_clip->properties();
509     m_view.clip_duration->setText(m_tc.getTimecodeFromFrames(props.value("ttl").toInt() * m_count));
510     m_view.clip_thumb->setPixmap(pix);
511 }
512
513 void ClipProperties::slotCheckMaxLength()
514 {
515     if (m_clip->maxDuration() == GenTime()) return;
516     int duration = m_tc.getFrameCount(m_view.clip_duration->text());
517     if (duration > m_clip->maxDuration().frames(m_fps)) {
518         m_view.clip_duration->setText(m_tc.getTimecode(m_clip->maxDuration()));
519     }
520 }
521
522 void ClipProperties::slotUpdateDurationFormat(int ix)
523 {
524     bool framesFormat = ix == 1;
525     if (framesFormat) {
526         // switching to frames count, update widget
527         m_view.slide_duration_frames->setValue(m_tc.getFrameCount(m_view.slide_duration->text()));
528         m_view.luma_duration_frames->setValue(m_tc.getFrameCount(m_view.luma_duration->text()));
529         m_view.slide_duration->setHidden(true);
530         m_view.luma_duration->setHidden(true);
531         m_view.slide_duration_frames->setHidden(false);
532         m_view.luma_duration_frames->setHidden(false);
533     } else {
534         // switching to timecode format
535         m_view.slide_duration->setText(m_tc.getTimecodeFromFrames(m_view.slide_duration_frames->value()));
536         m_view.luma_duration->setText(m_tc.getTimecodeFromFrames(m_view.luma_duration_frames->value()));
537         m_view.slide_duration_frames->setHidden(true);
538         m_view.luma_duration_frames->setHidden(true);
539         m_view.slide_duration->setHidden(false);
540         m_view.luma_duration->setHidden(false);
541     }
542 }
543
544 #include "clipproperties.moc"
545
546