X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fkdenlivedoc.h;h=8cc4b42d1f9b29bfa18a09de1c74f20fbe8c4032;hb=80c878e198cde92fcb14be699b0983e3e936789d;hp=ce1ffafd401f465505293ec085c324e13aa95f8e;hpb=56f69242fee94baa6a0ed504b9cc51e0b5eb04ae;p=kdenlive diff --git a/src/kdenlivedoc.h b/src/kdenlivedoc.h index ce1ffafd..8cc4b42d 100644 --- a/src/kdenlivedoc.h +++ b/src/kdenlivedoc.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -42,11 +43,12 @@ class Render; class ClipManager; class DocClipBase; class MainWindow; +class TrackInfo; class KdenliveDoc: public QObject { Q_OBJECT public: - KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, MainWindow *parent = 0); + KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, Render *render, MainWindow *parent = 0); ~KdenliveDoc(); QDomNodeList producersList(); double fps() const; @@ -56,8 +58,8 @@ Q_OBJECT public: KAutoSaveFile *m_autosave; void backupMltPlaylist(); Timecode timecode() const; - QDomDocument toXml() const; - void setRenderer(Render *render); + QDomDocument toXml(); + //void setRenderer(Render *render); QUndoStack *commandStack(); QString producerName(const QString &id); void setProducerDuration(const QString &id, int duration); @@ -88,12 +90,9 @@ Q_OBJECT public: QString profilePath() const; MltVideoProfile mltProfile() const; QString description() const; - /** Returns the document format: PAL or NTSC */ - QString getDocumentStandard(); void setUrl(KUrl url); - QDomElement documentInfoXml(); 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,...) */ @@ -105,7 +104,20 @@ Q_OBJECT public: int zoom() const; const double dar(); double projectDuration() const; - void saveSceneList(const QString &path, QDomDocument sceneList); + bool saveSceneList(const QString &path, QDomDocument sceneList); + int tracksCount() const; + TrackInfo trackInfoAt(int ix) const; + void insertTrack(int ix, TrackInfo type); + void deleteTrack(int ix); + void setTrackType(int ix, TrackInfo type); + const QList tracksList() const; + QPoint getTracksCount() const; + QString getTracksInfo() const; + void switchTrackVideo(int ix, bool hide); + void switchTrackAudio(int ix, bool hide); + void cachePixmap(const QString &fileId, const QPixmap &pix) const; + void setProjectFolder(KUrl url); + QString getLadspaFile() const; private: KUrl m_url; @@ -125,16 +137,23 @@ private: MltVideoProfile m_profile; QString m_scenelist; QTimer *m_autoSaveTimer; + QString m_searchFolder; /** 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); + + QList m_tracksList; + + 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); public slots: void slotCreateTextClip(QString group, const QString &groupId); @@ -145,7 +164,7 @@ private slots: void slotAutoSave(); signals: - void addProjectClip(DocClipBase *); + void addProjectClip(DocClipBase *, bool getInfo = true); void addProjectFolder(const QString, const QString &, bool, bool edit = false); void signalDeleteProjectClip(const QString &); void updateClipDisplay(const QString&);