QString projectfolder = m_activeDocument ? m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash) : KdenliveSettings::defaultprojectfolder();
m_renderWidget = new RenderWidget(projectfolder, this);
connect(m_renderWidget, SIGNAL(shutdown()), this, SLOT(slotShutdown()));
- connect(m_renderWidget, SIGNAL(selectedRenderProfile(const QString &, const QString &, const QString&)), this, SLOT(slotSetDocumentRenderProfile(const QString &, const QString &, const QString&)));
+ connect(m_renderWidget, SIGNAL(selectedRenderProfile(const QString &, const QString &, const QString &, const QString&)), this, SLOT(slotSetDocumentRenderProfile(const QString &, const QString &, const QString &, const QString&)));
connect(m_renderWidget, SIGNAL(prepareRenderingData(bool, bool, const QString&)), this, SLOT(slotPrepareRendering(bool, bool, const QString&)));
connect(m_renderWidget, SIGNAL(abortProcess(const QString &)), this, SIGNAL(abortRenderJob(const QString &)));
connect(m_renderWidget, SIGNAL(openDvdWizard(const QString &, const QString &)), this, SLOT(slotDvdWizard(const QString &, const QString &)));
m_renderWidget->setProfile(m_activeDocument->mltProfile());
m_renderWidget->setGuides(m_activeDocument->guidesXml(), m_activeDocument->projectDuration());
m_renderWidget->setDocumentPath(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
- m_renderWidget->setRenderProfile(m_activeDocument->getDocumentProperty("renderdestination"), m_activeDocument->getDocumentProperty("renderprofile"), m_activeDocument->getDocumentProperty("renderurl"));
+ m_renderWidget->setRenderProfile(m_activeDocument->getDocumentProperty("renderdestination"), m_activeDocument->getDocumentProperty("rendercategory"), m_activeDocument->getDocumentProperty("renderprofile"), m_activeDocument->getDocumentProperty("renderurl"));
}
}
/*TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
m_renderWidget->setProfile(doc->mltProfile());
m_renderWidget->setGuides(doc->guidesXml(), doc->projectDuration());
m_renderWidget->setDocumentPath(doc->projectFolder().path(KUrl::AddTrailingSlash));
- m_renderWidget->setRenderProfile(doc->getDocumentProperty("renderdestination"), doc->getDocumentProperty("renderprofile"), doc->getDocumentProperty("renderurl"));
+ m_renderWidget->setRenderProfile(doc->getDocumentProperty("renderdestination"), doc->getDocumentProperty("rendercategory"), doc->getDocumentProperty("renderprofile"), doc->getDocumentProperty("renderurl"));
}
//doc->setRenderer(m_projectMonitor->render);
m_commandStack->setActiveStack(doc->commandStack());
slotTranscode(urls);
}
-void MainWindow::slotSetDocumentRenderProfile(const QString &dest, const QString &name, const QString &file)
+void MainWindow::slotSetDocumentRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &file)
{
if (m_activeDocument == NULL) return;
m_activeDocument->setDocumentProperty("renderdestination", dest);
+ m_activeDocument->setDocumentProperty("rendercategory", group);
m_activeDocument->setDocumentProperty("renderprofile", name);
m_activeDocument->setDocumentProperty("renderurl", file);
m_activeDocument->setModified(true);
void slotMaximizeCurrent(bool show);
void slotTranscode(KUrl::List urls = KUrl::List());
void slotTranscodeClip();
- void slotSetDocumentRenderProfile(const QString &dest, const QString &name, const QString &file);
+ void slotSetDocumentRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &file);
void slotPrepareRendering(bool scriptExport, bool zoneOnly, const QString &chapterFile);
void slotUpdateTimecodeFormat(int ix);
/** Removes the focus of anything */
return;
m_isBlocked = false;
if (!m_isZoneMode) m_originalOut = m_mltProducer->get_playtime() - 1;
- m_mltProducer->set("out", (int) (stopTime.frames(m_fps)));
+ m_mltProducer->set("out", (int)(stopTime.frames(m_fps)));
m_mltProducer->seek((int)(startTime.frames(m_fps)));
m_mltProducer->set_speed(1.0);
m_mltConsumer->set("refresh", 1);
m_view.tabWidget->setCurrentIndex(1);
// Save rendering profile to document
- emit selectedRenderProfile(m_view.size_list->currentItem()->data(MetaGroupRole).toString(), m_view.size_list->currentItem()->text(), dest);
+ emit selectedRenderProfile(m_view.size_list->currentItem()->data(MetaGroupRole).toString(), m_view.size_list->currentItem()->data(GroupRole).toString(), m_view.size_list->currentItem()->text(), dest);
// insert item in running jobs list
QTreeWidgetItem *renderItem;
m_view.error_box->setVisible(false);
}
-void RenderWidget::setRenderProfile(const QString &dest, const QString &name, const QString &url)
+void RenderWidget::setRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &url)
{
m_view.destination_list->blockSignals(true);
m_view.format_list->blockSignals(true);
- m_view.size_list->blockSignals(true);
if (!url.isEmpty()) m_view.out_file->setUrl(KUrl(url));
+ // set destination
for (int i = 0; i < m_view.destination_list->count(); i++) {
if (m_view.destination_list->itemData(i, Qt::UserRole) == dest) {
m_view.destination_list->setCurrentIndex(i);
break;
}
}
+ refreshCategory();
+
+ // set category
+ if (!group.isEmpty()) {
+ QList<QListWidgetItem *> childs = m_view.format_list->findItems(group, Qt::MatchExactly);
+ if (!childs.isEmpty()) {
+ m_view.format_list->setCurrentItem(childs.at(0));
+ }
+ refreshView();
+ }
+
+ // set profile
QList<QListWidgetItem *> childs = m_view.size_list->findItems(name, Qt::MatchExactly);
if (!childs.isEmpty()) {
- QListWidgetItem *profile = childs.at(0);
- if (profile->isHidden()) {
- QString group = profile->data(GroupRole).toString();
- childs = m_view.format_list->findItems(group, Qt::MatchExactly);
- if (!childs.isEmpty()) {
- m_view.format_list->setCurrentItem(childs.at(0));
- }
- }
- //refreshView();
- m_view.size_list->blockSignals(false);
- m_view.size_list->setCurrentItem(profile);
- } else m_view.size_list->blockSignals(false);
+ m_view.size_list->setCurrentItem(childs.at(0));
+ }
+ //refreshView();
m_view.destination_list->blockSignals(false);
m_view.format_list->blockSignals(false);
void setRenderStatus(const QString &dest, int status, const QString &error);
void setDocumentPath(const QString path);
void reloadProfiles();
- void setRenderProfile(const QString &dest, const QString &name, const QString &url);
+ void setRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &url);
int waitingJobsCount() const;
QString getFreeScriptName(const QString &prefix = QString());
bool startWaitingRenderJobs();
void openDvdWizard(const QString &url, const QString &profile);
/** Send the infos about rendering that will be saved in the document:
(profile destination, profile name and url of rendered file */
- void selectedRenderProfile(const QString &, const QString &, const QString &);
+ void selectedRenderProfile(const QString &, const QString &, const QString &, const QString &);
void prepareRenderingData(bool scriptExport, bool zoneOnly, const QString &chapterFile);
void shutdown();
};