]> git.sesse.net Git - kdenlive/blobdiff - src/slideshowclip.h
Add center-crop option to slideshow clip.
[kdenlive] / src / slideshowclip.h
index 83db3d81c3602b722423ed6f0a93d3ef18d14b2d..9aa3838745b8a4fc5d392df3512da572acac2805 100644 (file)
@@ -27,8 +27,7 @@
 #include "timecode.h"
 #include "ui_slideshowclip_ui.h"
 
-#include <QFuture>
-#include <QFutureWatcher>
+#include <KIO/PreviewJob>
 
 class SlideshowClip : public QDialog
 {
@@ -36,33 +35,40 @@ class SlideshowClip : public QDialog
 
 public:
     SlideshowClip(Timecode tc, QWidget * parent = 0);
+    virtual ~ SlideshowClip();
     /** return selected path for slideshow in MLT format */
-    QString selectedPath() const;
+    QString selectedPath();
     QString clipName() const;
     QString clipDuration() const;
     QString lumaDuration() const;
     int imageCount() const;
     bool loop() const;
+    bool crop() const;
     bool fade() const;
     QString lumaFile() const;
     int softness() const;
 
+    /** @brief Check if there are several files with filename pattern, like: image_001.jpg, image_002.jpg,... */
+    static int sequenceCount(KUrl file);
+    /** @brief return the url pattern for selected slideshow. */
+    static QString selectedPath(KUrl url, bool isMime, QString extension, int *count);
+
 private slots:
     void parseFolder();
     void slotEnableLuma(int state);
     void slotEnableThumbs(int state);
     void slotEnableLumaFile(int state);
-    void doGetThumbs();
     void slotUpdateDurationFormat(int ix);
     void slotGenerateThumbs();
-    void slotCheckGenerateThumbs();
+    void slotSetPixmap(const KFileItem &fileItem, const QPixmap &pix);
+    /** @brief Display correct widget depenging on user choice (mimetype or pattern method). */
+    void slotMethodChanged(bool active);
 
 private:
     Ui::SlideshowClip_UI m_view;
     int m_count;
     Timecode m_timecode;
-    QFuture<void> m_future;
-    QFutureWatcher<void> m_watcher;
+    KIO::PreviewJob *m_thumbJob;
 };