]> git.sesse.net Git - kdenlive/blobdiff - src/slideshowclip.h
Add animation feature to Slideshow Clip.
[kdenlive] / src / slideshowclip.h
index f185f64fc61b74a95d687a5b4607189e02a63bab..36ba0a2a3343dcd5e6a95b2c30f46db3f20b01c3 100644 (file)
 #include "timecode.h"
 #include "ui_slideshowclip_ui.h"
 
+#include <KIO/PreviewJob>
+
 class SlideshowClip : public QDialog
 {
     Q_OBJECT
 
 public:
-    SlideshowClip(QWidget * parent = 0);
+    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;
+    QString animation() 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);
+    /** @brief Convert the selection animation style into an affine geometry string. */
+    static QString animationToGeometry(const QString &animation, int &ttl);
 
 private slots:
     void parseFolder();
     void slotEnableLuma(int state);
+    void slotEnableThumbs(int state);
     void slotEnableLumaFile(int state);
-    void slotSetItemIcon(int row);
+    void slotUpdateDurationFormat(int ix);
+    void slotGenerateThumbs();
+    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;
+    KIO::PreviewJob *m_thumbJob;
 };