#include "audioscopes/spectrogram.h"
#include "archivewidget.h"
#include "databackup/backupwidget.h"
-#include "utils/freesound.h"
+#include "utils/resourcewidget.h"
#include <KApplication>
collection.addAction("add_folder", addFolderButton);
connect(addFolderButton , SIGNAL(triggered()), m_projectList, SLOT(slotAddFolder()));
- QAction *downloadAudio = new KAction(KIcon("download"), i18n("Download Audio"), this);
- collection.addAction("download_audio", downloadAudio);
- connect(downloadAudio , SIGNAL(triggered()), this, SLOT(slotDownloadAudio()));
+ QAction *downloadResources = new KAction(KIcon("download"), i18n("Online Resources"), this);
+ collection.addAction("download_resource", downloadResources);
+ connect(downloadResources , SIGNAL(triggered()), this, SLOT(slotDownloadResources()));
QAction *clipProperties = new KAction(KIcon("document-edit"), i18n("Clip Properties"), this);
collection.addAction("clip_properties", clipProperties);
addClips->addAction(addTitleClip);
addClips->addAction(addTitleTemplateClip);
addClips->addAction(addFolderButton);
+ addClips->addAction(downloadResources);
addClips->addAction(reloadClip);
addClips->addAction(proxyClip);
QString profileName = KdenliveSettings::default_profile();
KUrl projectFolder = KdenliveSettings::defaultprojectfolder();
QMap <QString, QString> documentProperties;
+ QMap <QString, QString> documentMetadata;
QPoint projectTracks(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks());
if (!showProjectSettings) {
if (!KdenliveSettings::activatetabs())
if (!closeCurrentDocument())
return;
} else {
- ProjectSettings *w = new ProjectSettings(NULL, QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this);
+ ProjectSettings *w = new ProjectSettings(NULL, QMap <QString, QString> (), QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this);
if (w->exec() != QDialog::Accepted)
return;
if (!KdenliveSettings::activatetabs())
documentProperties.insert("proxyextension", w->proxyExtension());
documentProperties.insert("generateimageproxy", QString::number((int) w->generateImageProxy()));
documentProperties.insert("proxyimageminsize", QString::number(w->proxyImageMinSize()));
+ documentMetadata = w->metadata();
delete w;
}
m_timelineArea->setEnabled(true);
m_projectList->setEnabled(true);
bool openBackup;
- KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, m_commandStack, profileName, documentProperties, projectTracks, m_projectMonitor->render, m_notesWidget, &openBackup, this);
+ KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, m_commandStack, profileName, documentProperties, documentMetadata, projectTracks, m_projectMonitor->render, m_notesWidget, &openBackup, this);
doc->m_autosave = new KAutoSaveFile(KUrl(), doc);
bool ok;
TrackView *trackView = new TrackView(doc, &ok, this);
qApp->processEvents();
bool openBackup;
- KdenliveDoc *doc = new KdenliveDoc(url, KdenliveSettings::defaultprojectfolder(), m_commandStack, KdenliveSettings::default_profile(), QMap <QString, QString> (), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), m_projectMonitor->render, m_notesWidget, &openBackup, this, &progressDialog);
+ KdenliveDoc *doc = new KdenliveDoc(url, KdenliveSettings::defaultprojectfolder(), m_commandStack, KdenliveSettings::default_profile(), QMap <QString, QString> (), QMap <QString, QString> (), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), m_projectMonitor->render, m_notesWidget, &openBackup, this, &progressDialog);
progressDialog.progressBar()->setValue(1);
progressDialog.progressBar()->setMaximum(4);
void MainWindow::slotEditProjectSettings()
{
QPoint p = m_activeDocument->getTracksCount();
- ProjectSettings *w = new ProjectSettings(m_projectList, m_activeTimeline->projectView()->extractTransitionsLumas(), p.x(), p.y(), m_activeDocument->projectFolder().path(), true, !m_activeDocument->isModified(), this);
+ ProjectSettings *w = new ProjectSettings(m_projectList, m_activeDocument->metadata(), m_activeTimeline->projectView()->extractTransitionsLumas(), p.x(), p.y(), m_activeDocument->projectFolder().path(), true, !m_activeDocument->isModified(), this);
connect(w, SIGNAL(disableProxies()), this, SLOT(slotDisableProxies()));
if (w->exec() == QDialog::Accepted) {
m_activeDocument->setModified();
slotUpdateProxySettings();
}
+ m_activeDocument->setMetadata(w->metadata());
}
delete w;
}
m_activeTimeline->projectView()->editItemDuration();
}
-void MainWindow::slotAddProjectClip(KUrl url)
+void MainWindow::slotAddProjectClip(KUrl url, const QString &comment)
{
if (m_activeDocument)
- m_activeDocument->slotAddClipFile(url, QString());
+ m_activeDocument->slotAddClipFile(url, QString(), QString(), comment);
}
void MainWindow::slotAddProjectClipList(KUrl::List urls)
return;
}
file.close();
- m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), playlistPath, scriptPath, exportAudio);
+ m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), m_activeDocument->metadata(), playlistPath, scriptPath, exportAudio);
}
void MainWindow::slotUpdateTimecodeFormat(int ix)
}
-void MainWindow::slotDownloadAudio()
+void MainWindow::slotDownloadResources()
{
QString currentFolder;
if (m_activeDocument) currentFolder = m_activeDocument->projectFolder().path();
else currentFolder = KdenliveSettings::defaultprojectfolder();
- FreeSound *d = new FreeSound(currentFolder);
- connect(d, SIGNAL(addClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl)));
+ ResourceWidget *d = new ResourceWidget(currentFolder);
+ connect(d, SIGNAL(addClip(KUrl, const QString &)), this, SLOT(slotAddProjectClip(KUrl, const QString &)));
d->show();
}