m_projectList->setRenderer(m_projectMonitor->render);
connect(m_projectList, SIGNAL(receivedClipDuration(const QString &)), this, SLOT(slotUpdateClip(const QString &)));
connect(m_projectList, SIGNAL(showClipProperties(DocClipBase *)), this, SLOT(slotShowClipProperties(DocClipBase *)));
- connect(m_projectList, SIGNAL(getFileProperties(const QDomElement &, const QString &, bool)), m_projectMonitor->render, SLOT(getFileProperties(const QDomElement &, const QString &, bool)));
+ connect(m_projectList, SIGNAL(getFileProperties(const QDomElement, const QString &, bool)), m_projectMonitor->render, SLOT(getFileProperties(const QDomElement, const QString &, bool)));
connect(m_projectMonitor->render, SIGNAL(replyGetImage(const QString &, const QPixmap &)), m_projectList, SLOT(slotReplyGetImage(const QString &, const QPixmap &)));
connect(m_projectMonitor->render, SIGNAL(replyGetFileProperties(const QString &, Mlt::Producer*, const QMap < QString, QString > &, const QMap < QString, QString > &, bool)), m_projectList, SLOT(slotReplyGetFileProperties(const QString &, Mlt::Producer*, const QMap < QString, QString > &, const QMap < QString, QString > &, bool)));
disconnect(m_projectList, SIGNAL(projectModified()), m_activeDocument, SLOT(setModified()));
disconnect(m_projectMonitor->render, SIGNAL(refreshDocumentProducers()), m_activeDocument, SLOT(checkProjectClips()));
-
disconnect(m_activeDocument, SIGNAL(guidesUpdated()), this, SLOT(slotGuidesUpdated()));
disconnect(m_activeDocument, SIGNAL(addProjectClip(DocClipBase *, bool)), m_projectList, SLOT(slotAddClip(DocClipBase *, bool)));
disconnect(m_activeDocument, SIGNAL(resetProjectList()), m_projectList, SLOT(slotResetProjectList()));
connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), trackView, SLOT(slotSetZone(QPoint)));
connect(m_projectMonitor, SIGNAL(durationChanged(int)), trackView, SLOT(setDuration(int)));
connect(m_projectMonitor->render, SIGNAL(refreshDocumentProducers()), doc, SLOT(checkProjectClips()));
+
connect(doc, SIGNAL(addProjectClip(DocClipBase *, bool)), m_projectList, SLOT(slotAddClip(DocClipBase *, bool)));
connect(doc, SIGNAL(resetProjectList()), m_projectList, SLOT(slotResetProjectList()));
connect(doc, SIGNAL(signalDeleteProjectClip(const QString &)), m_projectList, SLOT(slotDeleteClip(const QString &)));
//doc->setRenderer(m_projectMonitor->render);
m_commandStack->setActiveStack(doc->commandStack());
KdenliveSettings::setProject_display_ratio(doc->dar());
- m_projectList->updateAllClips();
//doc->clipManager()->checkAudioThumbs();
//m_overView->setScene(trackView->projectScene());
m_saveAction->setEnabled(doc->isModified());
m_activeDocument = doc;
m_activeTimeline->updateProjectFps();
+ m_projectList->updateAllClips();
if (KdenliveSettings::dropbframes()) slotUpdatePreviewSettings();
// set tool to select tool
} else {
if (edit) {
ProjectItem *item = getFolderItemById(clipId);
- QTreeWidgetItemIterator it(m_listView);
if (item) {
m_listView->blockSignals(true);
item->setGroupName(foldername);
void ProjectList::slotAddClip(DocClipBase *clip, bool getProperties)
{
- if (getProperties) m_listView->setEnabled(false);
- m_listView->blockSignals(true);
+ if (getProperties) {
+ m_listView->setEnabled(false);
+ m_listView->blockSignals(true);
+ }
const QString parent = clip->getProperty("groupid");
kDebug() << "Adding clip with groupid: " << parent;
ProjectItem *item = NULL;
if (!annotation.isEmpty()) item->setText(2, annotation);
item->setText(3, QString::number(f.rating()));
}
- m_listView->blockSignals(false);
+ if (getProperties) m_listView->blockSignals(false);
}
void ProjectList::slotResetProjectList()
void ProjectList::updateAllClips()
{
+ m_listView->setSortingEnabled(false);
+
QTreeWidgetItemIterator it(m_listView);
+ DocClipBase *clip;
+ ProjectItem *item;
+ m_listView->blockSignals(true);
while (*it) {
- ProjectItem *item = static_cast <ProjectItem *>(*it);
+ item = static_cast <ProjectItem *>(*it);
if (!item->isGroup()) {
- DocClipBase *clip = item->referencedClip();
+ clip = item->referencedClip();
/*if (clip->clipType() == TEXT && !QFile::exists(clip->fileURL().path())) {
// regenerate text clip image if required
TitleWidget *dia_ui = new TitleWidget(KUrl(), QString(), m_render, this);
pix.save(clip->fileURL().path());
delete dia_ui;
}*/
-
if (item->referencedClip()->producer() == NULL) {
- if (clip->isPlaceHolder() == false) requestClipInfo(clip->toXML(), clip->getId());
+ if (clip->isPlaceHolder() == false) {
+ requestClipInfo(clip->toXML(), clip->getId());
+ }
else item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
} else {
if (item->icon(0).isNull()) {
requestClipThumbnail(clip->getId());
}
if (item->data(1, DurationRole).toString().isEmpty()) {
- m_listView->blockSignals(true);
item->changeDuration(item->referencedClip()->producer()->get_playtime());
- m_listView->blockSignals(false);
}
}
- m_listView->blockSignals(true);
- item->setData(1, UsageRole, QString::number(item->numReferences()));
- m_listView->blockSignals(false);
+ item->setData(1, UsageRole, QString::number(item->numReferences()));
qApp->processEvents();
}
++it;
}
+
+ m_listView->blockSignals(false);
+ m_listView->setSortingEnabled(true);
if (m_infoQueue.isEmpty()) slotProcessNextThumbnail();
}
{
m_listView->blockSignals(true);
m_listView->clear();
+ m_listView->setSortingEnabled(false);
emit clipSelected(NULL);
m_thumbnailQueue.clear();
m_infoQueue.clear();
m_commandStack = doc->commandStack();
m_doc = doc;
- connect(m_doc->clipManager(), SIGNAL(reloadClip(const QString &)), this, SLOT(slotReloadClip(const QString &)));
- connect(m_doc->clipManager(), SIGNAL(checkAllClips()), this, SLOT(updateAllClips()));
-
QMap <QString, QString> flist = doc->clipManager()->documentFolderList();
QMapIterator<QString, QString> f(flist);
while (f.hasNext()) {
for (int i = 0; i < list.count(); i++) {
slotAddClip(list.at(i), false);
}
-
+
m_listView->blockSignals(false);
m_toolbar->setEnabled(true);
+ connect(m_doc->clipManager(), SIGNAL(reloadClip(const QString &)), this, SLOT(slotReloadClip(const QString &)));
+ connect(m_doc->clipManager(), SIGNAL(checkAllClips()), this, SLOT(updateAllClips()));
}
QDomElement ProjectList::producersList()
signals:
void clipSelected(DocClipBase *);
- void getFileProperties(const QDomElement&, const QString &, bool);
+ void getFileProperties(const QDomElement, const QString &, bool);
void receivedClipDuration(const QString &);
void showClipProperties(DocClipBase *);
void projectModified();
m_name(rendererName),
m_mltConsumer(NULL),
m_mltProducer(NULL),
+ m_mltProfile(NULL),
m_framePosition(0),
m_isZoneMode(false),
m_isLoopMode(false),
delete m_blackClip;
m_blackClip = NULL;
+ if (m_mltProfile) delete m_mltProfile;
m_mltProfile = new Mlt::Profile(tmp);
delete[] tmp;
}
m_mltProducer = NULL;
- if (m_mltProfile) delete m_mltProfile;
- m_mltProfile = NULL;
-
buildConsumer();
//kDebug() << "//RESET WITHSCENE: " << scene;
}
}
-void Render::getFileProperties(const QDomElement &xml, const QString &clipId, bool replaceProducer)
+void Render::getFileProperties(const QDomElement xml, const QString &clipId, bool replaceProducer)
{
KUrl url = KUrl(xml.attribute("resource", QString()));
Mlt::Producer *producer = NULL;
+ //kDebug() << "PROFILE WIDT: "<< xml.attribute("mlt_service") << ": "<< m_mltProfile->width() << "\n...................\n\n";
/*if (xml.attribute("type").toInt() == TEXT && !QFile::exists(url.path())) {
emit replyGetFileProperties(clipId, producer, QMap < QString, QString >(), QMap < QString, QString >(), replaceProducer);
return;
/** Wraps the VEML command of the same name. Requests the file properties
for the specified url from the renderer. Upon return, the result will be emitted
via replyGetFileProperties(). */
- void getFileProperties(const QDomElement &xml, const QString &clipId, bool replaceProducer = true);
+ void getFileProperties(const QDomElement xml, const QString &clipId, bool replaceProducer = true);
void exportFileToFirewire(QString srcFileName, int port, GenTime startTime, GenTime endTime);
static char *decodedString(QString str);