// Prepare layout actions
KActionCategory *layoutActions = new KActionCategory(i18n("Layouts"), actionCollection());
+ m_loadLayout = new KSelectAction(i18n("Load Layout"), actionCollection());
for (int i = 1; i < 5; i++) {
- KAction *load = new KAction(KIcon(), i18n("Load Layout %1").arg(i), this);
+ KAction *load = new KAction(KIcon(), i18n("Layout %1").arg(i), this);
load->setData("_" + QString::number(i));
- layoutActions->addAction("load_layout" + QString::number(i), load);
+ layoutActions->addAction("load_layout" + QString::number(i), load);
+ m_loadLayout->addAction(load);
KAction *save = new KAction(KIcon(), i18n("Save As Layout %1").arg(i), this);
save->setData("_" + QString::number(i));
layoutActions->addAction("save_layout" + QString::number(i), save);
}
+ layoutActions->addAction("load_layouts", m_loadLayout);
+ connect(m_loadLayout, SIGNAL(triggered(QAction*)), this, SLOT(slotLoadLayout(QAction*)));
KAction *action;
// Stop motion actions. Beware of the order, we MUST use the same order in stopmotion/stopmotion.cpp
/*ScriptingPart* sp = new ScriptingPart(this, QStringList());
guiFactory()->addClient(sp);*/
-
- QMenu *loadLayout = (QMenu*)(factory()->container("layout_load", this));
- if (loadLayout)
- connect(loadLayout, SIGNAL(triggered(QAction*)), this, SLOT(slotLoadLayout(QAction*)));
QMenu *saveLayout = (QMenu*)(factory()->container("layout_save_as", this));
if (saveLayout)
connect(saveLayout, SIGNAL(triggered(QAction*)), this, SLOT(slotSaveLayout(QAction*)));
void MainWindow::loadLayouts()
{
QMenu *saveLayout = (QMenu*)(factory()->container("layout_save_as", this));
- QMenu *loadLayout = (QMenu*)(factory()->container("layout_load", this));
- if (loadLayout == NULL || saveLayout == NULL) return;
+ if (m_loadLayout == NULL || saveLayout == NULL) return;
KSharedConfigPtr config = KGlobal::config();
KConfigGroup layoutGroup(config, "Layouts");
QStringList entries = layoutGroup.keyList();
- QList<QAction *> loadActions = loadLayout->actions();
+ QList<QAction *> loadActions = m_loadLayout->actions();
QList<QAction *> saveActions = saveLayout->actions();
for (int i = 1; i < 5; i++) {
// Rename the layouts actions
}
for (int j = 0; j < saveActions.count(); j++) {
if (saveActions.at(j)->data().toString().endsWith("_" + QString::number(i))) {
- saveActions[j]->setText(layoutName);
+ saveActions[j]->setText(i18n("Save as %1").arg(layoutName));
saveActions[j]->setData(key);
break;
}
KdenliveSettingsDialog* dialog = new KdenliveSettingsDialog(actions, this);
connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateConfiguration()));
- //connect(dialog, SIGNAL(doResetProfile()), this, SLOT(slotDetectAudioDriver()));
+ connect(dialog, SIGNAL(updateProxySettings()), this, SLOT(slotUpdateProxySettings()));
connect(dialog, SIGNAL(doResetProfile()), m_monitorManager, SLOT(slotResetProfiles()));
#ifndef Q_WS_MAC
connect(dialog, SIGNAL(updateCaptureFolder()), this, SLOT(slotUpdateCaptureFolder()));
return;
}
playlistPath = scriptPath + ".mlt";
- m_projectMonitor->saveSceneList(playlistPath);
} else {
KTemporaryFile temp;
temp.setAutoRemove(false);
temp.setSuffix(".mlt");
temp.open();
playlistPath = temp.fileName();
- m_projectMonitor->saveSceneList(playlistPath);
}
-
+ QString playlistContent = m_projectMonitor->sceneList();
if (!chapterFile.isEmpty()) {
int in = 0;
int out;
if (m_renderWidget->automaticAudioExport()) {
exportAudio = m_activeTimeline->checkProjectAudio();
} else exportAudio = m_renderWidget->selectedAudioExport();
+
+ // Do we want proxy rendering
+ if (KdenliveSettings::enableproxy() && !m_renderWidget->proxyRendering()) {
+ // replace proxy clips with originals
+ QMap <QString, QString> proxies = m_projectList->getProxies();
+ QMapIterator<QString, QString> i(proxies);
+ while (i.hasNext()) {
+ i.next();
+ // Replace all keys with their values (proxy path with original path)
+ playlistContent.replace(i.key(), i.value());
+ }
+ }
+
+ // Do save scenelist
+ QFile file(playlistPath);
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ m_messageLabel->setMessage(i18n("Cannot write to file %1").arg(playlistPath), ErrorMessage);
+ return;
+ }
+ file.write(playlistContent.toUtf8());
+ if (file.error() != QFile::NoError) {
+ m_messageLabel->setMessage(i18n("Cannot write to file %1").arg(playlistPath), ErrorMessage);
+ file.close();
+ return;
+ }
+ file.close();
m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), playlistPath, scriptPath, exportAudio);
}
m_projectList->slotDeleteClip(id);
}
+void MainWindow::slotUpdateProxySettings()
+{
+ if (m_renderWidget) m_renderWidget->updateProxyConfig();
+ //TODO: update proxy in project tree
+}
+
#include "mainwindow.moc"
#ifdef DEBUG_MAINW