]> git.sesse.net Git - kdenlive/blobdiff - src/stopmotion/stopmotion.h
Cleaning code style of Definitions.
[kdenlive] / src / stopmotion / stopmotion.h
index dcdfa39e79124948b67041af7e755b563b9fd93e..1c1ff876ed02f1564465333a3c82f1f2a3d5c369 100644 (file)
@@ -19,7 +19,7 @@
 #define STOPMOTION_H
 
 #include "ui_stopmotion_ui.h"
-#include "../blackmagic/capture.h"
+#include "definitions.h"
 
 #include <KUrl>
 #include <QLabel>
 
 class MltDeviceCapture;
 class MonitorManager;
-class VideoPreviewContainer;
+class MltVideoProfile;
 
 class MyLabel : public QLabel
 {
     Q_OBJECT
 public:
-    MyLabel(QWidget* parent = 0);
-    void setImage(QImage img);
+    explicit MyLabel(QWidget* parent = 0);
+    void setImage(const QImage &img);
 
 protected:
-    virtual void paintEvent(QPaintEvent* event);
-    virtual void wheelEvent(QWheelEvent* event);
-    virtual void mousePressEvent(QMouseEvent*);
+    void paintEvent(QPaintEvent* event);
+    void wheelEvent(QWheelEvent* event);
+    void mousePressEvent(QMouseEvent*);
 
 private:
     QImage m_img;
@@ -61,18 +61,21 @@ class StopmotionMonitor : public AbstractMonitor
 {
     Q_OBJECT
 public:
-    StopmotionMonitor(QWidget *parent);
+    StopmotionMonitor(MonitorManager *manager, QWidget *parent);
     ~StopmotionMonitor();
     AbstractRender *abstractRender();
-    const QString name() const;
+    Kdenlive::MonitorId id() const;
     void setRender(MltDeviceCapture *render);
 
 private:
     MltDeviceCapture *m_captureDevice;
 
 public slots:
-    virtual void stop();
-    virtual void start();
+    void stop();
+    void start();
+    void slotPlay();
+    void slotMouseSeek(int eventDelta, bool fast);
+    void slotSwitchFullScreen();
 
 signals:
     void stopCapture();
@@ -89,7 +92,7 @@ public:
      * @param projectFolder The current project folder, where captured files will be stored.
      * @param actions The actions for this widget that can have a keyboard shortcut.
      * @param parent (optional) parent widget */
-    StopmotionWidget(MonitorManager *manager, KUrl projectFolder, QList< QAction* > actions, QWidget* parent = 0);
+    StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, const QList< QAction* > &actions, QWidget* parent = 0);
     virtual ~StopmotionWidget();
 
 protected:
@@ -102,10 +105,6 @@ private:
     /** @brief Capture holder that will handle all video operation. */
     MltDeviceCapture *m_captureDevice;
 
-    VideoPreviewContainer *m_videoBox;
-    
-    //CaptureHandler* m_bmCapture;
-
     /** @brief Holds the name of the current sequence.
      * Files will be saved in project folder with name: sequence001.png */
     QString m_sequenceName;
@@ -150,12 +149,18 @@ private:
 
     MonitorManager *m_manager;
 
+    /** @brief The monitor is used to control the v4l capture device from the monitormanager class. */
     StopmotionMonitor *m_monitor;
 
+    /** @brief Create the XML playlist. */
+    const QString createProducer(const MltVideoProfile &profile, const QString &service, const QString &resource);
+
+    /** @brief A new frame arrived, reload overlay. */
+    void reloadOverlay();
 
-#ifdef QIMAGEBLITZ
+    /** @brief Holds the index of the effect to be applied to the video feed. */
     int m_effectIndex;
-#endif
+
 
 public slots:
     /** @brief Display the live feed from capture device.
@@ -206,13 +211,13 @@ private slots:
     void slotGotHDMIMessage(const QString& message);
 
     /** @brief Create thumbnails for existing sequence frames. */
-    void slotCreateThumbs(QImage img, int ix);
+    void slotCreateThumbs(const QImage &img, int ix);
 
     /** @brief Prepare thumbnails creation. */
     void slotPrepareThumbs();
 
     /** @brief Called when user switches the video capture backend. */
-    void slotUpdateHandler();
+    void slotUpdateDeviceHandler();
 
     /** @brief Show / hide sequence thumbnails. */
     void slotShowThumbs(bool show);
@@ -221,7 +226,7 @@ private slots:
     void slotConfigure();
 
     /** @brief Prepare to crete thumb for newly captured frame. */
-    void slotNewThumb(const QString path);
+    void slotNewThumb(const QString &path);
 
     /** @brief Set the effect to be applied to overlay frame. */
     void slotUpdateOverlayEffect(QAction* act);
@@ -234,16 +239,19 @@ private slots:
     
     /** @brief Enable / disable frame analysis (in color scopes). */
     void slotSwitchAnalyse(bool isOn);
+
+    /** @brief Enable / disable horizontal mirror effect. */
+    void slotSwitchMirror(bool isOn);
     
     /** @brief Send a notification a few seconds before capturing. */
     void slotPreNotify();
 
 signals:
     /** @brief Ask to add sequence to current project. */
-    void addOrUpdateSequence(const QString);
+    void addOrUpdateSequence(const QString &);
 
-    void doCreateThumbs(QImage, int);
-    void gotFrame(QImage);
+    void doCreateThumbs(const QImage&, int);
+    void gotFrame(const QImage&);
 };
 
 #endif