]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivedoc.h
Improve handling of missing clips:
[kdenlive] / src / kdenlivedoc.h
index f474ab24153381422cfef4481850ed2a31b0de5f..e92c0a816e943e187bea4cd0d0a9458ed0fe8d25 100644 (file)
@@ -45,7 +45,8 @@ class DocClipBase;
 class MainWindow;
 class TrackInfo;
 
-class KdenliveDoc: public QObject {
+class KdenliveDoc: public QObject
+{
 Q_OBJECT public:
 
     KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, Render *render, MainWindow *parent = 0);
@@ -61,10 +62,8 @@ Q_OBJECT public:
     //void setRenderer(Render *render);
     QUndoStack *commandStack();
     QString producerName(const QString &id);
-    void setProducerDuration(const QString &id, int duration);
-    int getProducerDuration(const QString &id);
     Render *renderer();
-    QDomElement m_guidesXml;
+    QDomDocument m_guidesXml;
     QDomElement guidesXml() const;
     ClipManager *clipManager();
     void addClip(QDomElement elem, QString clipId, bool createClipItem = true);
@@ -83,7 +82,7 @@ Q_OBJECT public:
     const QString description() const;
     void setUrl(KUrl url);
     void setProfilePath(QString path);
-    const QString &getFreeClipId();
+    const QString getFreeClipId();
     /** does the document need saving */
     bool isModified() const;
     /** Returns project folder, used to store project files (titles, effects,...) */
@@ -93,7 +92,7 @@ Q_OBJECT public:
     void syncGuides(QList <Guide *> guides);
     void setZoom(int factor);
     int zoom() const;
-    const double dar();
+    double dar();
     double projectDuration() const;
     bool saveSceneList(const QString &path, const QString &scene);
     int tracksCount() const;
@@ -118,7 +117,6 @@ Q_OBJECT public:
 private:
     KUrl m_url;
     QDomDocument m_document;
-    QString m_projectName;
     double m_fps;
     int m_zoom;
     /** Cursor position at document opening */
@@ -128,7 +126,6 @@ private:
     Timecode m_timecode;
     Render *m_render;
     QUndoStack *m_commandStack;
-    QDomDocument generateSceneList();
     ClipManager *m_clipManager;
     MltVideoProfile m_profile;
     QTimer *m_autoSaveTimer;
@@ -148,15 +145,17 @@ private:
     bool convertDocument(double version);
     QDomDocument createEmptyDocument(const int videotracks, const int audiotracks);
     QString colorToString(const QColor& c);
-    void checkProjectClips();
+
     void setNewClipResource(const QString &id, const QString &path);
     QString searchFileRecursively(const QDir &dir, const QString &matchSize, const QString &matchHash) const;
     void moveProjectData(KUrl url);
+    bool checkDocumentClips(QDomNodeList producers, QDomNodeList infoproducers);
 
 public slots:
     void slotCreateTextClip(QString group, const QString &groupId);
     /** Set to true if document needs saving, false otherwise */
     void setModified(bool mod = true);
+    void checkProjectClips();
 
 private slots:
     void slotAutoSave();