if (m_monitorManager) m_monitorManager->stopActiveMonitor();
// warn the user to save if document is modified and we have clips in our project list
if (m_activeDocument && m_activeDocument->isModified() &&
- ((m_projectList->documentClipList().isEmpty() && !m_activeDocument->url().isEmpty()) ||
- !m_projectList->documentClipList().isEmpty())) {
+ ((m_projectList->documentClipList().isEmpty() && !m_activeDocument->url().isEmpty()) ||
+ !m_projectList->documentClipList().isEmpty())) {
QString message;
if (m_activeDocument->url().fileName().isEmpty())
message = i18n("Save changes to document?");
bool MainWindow::saveFileAs()
{
- QString outputFile = KFileDialog::getSaveFileName(KUrl(), getMimeType());
- if (outputFile.isEmpty()) return false;
+ QString outputFile = KFileDialog::getSaveFileName(m_activeDocument->projectFolder(), getMimeType());
+ if (outputFile.isEmpty()) {
+ return false;
+ }
if (QFile::exists(outputFile)) {
// Show the file dialog again if the user does not want to overwrite the file
if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it?")) == KMessageBox::No)
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 &, const QString&)), this, SLOT(slotSetDocumentRenderProfile(const QString &, const QString &, const QString &, const QString&)));
+ connect(m_renderWidget, SIGNAL(selectedRenderProfile(QMap <QString, QString>)), this, SLOT(slotSetDocumentRenderProfile(QMap <QString, 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("rendercategory"), m_activeDocument->getDocumentProperty("renderprofile"), m_activeDocument->getDocumentProperty("renderurl"));
+ m_renderWidget->setRenderProfile(m_activeDocument->getRenderProperties());
}
}
slotCheckRenderStatus();
- /*TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
- if (currentTab) m_renderWidget->setTimeline(currentTab);
- m_renderWidget->setDocument(m_activeDocument);*/
m_renderWidget->show();
m_renderWidget->showNormal();
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("rendercategory"), doc->getDocumentProperty("renderprofile"), doc->getDocumentProperty("renderurl"));
+ m_renderWidget->setRenderProfile(doc->getRenderProperties());
}
//doc->setRenderer(m_projectMonitor->render);
m_commandStack->setActiveStack(doc->commandStack());
void MainWindow::slotDeleteItem()
{
if (QApplication::focusWidget() &&
- QApplication::focusWidget()->parentWidget() &&
- QApplication::focusWidget()->parentWidget()->parentWidget() &&
- QApplication::focusWidget()->parentWidget()->parentWidget() == m_projectListDock) {
+ QApplication::focusWidget()->parentWidget() &&
+ QApplication::focusWidget()->parentWidget()->parentWidget() &&
+ QApplication::focusWidget()->parentWidget()->parentWidget() == m_projectListDock) {
m_projectList->slotRemoveClip();
} else {
slotTranscode(urls);
}
-void MainWindow::slotSetDocumentRenderProfile(const QString &dest, const QString &group, const QString &name, const QString &file)
+void MainWindow::slotSetDocumentRenderProfile(QMap <QString, QString> props)
{
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);
+ QMapIterator<QString, QString> i(props);
+ while (i.hasNext()) {
+ i.next();
+ m_activeDocument->setDocumentProperty(i.key(), i.value());
+ }
m_activeDocument->setModified(true);
}
}
}
}
-
- m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), playlistPath, scriptPath);
+ bool exportAudio;
+ if (m_renderWidget->automaticAudioExport()) {
+ exportAudio = m_activeTimeline->checkProjectAudio();
+ } else exportAudio = m_renderWidget->selectedAudioExport();
+ m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), playlistPath, scriptPath, exportAudio);
}
void MainWindow::slotUpdateTimecodeFormat(int ix)
m_RGBParadeDock->setTitleBarWidget(0);
m_histogramDock->setTitleBarWidget(0);
} else {
- if (!m_effectStackDock->isFloating()) { m_effectStackDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_clipMonitorDock->isFloating()) { m_clipMonitorDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_projectMonitorDock->isFloating()) { m_projectMonitorDock->setTitleBarWidget(new QWidget(this)); }
+ if (!m_effectStackDock->isFloating()) {
+ m_effectStackDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_clipMonitorDock->isFloating()) {
+ m_clipMonitorDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_projectMonitorDock->isFloating()) {
+ m_projectMonitorDock->setTitleBarWidget(new QWidget);
+ }
#ifndef Q_WS_MAC
- if (!m_recMonitorDock->isFloating()) { m_recMonitorDock->setTitleBarWidget(new QWidget(this)); }
+ if (!m_recMonitorDock->isFloating()) {
+ m_recMonitorDock->setTitleBarWidget(new QWidget);
+ }
#endif
- if (!m_effectListDock->isFloating()) { m_effectListDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_transitionConfigDock->isFloating()) { m_transitionConfigDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_projectListDock->isFloating()) { m_projectListDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_undoViewDock->isFloating()) { m_undoViewDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_vectorscopeDock->isFloating()) { m_vectorscopeDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_waveformDock->isFloating()) { m_waveformDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_RGBParadeDock->isFloating()) { m_RGBParadeDock->setTitleBarWidget(new QWidget(this)); }
- if (!m_histogramDock->isFloating()) { m_histogramDock->setTitleBarWidget(new QWidget(this)); }
+ if (!m_effectListDock->isFloating()) {
+ m_effectListDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_transitionConfigDock->isFloating()) {
+ m_transitionConfigDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_projectListDock->isFloating()) {
+ m_projectListDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_undoViewDock->isFloating()) {
+ m_undoViewDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_vectorscopeDock->isFloating()) {
+ m_vectorscopeDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_waveformDock->isFloating()) {
+ m_waveformDock->setTitleBarWidget(new QWidget);
+ }
+ if (!m_RGBParadeDock->isFloating()) {
+ m_RGBParadeDock->setTitleBarWidget(new QWidget(this));
+ }
+ if (!m_histogramDock->isFloating()) {
+ m_histogramDock->setTitleBarWidget(new QWidget(this));
+ }
}
KdenliveSettings::setShowtitlebars(show);
}