#include "gentime.h"
+#include "renderer.h"
#include "timecodedisplay.h"
+#include "abstractmonitor.h"
#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
#include "videoglwidget.h"
#endif
#include <KAction>
#include <KRestrictedLine>
-
-class MonitorManager;
-class Render;
class SmallRuler;
class DocClipBase;
class AbstractClipItem;
class Transition;
class ClipItem;
class MonitorEditWidget;
-
class Monitor;
+class MonitorManager;
class VideoContainer : public QFrame
{
void setRenderer(Render* render);
protected:
- virtual void paintEvent(QPaintEvent *event);
+ virtual void resizeEvent(QResizeEvent *event);
private:
Render *m_renderer;
void editMarker();
};
-class Monitor : public QWidget
+class Monitor : public AbstractMonitor
{
Q_OBJECT
public:
Monitor(QString name, MonitorManager *manager, QString profile = QString(), QWidget *parent = 0);
- virtual ~Monitor();
+ ~Monitor();
Render *render;
- void resetProfile(const QString profile);
- QString name() const;
+ AbstractRender *abstractRender();
+ void resetProfile(const QString &profile);
+ const QString name() const;
void resetSize();
bool isActive() const;
void pause();
DocClipBase *m_currentClip;
SmallRuler *m_ruler;
Overlay *m_overlay;
- bool m_isActive;
double m_scale;
int m_length;
bool m_dragStarted;
/** true if selected clip is transition, false = selected clip is clip.
* Necessary because sometimes we get two signals, e.g. we get a clip and we get selected transition = NULL. */
bool m_loopClipTransition;
+
#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
VideoGLWidget *m_glWidget;
bool createOpenGlWidget(QWidget *parent, const QString profile);
public slots:
void slotOpenFile(const QString &);
- void slotSetXml(DocClipBase *clip, QPoint zone = QPoint(), const int position = -1);
+ void slotSetClipProducer(DocClipBase *clip, QPoint zone = QPoint(), int position = -1);
+ void updateClipProducer(Mlt::Producer *prod);
void refreshMonitor(bool visible);
void refreshMonitor();
void slotSeek(int pos);
signals:
void renderPosition(int);
void durationChanged(int);
- void refreshClipThumbnail(const QString &);
+ void refreshClipThumbnail(const QString &, bool);
void adjustMonitorSize();
void zoneUpdated(QPoint);
- void saveZone(Render *, QPoint);
+ void saveZone(Render *, QPoint, DocClipBase *);
/** @brief Editing transitions / effects over the monitor requires the renderer to send frames as QImage.
* This causes a major slowdown, so we only enable it if required */
void requestFrameForAnalysis(bool);