]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivedoc.h
don't forget to cleanup clipmanager
[kdenlive] / src / kdenlivedoc.h
index 8576101840c483419575bed04f2d999ab8e257c2..e6e972fa24c0f4a70cc65107fb33a5d3c6000d2c 100644 (file)
 class Render;
 class ClipManager;
 class DocClipBase;
+class MainWindow;
 
 class KdenliveDoc: public QObject {
 Q_OBJECT public:
 
-    KdenliveDoc(const KUrl &url, MltVideoProfile profile, QUndoGroup *undoGroup, QWidget *parent = 0);
+    KdenliveDoc(const KUrl &url, const KUrl &projectFolder, MltVideoProfile profile, QUndoGroup *undoGroup, MainWindow *parent = 0);
     ~KdenliveDoc();
     QDomNodeList producersList();
     double fps() const;
@@ -63,10 +64,13 @@ Q_OBJECT public:
     void addFolder(const QString foldername, int clipId, bool edit);
     void deleteFolder(const QString foldername, int clipId);
     void slotAddClipFile(const KUrl url, const QString group, const int groupId = -1);
+    void slotAddTextClipFile(const QString path, const QString group, const int groupId = -1);
+    void editTextClip(QString path, int id);
     void slotAddFolder(const QString folderName);
     void slotDeleteFolder(const QString folderName, const int id);
     void slotEditFolder(const QString folderName, const QString oldfolderName, int clipId);
     void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const int groupId = -1);
+    void slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, bool loop, const QString group, const int groupId = -1);
     void deleteClip(const uint clipId);
     int getFramePos(QString duration);
     DocClipBase *getBaseClip(int clipId);
@@ -74,7 +78,7 @@ Q_OBJECT public:
     void deleteProjectClip(QList <int> ids);
     void deleteProjectFolder(QMap <QString, int> map);
     /** Inform application of the audio thumbnails generation progress */
-    void setThumbsProgress(KUrl url, int progress);
+    void setThumbsProgress(const QString &message, int progress);
     QString profilePath() const;
     QString description() const;
     /** Returns the document format: PAL or NTSC */
@@ -86,13 +90,18 @@ Q_OBJECT public:
     void setModified(bool mod);
     int getFreeClipId();
     /** does the document need saving */
-    bool isModified();
-
+    bool isModified() const;
+    /** Returns project folder, used to store project files (titles, effects,...) */
+    KUrl projectFolder() const;
+    /** Used to inform main app of the current document loading progress */
+    void loadingProgressed();
 private:
     KUrl m_url;
     QDomDocument m_document;
     QString m_projectName;
     double m_fps;
+    /** Cursor position at document opening */
+    int m_startPos;
     int m_width;
     int m_height;
     Timecode m_timecode;
@@ -104,6 +113,11 @@ private:
     QString m_scenelist;
     /** tells whether current doc has been changed since last save event */
     bool m_modified;
+    /** Project folder, used to store project files (titles, effects,...) */
+    KUrl m_projectFolder;
+    double m_documentLoadingStep;
+    double m_documentLoadingProgress;
+    void convertDocument(double version);
 
 public slots:
     void slotCreateTextClip(QString group, int groupId);
@@ -114,9 +128,10 @@ signals:
     void signalDeleteProjectClip(int);
     void updateClipDisplay(int);
     void deletTimelineClip(int);
-    void thumbsProgress(KUrl, int);
+    void progressInfo(const QString &, int);
     /** emited when the document state has been modified (= needs saving or not) */
     void docModified(bool);
+    void refreshClipThumbnail(int);
 };
 
 #endif