- setText(1, name);
- setText(2, m_clip->description());
- //kDebug() << "PROJECT ITE;. ADDING LCIP: " << m_clipId;
+ switch(m_clipType) {
+ case AUDIO:
+ setData(0, Qt::DecorationRole, KIcon("audio-x-generic").pixmap(pixmapSize));
+ m_pixmapSet = true;
+ break;
+ case IMAGE:
+ case SLIDESHOW:
+ setData(0, Qt::DecorationRole, KIcon("image-x-generic").pixmap(pixmapSize));
+ break;
+ default:
+ setData(0, Qt::DecorationRole, KIcon("video-x-generic").pixmap(pixmapSize));
+ }
+ if (m_clipType != UNKNOWN) slotSetToolTip();
+
+ setText(0, name);
+ setText(1, m_clip->description());
+ GenTime duration = m_clip->duration();
+ QString durationText;
+ if (duration != GenTime()) {
+ durationText = Timecode::getEasyTimecode(duration, KdenliveSettings::project_fps());
+ }
+ if (m_clipType == PLAYLIST) {
+ // Check if the playlist xml contains a proxy inside, and inform user
+ if (playlistHasProxies(m_clip->fileURL().path())) {
+ durationText.prepend(i18n("Contains proxies") + " / ");
+ }
+ }
+ if (!durationText.isEmpty()) setData(0, DurationRole, durationText);