X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmonitor.h;h=ba949ff0417a35a427af682d44ce705c0d849861;hb=6c74a57534cb16a553be26517d12cd633de35ca6;hp=6e06f685bf08f9ec8558b92179643f55571fc39c;hpb=ac5f5c9f6d4bdffeb76f3f2098b80f27bc532606;p=kdenlive diff --git a/src/monitor.h b/src/monitor.h index 6e06f685..ba949ff0 100644 --- a/src/monitor.h +++ b/src/monitor.h @@ -25,7 +25,7 @@ #include "renderer.h" #include "timecodedisplay.h" #include "abstractmonitor.h" -#if defined(Q_WS_MAC) || defined(USE_OPEN_GL) +#ifdef USE_OPENGL #include "videoglwidget.h" #endif @@ -74,16 +74,8 @@ public: MonitorRefresh(QWidget *parent = 0); void setRenderer(Render* render); -protected: - virtual void paintEvent(QPaintEvent *event); - private: Render *m_renderer; - -signals: - void switchFullScreen(); - void switchPlay(); - void mouseSeek(int, bool); }; class Overlay : public QLabel @@ -114,7 +106,7 @@ public: ~Monitor(); Render *render; AbstractRender *abstractRender(); - void resetProfile(const QString profile); + void resetProfile(const QString &profile); const QString name() const; void resetSize(); bool isActive() const; @@ -133,6 +125,7 @@ public: protected: virtual void mousePressEvent(QMouseEvent * event); virtual void mouseReleaseEvent(QMouseEvent * event); + virtual void resizeEvent(QResizeEvent *event); /** @brief Move to another position on mouse wheel event. * @@ -176,7 +169,8 @@ private: /** 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) + +#ifdef USE_OPENGL VideoGLWidget *m_glWidget; bool createOpenGlWidget(QWidget *parent, const QString profile); #endif @@ -207,13 +201,14 @@ private slots: 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); void stop(); void start(); - void activateMonitor(); + bool activateMonitor(); void slotPlay(); void slotPlayZone(); void slotLoopZone(); @@ -252,7 +247,7 @@ signals: 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);