#include <qmap.h>
#include <QList>
#include <QObject>
+#include <QUndoGroup>
#include <KUndoStack>
#include <kurl.h>
#include "gentime.h"
#include "timecode.h"
-#include "renderer.h"
-#include "clipmanager.h"
+#include "definitions.h"
-class KdenliveDoc:public QObject {
- Q_OBJECT public:
+class Render;
+class ClipManager;
+class DocClipBase;
- KdenliveDoc(const KUrl &url, double fps, int width, int height, QWidget *parent = 0);
+class KdenliveDoc: public QObject {
+Q_OBJECT public:
+
+ KdenliveDoc(const KUrl &url, const KUrl &projectFolder, MltVideoProfile profile, QUndoGroup *undoGroup, QWidget *parent = 0);
~KdenliveDoc();
- QString documentName();
QDomNodeList producersList();
- double fps();
- int width();
- int height();
- KUrl url();
- void setProducers(QDomElement doc);
- Timecode timecode();
- QDomDocument toXml();
+ double fps() const;
+ int width() const;
+ int height() const;
+ KUrl url() const;
+ void backupMltPlaylist();
+ Timecode timecode() const;
+ QDomDocument toXml() const;
void setRenderer(Render *render);
KUndoStack *commandStack();
QString producerName(int id);
Render *renderer();
ClipManager *clipManager();
void addClip(const QDomElement &elem, const int clipId);
- void slotAddClipFile(const KUrl url, const QString group);
- void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group);
+ 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);
+ void updateClip(int id);
+ 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);
+ QString profilePath() const;
+ QString description() const;
+ /** Returns the document format: PAL or NTSC */
+ QString getDocumentStandard();
+ void setUrl(KUrl url);
+ QDomElement documentInfoXml();
+ void setProfilePath(QString path);
+ /** Set to true if document needs saving, false otherwise */
+ void setModified(bool mod);
+ int getFreeClipId();
+ /** does the document need saving */
+ bool isModified() const;
+ /** Returns project folder, used to store project files (titles, effects,...) */
+ KUrl projectFolder() const;
- private:
+private:
KUrl m_url;
QDomDocument m_document;
QString m_projectName;
KUndoStack *m_commandStack;
QDomDocument generateSceneList();
ClipManager *m_clipManager;
+ MltVideoProfile m_profile;
+ 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;
+ void convertDocument(double version);
+
+public slots:
+ void slotCreateTextClip(QString group, int groupId);
- public slots:
-
- signals:
+signals:
void addProjectClip(DocClipBase *);
+ void addProjectFolder(const QString, int, bool, bool edit = false);
+ void signalDeleteProjectClip(int);
+ void updateClipDisplay(int);
+ void deletTimelineClip(int);
+ void thumbsProgress(KUrl, int);
+ /** emited when the document state has been modified (= needs saving or not) */
+ void docModified(bool);
+ void refreshClipThumbnail(int);
};
#endif