]> git.sesse.net Git - kdenlive/blobdiff - src/clipmanager.h
Fix audio thumbs not displayed on project opening and abortion if audio thumbs creation
[kdenlive] / src / clipmanager.h
index 6f316eaeeca267c934a81630db842d1e69d3c893..943d6a56e7c6ac3736593f5a4252b986e5879efa 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
+/**
+ * @class ClipManager
+ * @brief Manages the list of clips in a document.
+ * @author Jean-Baptiste Mardelle
+ */
+
 #ifndef CLIPMANAGER_H
 #define CLIPMANAGER_H
 
-/**ClipManager manages the list of clips in a document
-  *@author Jean-Baptiste Mardelle
-  */
-
 #include <qdom.h>
 #include <QPixmap>
 #include <QObject>
@@ -55,15 +57,27 @@ Q_OBJECT public:
     void addClip(DocClipBase *clip);
     DocClipBase *getClipAt(int pos);
     void deleteClip(const QString &clipId);
+
+    /** @brief Add a file to the project.
+     * @ref slotAddClipList
+     * @param url file to add
+     * @param group name of the group to insert the file in (can be empty)
+     * @param groupId id of the group (if any) */
     void slotAddClipFile(const KUrl url, const QString group, const QString &groupId);
+
+    /** @brief Adds a list of files to the project.
+     * @param urls files to add
+     * @param group name of the group to insert the files in (can be empty)
+     * @param groupId id of the group (if any)
+     * It checks for duplicated items and asks to the user for instructions. */
     void slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId);
     void slotAddTextClipFile(const QString titleName, int out, const QString xml, const QString group, const QString &groupId);
-    void slotAddTextTemplateClip(QString titleName, const QString imagePath, const KUrl path, const QString group, const QString &groupId);
+    void slotAddTextTemplateClip(QString titleName, const KUrl path, const QString group, const QString &groupId);
     void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId);
     void slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, const bool loop, const bool fade, const QString &luma_duration, const QString &luma_file, const int softness, const QString group, const QString &groupId);
     DocClipBase *getClipById(QString clipId);
-    DocClipBase *getClipByResource(QString resource);
-    void slotDeleteClip(const QString & clipId);
+    const QList <DocClipBase *> getClipByResource(QString resource);
+    void slotDeleteClips(QStringList ids);
     void setThumbsProgress(const QString &message, int progress);
     void checkAudioThumbs();
     QList <DocClipBase*> documentClipList() const;
@@ -83,12 +97,15 @@ Q_OBJECT public:
     AbstractGroupItem *createGroup();
     void removeGroup(AbstractGroupItem *group);
     QDomElement groupsXml() const;
+    int clipsCount() const;
 
 public slots:
     void updatePreviewSettings();
 
 private slots:
     void slotClipModified(const QString &path);
+    void slotClipMissing(const QString &path);
+    void slotClipAvailable(const QString &path);
 
 private:   // Private attributes
     /** the list of clips in the document */
@@ -101,12 +118,13 @@ private:   // Private attributes
     KdenliveDoc *m_doc;
     int m_clipIdCounter;
     int m_folderIdCounter;
-    bool m_audioThumbsEnabled;
     QString m_generatingAudioId;
     KDirWatch m_fileWatcher;
 
 signals:
     void reloadClip(const QString &);
+    void missingClip(const QString &);
+    void availableClip(const QString &);
     void checkAllClips();
 };