]> git.sesse.net Git - kdenlive/blobdiff - src/monitor.h
const'ref
[kdenlive] / src / monitor.h
index 0fe6d50ae7ddcfc07be0c67117dcb3935d7e4424..40414dd70c43205efd54d40c8a95b2b164e51fd5 100644 (file)
 #include <QLabel>
 #include <QDomElement>
 #include <QToolBar>
-#include <QSlider>
 
 #include <KIcon>
-#include <KAction>
-#include <KRestrictedLine>
 
 class SmallRuler;
 class DocClipBase;
@@ -47,6 +44,7 @@ class ClipItem;
 class MonitorEditWidget;
 class Monitor;
 class MonitorManager;
+class QSlider;
 
 
 class Overlay : public QLabel
@@ -57,9 +55,9 @@ public:
     void setOverlayText(const QString &, bool isZone = true);
 
 protected:
-    virtual void mouseDoubleClickEvent ( QMouseEvent * event );
-    virtual void mousePressEvent ( QMouseEvent * event );
-    virtual void mouseReleaseEvent ( QMouseEvent * event );
+    void mouseDoubleClickEvent ( QMouseEvent * event );
+    void mousePressEvent ( QMouseEvent * event );
+    void mouseReleaseEvent ( QMouseEvent * event );
     
 signals:
     void editMarker();
@@ -75,6 +73,7 @@ public:
     Render *render;
     AbstractRender *abstractRender();
     void resetProfile(const QString &profile);
+    void setCustomProfile(const QString &profile, const Timecode &tc);
     void resetSize();
     void pause();
     void unpause();
@@ -85,25 +84,35 @@ public:
     void checkOverlay();
     void updateTimecodeFormat();
     void updateMarkers(DocClipBase *source);
+    void setMarkers(const QList <CommentedTime> &markers);
     MonitorEditWidget *getEffectEdit();
     QWidget *container();
     void reloadProducer(const QString &id);
     QFrame *m_volumePopup;
+    /** @brief Reimplemented from QWidget, updates the palette colors. */
+    void setPalette ( const QPalette & p);
+    /** @brief Returns a hh:mm:ss timecode from a frame number. */
+    QString getTimecodeFromFrames(int pos);
+    /** @brief Returns current project's fps. */
+    double fps() const;
+    /** @brief Get url for the clip's thumbnail */
+    QString getMarkerThumb(GenTime pos);
 
 protected:
-    virtual void mousePressEvent(QMouseEvent * event);
-    virtual void mouseReleaseEvent(QMouseEvent * event);
-    virtual void mouseDoubleClickEvent(QMouseEvent * event);
-    virtual void resizeEvent(QResizeEvent *event);
+    void mousePressEvent(QMouseEvent * event);
+    void mouseReleaseEvent(QMouseEvent * event);
+    void mouseDoubleClickEvent(QMouseEvent * event);
+    void resizeEvent(QResizeEvent *event);
 
     /** @brief Move to another position on mouse wheel event.
      *
      * Moves towards the end of the clip/timeline on mouse wheel down/back, the
      * opposite on mouse wheel up/forward.
      * Ctrl + wheel moves by a second, without Ctrl it moves by a single frame. */
-    virtual void wheelEvent(QWheelEvent * event);
-    virtual void mouseMoveEvent(QMouseEvent *event);
+    void wheelEvent(QWheelEvent * event);
+    void mouseMoveEvent(QMouseEvent *event);
     virtual QStringList mimeTypes() const;
+   
     /*virtual void dragMoveEvent(QDragMoveEvent * event);
     virtual Qt::DropActions supportedDropActions() const;*/
 
@@ -111,7 +120,6 @@ protected:
     //virtual void paintEvent(QPaintEvent * event);
 
 private:
-    Kdenlive::MONITORID m_name;
     DocClipBase *m_currentClip;
     SmallRuler *m_ruler;
     Overlay *m_overlay;
@@ -130,7 +138,6 @@ private:
     QMenu *m_markerMenu;
     QPoint m_DragStartPosition;
     MonitorEditWidget *m_effectWidget;
-    VideoContainer *m_videoBox;
     /** Selected clip/transition in timeline. Used for looping it. */
     AbstractClipItem *m_selectedClip;
     /** true if selected clip is transition, false = selected clip is clip.
@@ -139,7 +146,7 @@ private:
 
 #ifdef USE_OPENGL
     VideoGLWidget *m_glWidget;
-    bool createOpenGlWidget(QWidget *parent, const QString profile);
+    bool createOpenGlWidget(QWidget *parent, const QString &profile);
 #endif
 
     GenTime getSnapForPos(bool previous);
@@ -158,7 +165,7 @@ private slots:
     void slotSetSizeOneToTwo();
     void slotSaveZone();
     void slotSeek();
-    void setClipZone(QPoint pos);
+    void setClipZone(const QPoint &pos);
     void slotSwitchMonitorInfo(bool show);
     void slotSwitchDropFrames(bool show);
     void slotGoToMarker(QAction *action);
@@ -185,7 +192,7 @@ public slots:
     void slotRewind(double speed = 0);
     void slotRewindOneFrame(int diff = 1);
     void slotForwardOneFrame(int diff = 1);
-    void saveSceneList(QString path, QDomElement info = QDomElement());
+    void saveSceneList(const QString &path, const QDomElement &info = QDomElement());
     void slotStart();
     void slotEnd();
     void slotSetZoneStart();
@@ -198,7 +205,8 @@ public slots:
     void adjustRulerSize(int length);
     void setTimePos(const QString &pos);
     QStringList getZoneInfo() const;
-    void slotEffectScene(bool show = true);
+    /** @brief Display the on monitor effect scene (to adjust geometry over monitor). */
+    void slotShowEffectScene(bool show = true, bool manuallyTriggered = false);
     bool effectSceneDisplayed();
 
     /** @brief Sets m_selectedClip to @param item. Used for looping it. */
@@ -213,13 +221,13 @@ signals:
     void durationChanged(int);
     void refreshClipThumbnail(const QString &, bool);
     void adjustMonitorSize();
-    void zoneUpdated(QPoint);
-    void saveZone(Render *, QPoint, DocClipBase *);
+    void zoneUpdated(const QPoint&);
+    void saveZone(Render *, const 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);
     /** @brief Request a zone extraction (ffmpeg transcoding). */
-    void extractZone(const QString &id, QPoint zone);
+    void extractZone(const QString &id, const QPoint &zone);
 };
 
 #endif