X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fclipmanager.h;h=fe214673835f2a56af23782e9c800e56cb8d279e;hb=8ef6284b4cf4fef311a46d123f407eade73ab987;hp=bb45d4ffc9f720d2175611dde6bc056c93a45830;hpb=a6aafb4cb3d09e17564f60bce207e7678b507a95;p=kdenlive diff --git a/src/clipmanager.h b/src/clipmanager.h index bb45d4ff..fe214673 100644 --- a/src/clipmanager.h +++ b/src/clipmanager.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -103,9 +104,12 @@ public slots: void updatePreviewSettings(); private slots: + /** A clip was externally modified, monitor for more changes and prepare for reload */ void slotClipModified(const QString &path); void slotClipMissing(const QString &path); void slotClipAvailable(const QString &path); + /** Check the list of externally modified clips, and process them if they were not modified in the last 1500 milliseconds */ + void slotProcessModifiedClips(); private: // Private attributes /** the list of clips in the document */ @@ -118,12 +122,16 @@ private: // Private attributes KdenliveDoc *m_doc; int m_clipIdCounter; int m_folderIdCounter; - bool m_audioThumbsEnabled; QString m_generatingAudioId; KDirWatch m_fileWatcher; + /** Timer used to reload clips when they have been externally modified */ + QTimer m_modifiedTimer; + /** List of the clip IDs that need to be reloaded after being externally modified */ + QMap m_modifiedClips; signals: void reloadClip(const QString &); + void modifiedClip(const QString &); void missingClip(const QString &); void availableClip(const QString &); void checkAllClips();