]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.h
automatically select if we should export audio or not:
[kdenlive] / src / customtrackview.h
index 7ee271d300a8eb247f0636df2689c9ca714c9f32..9c7af680e614216e279fdb3c96f58fcb8f8cb4a6 100644 (file)
@@ -82,6 +82,7 @@ public:
     void activateMonitor();
     int duration() const;
     void deleteSelectedClips();
+    /** @brief Cuts all clips that are selected at the timeline cursor position. */
     void cutSelectedClips();
     void setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transition, QActionGroup *clipTypeGroup, QMenu *markermenu);
     void checkTrackHeight();
@@ -174,6 +175,11 @@ public:
     KPixmapCache* pixmapCache;
     /** update the timeline objects when palette changes */
     void updatePalette();
+    /** @brief Returns true if a track has audio data on it.
+    * @param track The track number
+    *
+    * Check whether given track has a clip with audio in it. */
+    bool hasAudio(int track) const;
 
 public slots:
     void setCursorPos(int pos, bool seek = true);
@@ -219,6 +225,25 @@ public slots:
     void slotSelectTrack(int ix);
     void insertZoneOverwrite(QStringList data, int in);
 
+    /** @brief Rebuilds a group to fit again after children changed.
+    * @param childTrack the track of one of the groups children
+    * @param childPos The position of the same child */
+    void rebuildGroup(int childTrack, GenTime childPos);
+    /** @brief Rebuilds a group to fit again after children changed.
+    * @param group The group to rebuild */
+    void rebuildGroup(AbstractGroupItem *group);
+
+    /** @brief Cuts a group into two parts.
+    * @param clips1 Clips before the cut
+    * @param transitions1 Transitions before the cut
+    * @param clipsCut Clips that need to be cut
+    * @param transitionsCut Transitions that need to be cut
+    * @param clips2 Clips behind the cut
+    * @param transitions2 Transitions behind the cut
+    * @param cutPos Absolute position of the cut
+    * @param cut true = cut, false = "uncut" */
+    void slotRazorGroup(QList <ItemInfo> clips1, QList <ItemInfo> transitions1, QList <ItemInfo> clipsCut, QList <ItemInfo> transitionsCut, QList <ItemInfo> clips2, QList <ItemInfo> transitions2, GenTime cutPos, bool cut);
+
 protected:
     virtual void drawBackground(QPainter * painter, const QRectF & rect);
     //virtual void drawForeground ( QPainter * painter, const QRectF & rect );
@@ -280,6 +305,8 @@ private:
     QActionGroup *m_clipTypeGroup;
     QTimer m_scrollTimer;
     QTimer m_thumbsTimer;
+    /** @brief Monitor for changes in timeline (do we have audio data) */
+    QTimer m_audioMonitorTimer;
     int m_scrollOffset;
     bool m_clipDrag;
 
@@ -307,8 +334,6 @@ private:
     bool canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
     ClipItem *getClipUnderCursor() const;
     AbstractClipItem *getMainActiveClip() const;
-    /** @brief Rebuilds @param group to fit changes to it's childen. */
-    void rebuildGroup(AbstractGroupItem *group);
     void resetSelectionGroup(bool selectItems = true);
     void groupSelectedItems(bool force = false, bool createNewGroup = false);
     /** Get available space for clip move (min and max free positions) */
@@ -325,7 +350,7 @@ private:
     void adjustTimelineTransitions(EDITMODE mode, Transition *item, QUndoCommand *command);
     /** Adjust keyframes when pasted to another clip */
     void adjustKeyfames(GenTime oldstart, GenTime newstart, GenTime duration, QDomElement xml);
-    
+
     /** @brief Removes the tip and stops the animation timer. */
     void removeTipAnimation();
     /** @brief Creates a new tip animation.
@@ -338,15 +363,22 @@ private:
     * @param item Item to resize
     * @param oldInfo The item's info before resizement (set to item->info() is @param check true)
     * @param pos New startPos
-    * @param check (optional, default = false) Whether to check for collisions */
-    void prepareResizeClipStart(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false);
+    * @param check (optional, default = false) Whether to check for collisions
+    * @param command (optional) Will be used as parent command (for undo history) */
+    void prepareResizeClipStart(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false, QUndoCommand *command = NULL);
 
     /** @brief Takes care of updating effects and attached transitions during a resize from end.
     * @param item Item to resize
     * @param oldInfo The item's info before resizement (set to item->info() is @param check true)
     * @param pos New endPos
-    * @param check (optional, default = false) Whether to check for collisions */
-    void prepareResizeClipEnd(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false);
+    * @param check (optional, default = false) Whether to check for collisions
+    * @param command (optional) Will be used as parent command (for undo history) */
+    void prepareResizeClipEnd(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false, QUndoCommand *command = NULL);
+
+    /** @brief Collects information about the group's children to pass it on to RazorGroupCommand.
+    * @param group The group to cut
+    * @param cutPos The absolute position of the cut */
+    void razorGroup(AbstractGroupItem *group, GenTime cutPos);
 
 private slots:
     void slotRefreshGuides();
@@ -376,6 +408,8 @@ signals:
     void updateClipMarkers(DocClipBase *);
     void updateTrackHeaders();
     void playMonitor();
+    /** @brief Monitor document changes (for example the presence of audio data in timeline for export widget.*/
+    void documentModified();
 };
 
 #endif