#include <stdint.h>
-class VideoPreviewContainer : public QFrame
-{
- Q_OBJECT
-public:
- VideoPreviewContainer(QWidget *parent = 0);
- ~VideoPreviewContainer();
- /** @brief Set the image to be displayed, will be put in the queue. */
- void setImage(QImage img);
- /** @brief Start the display refresh timer. */
- void start();
- /** @brief Stop the display refresh timer. */
- void stop();
- /** @brief Set the display ratio for this display. */
- void setRatio(double ratio);
-
-protected:
- virtual void paintEvent(QPaintEvent */*event*/);
- virtual void resizeEvent(QResizeEvent * event);
-
-private:
- /** @brief The display aspect ratio for profile. */
- double m_dar;
- /** @brief When true, the whole widget surface will be repainted, useful when resizing widget. */
- bool m_refresh;
- /** @brief The rectangle defining the area for painting our image. */
- QRect m_displayRect;
- /** @brief The queue of images to be displayed. */
- QList <QImage *> m_imageQueue;
- /** @brief We refresh the image with a timer, since this widget is only for preview during capture. */
- QTimer m_refreshTimer;
- /** @brief Re-calculate the display zone after a resize or aspect ratio change. */
- void updateDisplayZone();
-};
-
+class MonitorManager;
class AbstractRender: public QObject
{
Q_OBJECT
public:
- AbstractMonitor(Kdenlive::MONITORID id, QWidget *parent = 0): QWidget(parent) {m_id = id;};
+ AbstractMonitor(Kdenlive::MONITORID id, MonitorManager *manager, QWidget *parent = 0);
Kdenlive::MONITORID id() {return m_id;};
virtual ~AbstractMonitor() {};
virtual AbstractRender *abstractRender() = 0;
-
+ virtual void pause() = 0;
+ virtual void unpause() = 0;
+ bool isActive() const;
+
public slots:
virtual void stop() = 0;
virtual void start() = 0;
+ virtual void slotPlay() = 0;
+ virtual void slotMouseSeek(int eventDelta, bool fast) = 0;
+ bool slotActivateMonitor();
+ virtual void slotSwitchFullScreen() = 0;
protected:
Kdenlive::MONITORID m_id;
+ MonitorManager *m_monitorManager;
};
+class VideoContainer : public QFrame
+{
+ Q_OBJECT
+public:
+ VideoContainer(AbstractMonitor *monitor, QWidget *parent = 0);
+ void switchFullScreen();
+
+protected:
+ virtual void mouseDoubleClickEvent(QMouseEvent * event);
+ virtual void mouseReleaseEvent(QMouseEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ virtual void wheelEvent(QWheelEvent * event);
+
+private:
+ Qt::WindowFlags m_baseFlags;
+ AbstractMonitor *m_monitor;
+};
+
+
#endif