]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.h
Cleanup filter jobs
[kdenlive] / src / projectlist.h
index bd04931dcb23227b251672ac937a85db1898d84e..ef290dad26df73769eb2040760d2dd8dfe103b57 100644 (file)
 #include <KIcon>
 #include <kdeversion.h>
 
-#if KDE_IS_VERSION(4,7,0)
-#include <KMessageWidget>
-#endif
-
 #ifdef NEPOMUK
 #include <nepomuk/kratingpainter.h>
 #include <nepomuk/resource.h>
 #include "projecttree/abstractclipjob.h"
 #include <kdialog.h>
 
+#if KDE_IS_VERSION(4,7,0)
+#include <KMessageWidget>
+#else
+// Dummy KMessageWidget to allow compilation of MyMessageWidget class since Qt's moc doesn work inside #ifdef
+#include <QLabel>
+class KMessageWidget: public QLabel
+{
+public:
+    KMessageWidget(QWidget * = 0) {};
+    KMessageWidget(const QString &, QWidget * = 0) {};
+    virtual ~KMessageWidget(){};
+};
+#endif
+
+class MyMessageWidget: public KMessageWidget
+{
+    Q_OBJECT
+public:
+    MyMessageWidget(QWidget *parent = 0);
+    MyMessageWidget(const QString &text, QWidget *parent = 0);
+
+protected:
+    bool event(QEvent* ev);
+
+signals:
+    void messageClosing();
+};
+
 namespace Mlt
 {
 class Producer;
@@ -80,7 +104,7 @@ class SmallInfoLabel: public QPushButton
     Q_OBJECT
 public:
     SmallInfoLabel(QWidget *parent = 0);
-
+    static const QString getStyleSheet(const QPalette &p);
 private:
     QTimeLine* m_timeLine;
 
@@ -261,6 +285,9 @@ public:
     void startClipFilterJob(const QString &filterName, const QString &condition);
     /** @brief Set current document for the project tree. */
     void setDocument(KdenliveDoc *doc);
+    
+    /** @brief Palette was changed, update style. */
+    void updatePalette();
 
 public slots:
     void updateAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips);
@@ -303,7 +330,8 @@ public slots:
     /** @brief Start transcoding selected clips. */
     void slotTranscodeClipJob(const QString &condition, QString params, QString desc);
     /** @brief Start an MLT process job. */
-    void slotStartFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QString&,const QString&);
+    void slotStartFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QMap <QString, QString>&);
+    void slotSetThumbnail(const QString &id, int framePos, QImage img);
     
 
 private:
@@ -346,10 +374,11 @@ private:
     InvalidDialog *m_invalidClipDialog;
     QMenu *m_jobsMenu;
     SmallInfoLabel *m_infoLabel;
+    /** @brief A list of strings containing the last error logs for clip jobs. */
+    QStringList m_errorLog;
+
 #if KDE_IS_VERSION(4,7,0)
-    KMessageWidget *m_infoMessage;
-    /** @brief A string containing the last error log for a clip job. */
-    QString m_errorLog;
+    MyMessageWidget *m_infoMessage;
     /** @brief The action that will trigger the log dialog. */
     QAction *m_logAction;
 #endif
@@ -396,7 +425,7 @@ private:
     /** @brief Get the list of job names for current clip. */
     QStringList getPendingJobs(const QString &id);
     /** @brief Start an MLT process job. */
-    void processClipJob(QStringList ids, const QString&destination, bool autoAdd, QStringList jobParams, const QString &description);
+    void processClipJob(QStringList ids, const QString&destination, bool autoAdd, QStringList jobParams, const QString &description, QMap <QString, QString>extraParams = QMap <QString, QString>());
 
 private slots:
     void slotClipSelected();
@@ -456,6 +485,14 @@ private slots:
     void slotPrepareJobsMenu();
     /** @brief Discard all jobs for current clip. */
     void slotDiscardClipJobs();
+    /** @brief Make sure current clip is visible in project tree. */
+    void slotCheckScrolling();
+    /** @brief Reset all text and log data from info message widget. */
+    void slotResetInfoMessage();
+    /** @brief close warning info passive popup. */
+    void slotClosePopup();
+    /** @brief process clip job result. */
+    void slotGotFilterJobResults(QString ,int , int, stringMap, stringMap);
 
 signals:
     void clipSelected(DocClipBase *, QPoint zone = QPoint(), bool forceUpdate = false);
@@ -488,8 +525,12 @@ signals:
     void gotProxy(const QString);
     void checkJobProcess();
     /** @brief A Filter Job produced results, send them back to the clip. */
-    void gotFilterJobResults(const QString &id, int startPos, int track, const QString &filterName, stringMap params);
+    void gotFilterJobResults(const QString &id, int startPos, int track, stringMap params, stringMap extra);
+    void pauseMonitor();
+    void updateAnalysisData(DocClipBase *);
+    void addMarkers(const QString &, QList <CommentedTime>);
 };
 
 #endif
 
+