Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

First steps to restore archive feature

parent d4cf2c57
......@@ -3706,18 +3706,13 @@ void MainWindow::slotUpdateProxySettings()
void MainWindow::slotArchiveProject()
{
// TODO refac
/*
QList<std::shared_ptr<ClipController>> list = pCore->binController()->getControllerList();
KdenliveDoc *doc = pCore->currentDoc();
pCore->binController()->saveDocumentProperties(pCore->projectManager()->currentTimeline()->documentProperties(), doc->metadata(), doc->getGuideModel());
QDomDocument xmlDoc = doc->xmlSceneList(m_projectMonitor->sceneList(doc->url().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).toLocalFile()));
QScopedPointer<ArchiveWidget> d(
new ArchiveWidget(doc->url().fileName(), xmlDoc, list, pCore->projectManager()->currentTimeline()->projectView()->extractTransitionsLumas(), this));
QPointer<ArchiveWidget> d(
new ArchiveWidget(doc->url().fileName(), xmlDoc, getMainTimeline()->controller()->extractCompositionLumas(), this));
if (d->exec() != 0) {
m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage);
}
*/
}
void MainWindow::slotDownloadResources()
......
......@@ -18,7 +18,11 @@
***************************************************************************/
#include "archivewidget.h"
#include "mltcontroller/clipcontroller.h"
#include "bin/bin.h"
#include "bin/projectitemmodel.h"
#include "bin/projectclip.h"
#include "bin/projectfolder.h"
#include "core.h"
#include "projectsettings.h"
#include "titler/titlewidget.h"
......@@ -34,7 +38,7 @@
#include <QTreeWidget>
#include <QtConcurrent>
ArchiveWidget::ArchiveWidget(const QString &projectName, const QDomDocument &doc, const QList<std::shared_ptr<ClipController>> &list,
ArchiveWidget::ArchiveWidget(const QString &projectName, const QDomDocument &doc,
const QStringList &luma_list, QWidget *parent)
: QDialog(parent)
, m_requestedSize(0)
......@@ -108,9 +112,8 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, const QDomDocument &doc
QMap<QString, QString> imageUrls;
QMap<QString, QString> playlistUrls;
QMap<QString, QString> proxyUrls;
for (int i = 0; i < list.count(); ++i) {
const std::shared_ptr<ClipController> &clip = list.at(i);
QList<std::shared_ptr<ProjectClip>> clipList = pCore->projectItemModel()->getRootFolder()->childClips();
for (std::shared_ptr<ProjectClip> clip : clipList) {
ClipType::ProducerType t = clip->clipType();
QString id = clip->binId();
if (t == ClipType::Color) {
......
......@@ -49,7 +49,7 @@ class ArchiveWidget : public QDialog, public Ui::ArchiveWidget_UI
Q_OBJECT
public:
ArchiveWidget(const QString &projectName, const QDomDocument &doc, const QList<std::shared_ptr<ClipController>> &list, const QStringList &luma_list,
ArchiveWidget(const QString &projectName, const QDomDocument &doc, const QStringList &luma_list,
QWidget *parent = nullptr);
// Constructor for extracting widget
explicit ArchiveWidget(const QUrl &url, QWidget *parent = nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment