]> git.sesse.net Git - kdenlive/blob - src/stopmotion/stopmotion.h
* Add preliminary support for Blackmagic HDMI capture card
[kdenlive] / src / stopmotion / stopmotion.h
1 /***************************************************************************
2                           titlewidget.h  -  description
3                              -------------------
4     begin                : Feb 28 2008
5     copyright            : (C) 2008 by Marco Gittler
6     email                : g.marco@freenet.de
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef STOPMOTION_H
19 #define STOPMOTION_H
20
21 #include "ui_stopmotion_ui.h"
22 #include "../blackmagic/capture.h"
23
24 #include <KUrl>
25
26 class StopmotionWidget : public QDialog , public Ui::Stopmotion_UI
27 {
28     Q_OBJECT
29
30 public:
31
32     /** @brief Build the stopmotion dialog.
33      * @param projectFolder The current project folder, where captured files will be stored.
34      * @param parent (optional) parent widget */
35     StopmotionWidget(KUrl projectFolder, QWidget *parent = 0);
36     virtual ~StopmotionWidget();
37
38
39 protected:
40
41
42 private:
43   /** @brief Current project folder (where the captured frames will be saved). */
44   KUrl m_projectFolder;
45
46   /** @brief Capture holder that will handle all video operation. */
47   CaptureHandler *m_bmCapture;
48
49   /** @brief Holds the name of the current sequence.
50    * Files will be saved in project folder with name: sequence001.png */
51   QString m_sequenceName;
52
53   /** @brief Holds the frame number of the current sequence. */
54   int m_sequenceFrame;
55
56   QAction *m_captureAction;
57   
58 private slots:
59   /** @brief Display the live feed from capture device.
60    @param isOn enable or disable the feature */
61   void slotLive(bool isOn);
62
63   /** @brief Display the last captured frame over current live feed.
64    @param isOn enable or disable the feature */
65   void slotShowOverlay(bool isOn);
66
67   /** @brief Display the last captured frame over current live feed. */
68   void slotUpdateOverlay();
69
70   /** @brief User changed the capture name. */
71   void sequenceNameChanged(const QString &name);
72
73   /** @brief Grab a frame from current capture feed. */
74   void slotCaptureFrame();
75
76   /** @brief Display a previous frame in monitor. */
77   void slotShowFrame(int);
78
79   /** @brief Get full path for a frame in the sequence.
80    *  @param ix the frame number.
81    *  @param seqName (optional) the name of the sequence. */
82   QString getPathForFrame(int ix, QString seqName = QString());
83
84   /** @brief Add sequence to current project. */
85   void slotAddSequence();
86
87 signals:
88   /** @brief Ask to add sequence to current project. */
89   void addOrUpdateSequence(const QString);
90 };
91
92 #endif