]> git.sesse.net Git - kdenlive/blobdiff - src/monitor.h
simplify monitor overlay info
[kdenlive] / src / monitor.h
index 23a41c2045961ace269f9a74163fe087e0e55890..898754ee0acac5231c5d2e3fd79486180823bb27 100644 (file)
@@ -30,6 +30,9 @@
 
 #include "gentime.h"
 #include "ui_monitor_ui.h"
+#ifdef Q_WS_MAC
+#include "videoglwidget.h"
+#endif
 
 class MonitorManager;
 class Render;
@@ -53,7 +56,6 @@ class Overlay : public QLabel
     Q_OBJECT
 public:
     Overlay(QWidget* parent);
-    virtual void paintEvent(QPaintEvent * event);
     void setOverlayText(const QString &, bool isZone = true);
 
 private:
@@ -65,10 +67,10 @@ class Monitor : public QWidget
     Q_OBJECT
 
 public:
-    Monitor(QString name, MonitorManager *manager, QWidget *parent = 0);
+    Monitor(QString name, MonitorManager *manager, QString profile = QString(), QWidget *parent = 0);
     virtual ~Monitor();
     Render *render;
-    void resetProfile();
+    void resetProfile(const QString profile);
     QString name() const;
     void resetSize();
     bool isActive() const;
@@ -78,41 +80,55 @@ public:
     DocClipBase *activeClip();
     GenTime position();
     void checkOverlay();
+    void updateTimecodeFormat();
+    void updateMarkers(DocClipBase *source);
 
 protected:
     virtual void mousePressEvent(QMouseEvent * event);
     virtual void mouseReleaseEvent(QMouseEvent * 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 single frame, without Ctrl it moves by a second.
+     *
+     * See also http://www.kdenlive.org/mantis/view.php?id=265. */
     virtual void wheelEvent(QWheelEvent * event);
     virtual void mouseMoveEvent(QMouseEvent *event);
     virtual QStringList mimeTypes() const;
-    /*    virtual void dragMoveEvent(QDragMoveEvent * event);
-        virtual Qt::DropActions supportedDropActions() const;*/
+    /*virtual void dragMoveEvent(QDragMoveEvent * event);
+    virtual Qt::DropActions supportedDropActions() const;*/
 
-//    virtual void resizeEvent(QResizeEvent * event);
-//    virtual void paintEvent(QPaintEvent * event);
+    //virtual void resizeEvent(QResizeEvent * event);
+    //virtual void paintEvent(QPaintEvent * event);
 
 private:
-    Ui::Monitor_UI ui;
-    MonitorManager *m_monitorManager;
-    MonitorRefresh *m_monitorRefresh;
+    Ui::Monitor_UI m_ui;
     QString m_name;
+    MonitorManager *m_monitorManager;
+    DocClipBase *m_currentClip;
+    SmallRuler *m_ruler;
+    Overlay *m_overlay;
+    bool m_isActive;
     double m_scale;
     int m_length;
-    int m_position;
-    SmallRuler *m_ruler;
+    bool m_dragStarted;
+    MonitorRefresh *m_monitorRefresh;
     KIcon m_playIcon;
     KIcon m_pauseIcon;
-    bool m_isActive;
     KRestrictedLine *m_timePos;
     QAction *m_playAction;
     QMenu *m_contextMenu;
     QMenu *m_configMenu;
     QMenu *m_playMenu;
-    DocClipBase *m_currentClip;
+    QMenu *m_markerMenu;
     QPoint m_DragStartPosition;
-    bool m_dragStarted;
-    Overlay *m_overlay;
+#ifdef Q_WS_MAC
+    VideoGLWidget *m_glWidget;
+#endif
     GenTime getSnapForPos(bool previous);
+    bool m_frametimecode;
 
 private slots:
     void seekCursor(int pos);
@@ -125,12 +141,14 @@ private slots:
     void slotSeek();
     void setClipZone(QPoint pos);
     void slotSwitchMonitorInfo(bool show);
+    void slotSwitchDropFrames(bool show);
+    void slotGoToMarker(QAction *action);
 
 public slots:
     void slotOpenFile(const QString &);
-    void slotSetXml(DocClipBase *clip, const int position = -1);
+    void slotSetXml(DocClipBase *clip, QPoint zone = QPoint(), const int position = -1);
     void initMonitor();
-    void refreshMonitor(bool visible);
+    void refreshMonitor(bool visible = true);
     void slotSeek(int pos);
     void stop();
     void start();
@@ -153,6 +171,8 @@ public slots:
     void slotSeekToNextSnap();
     void slotSeekToPreviousSnap();
     void adjustRulerSize(int length);
+    void setTimePos(const QString &pos);
+    QStringList getZoneInfo() const;
 
 signals:
     void renderPosition(int);