X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fclipmanager.h;h=fe214673835f2a56af23782e9c800e56cb8d279e;hb=856f46341a3659ec6b5ccc4696b4c0bf358e6b9b;hp=943d6a56e7c6ac3736593f5a4252b986e5879efa;hpb=d78291d1846407eefd3cc7746c9a39251cc22d49;p=kdenlive diff --git a/src/clipmanager.h b/src/clipmanager.h index 943d6a56..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 */ @@ -120,9 +124,14 @@ private: // Private attributes int m_folderIdCounter; 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();