+void ProjectList::slotModifiedClip(const QString &id)
+{
+ ProjectItem *item = getItemById(id);
+ if (item) {
+ QPixmap pixmap = qVariantValue<QPixmap>(item->data(0, Qt::DecorationRole));
+ if (!pixmap.isNull()) {
+ QPainter p(&pixmap);
+ p.fillRect(0, 0, pixmap.width(), pixmap.height(), QColor(255, 255, 255, 200));
+ p.drawPixmap(0, 0, KIcon("view-refresh").pixmap(m_listView->iconSize()));
+ p.end();
+ } else {
+ pixmap = KIcon("view-refresh").pixmap(m_listView->iconSize());
+ }
+ item->setData(0, Qt::DecorationRole, pixmap);
+ }
+}
+
+void ProjectList::slotMissingClip(const QString &id)
+{
+ ProjectItem *item = getItemById(id);
+ if (item) {
+ item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
+ if (item->referencedClip()) {
+ item->referencedClip()->setPlaceHolder(true);
+ if (m_render == NULL) kDebug() << "********* ERROR, NULL RENDR";
+ item->referencedClip()->setProducer(m_render->invalidProducer(id), true);
+ item->slotSetToolTip();
+ emit clipNeedsReload(id, true);
+ }
+ }
+ update();
+ emit displayMessage(i18n("Check missing clips"), -2);
+ emit updateRenderStatus();
+}
+
+void ProjectList::slotAvailableClip(const QString &id)
+{
+ ProjectItem *item = getItemById(id);
+ if (item == NULL)
+ return;
+ item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled);
+ if (item->referencedClip()) { // && item->referencedClip()->checkHash() == false) {
+ item->setProperty("file_hash", QString());
+ slotReloadClip(id);
+ }
+ /*else {
+ item->referencedClip()->setValid();
+ item->slotSetToolTip();
+ }
+ update();*/
+ emit updateRenderStatus();
+}
+
+bool ProjectList::hasMissingClips()
+{
+ bool missing = false;
+ QTreeWidgetItemIterator it(m_listView);
+ while (*it) {
+ if ((*it)->type() == PROJECTCLIPTYPE && !((*it)->flags() & Qt::ItemIsDragEnabled)) {
+ missing = true;
+ break;
+ }
+ it++;
+ }
+ return missing;
+}
+