X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcustomtrackview.h;h=835d15124296d8118b0bc4df61e8748a37a01623;hb=cba3c6aa64ce5d6f2bb993eedcc4e39979e50343;hp=0c950b54098811adf48efc3d4b9be0bc2ce0519f;hpb=c2ff32876591d3e015410ac619b4d8e3746571dc;p=kdenlive diff --git a/src/customtrackview.h b/src/customtrackview.h index 0c950b54..835d1512 100644 --- a/src/customtrackview.h +++ b/src/customtrackview.h @@ -58,8 +58,8 @@ public: void addTrack(TrackInfo type, int ix = -1); void removeTrack(int ix); /** @brief Makes the document use new track infos (name, type, ...). */ - void configTracks(QList trackInfos); - int cursorPos(); + void configTracks(const QList &trackInfos); + int cursorPos() const; void checkAutoScroll(); /** Move the clip at \c start to \c end. @@ -76,10 +76,12 @@ public: void deleteClip(ItemInfo info, bool refresh = true); void slotDeleteClipMarker(const QString &comment, const QString &id, const GenTime &position); void slotDeleteAllClipMarkers(const QString &id); - void addMarker(const QString &id, const CommentedTime marker); + void addMarker(const QString &id, const CommentedTime &marker); void addData(const QString &id, const QString &key, const QString &data); void setScale(double scaleFactor, double verticalScale); void deleteClip(const QString &clipId); + /** @brief An effect was dropped on @param clip */ + void slotDropEffect(ClipItem *clip, QDomElement effect, GenTime pos, int track); /** @brief Add effect to current clip */ void slotAddEffect(QDomElement effect, GenTime pos, int track); void slotAddGroupEffect(QDomElement effect, AbstractGroupItem *group, AbstractClipItem *dropTarget = NULL); @@ -103,7 +105,7 @@ public: void updateSceneFrameWidth(); //QList tracksList() const; void setTool(PROJECTTOOL tool); - ClipItem *cutClip(ItemInfo info, GenTime cutTime, bool cut, bool execute = true); + ClipItem *cutClip(ItemInfo info, GenTime cutTime, bool cut, EffectsList oldStack = EffectsList(), bool execute = true); void slotSeekToPreviousSnap(); void slotSeekToNextSnap(); double getSnapPointForPos(double pos); @@ -142,7 +144,7 @@ public: * * Makes sure no clip on track to lock is selected. */ void lockTrack(int ix, bool lock, bool requestUpdate = true); - void groupClips(bool group = true); + void groupClips(bool group = true, QList itemList = QList(), QUndoCommand *command = NULL); void doGroupClips(QList clipInfos, QList transitionInfos, bool group); void loadGroups(const QDomNodeList &groups); @@ -202,9 +204,15 @@ public: * Check whether given track has a clip with audio in it. */ bool hasAudio(int track) const; - int getFrameWidth(); + int getFrameWidth() const; /** @brief Returns last requested seeking pos (or SEEK_INACTIVE if no seek). */ int seekPosition() const; + + /** @brief Trigger a monitor refresh. */ + void monitorRefresh(); + + /** @brief Returns frame number of current mouse position. */ + int getMousePos() const; public slots: /** @brief Send seek request to MLT. */ @@ -242,7 +250,7 @@ public slots: /** @brief Shows a dialog for adding a guide. * @param dialog (default = true) false = do not show the dialog but use current position as position and comment */ void slotAddGuide(bool dialog = true); - void slotEditGuide(CommentedTime guide); + void slotEditGuide(const CommentedTime &guide); void slotEditGuide(int guidePos = -1); void slotDeleteGuide(int guidePos = -1); void slotDeleteAllGuides(); @@ -268,22 +276,11 @@ public slots: /** @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); + void rebuildGroup(int childTrack, const 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 clips1, QList transitions1, QList clipsCut, QList transitionsCut, QList clips2, QList transitions2, GenTime cutPos, bool cut); - /** @brief Add en effect to a track. * @param effect The new effect xml * @param ix The track index */ @@ -300,6 +297,12 @@ public slots: void updateSnapPoints(AbstractClipItem *selected, QList offsetList = QList (), bool skipSelectedItems = false); void slotAddEffect(ClipItem *clip, QDomElement effect); + void slotImportClipKeyframes(GRAPHICSRECTITEM type); + + /** @brief Get effect parameters ready for MLT*/ + static void adjustEffectParameters(EffectsParameterList ¶meters, QDomNodeList params, MltVideoProfile profile, const QString &prefix = QString()); + /** @brief Move playhead to mouse curser position if defined key is pressed */ + void slotAlignPlayheadToMousePos(); protected: virtual void drawBackground(QPainter * painter, const QRectF & rect); @@ -361,6 +364,8 @@ private: QAction *m_ungroupAction; QAction *m_editGuide; QAction *m_deleteGuide; + QList m_audioActions; + QList m_avActions; QActionGroup *m_clipTypeGroup; QTimer m_scrollTimer; QTimer m_thumbsTimer; @@ -381,6 +386,7 @@ private: int m_selectedTrack; int m_spacerOffset; + QMutex m_selectionMutex; QMutex m_mutex; QWaitCondition m_producerNotReady; KStatefulBrush m_activeTrackBrush; @@ -402,7 +408,7 @@ private: ClipItem *getClipUnderCursor() const; AbstractClipItem *getMainActiveClip() const; void resetSelectionGroup(bool selectItems = true); - void groupSelectedItems(bool force = false, bool createNewGroup = false); + void groupSelectedItems(QList selection = QList (), bool createNewGroup = false, bool selectNewGroup = false); /** Get available space for clip move (min and max free positions) */ void getClipAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum); /** Get available space for transition move (min and max free positions) */ @@ -474,9 +480,6 @@ private: /** @brief Prepare an add clip command for an effect */ void processEffect(ClipItem *item, QDomElement effect, int offset, QUndoCommand *effectCommand); - - /** @brief Get effect parameters ready for MLT*/ - void adjustEffectParameters(EffectsParameterList ¶meters, QDomNodeList params, const QString &prefix = QString()); private slots: void slotRefreshGuides(); @@ -494,7 +497,7 @@ private slots: * @param resetThumbs Should we recreate the timeline thumbnails. */ void slotRefreshThumbs(const QString &id, bool resetThumbs); /** @brief A Filter job producer results. */ - void slotGotFilterJobResults(const QString &id, int startPos, int track, const QString &filter, stringMap filterParams, QStringList extra); + void slotGotFilterJobResults(const QString &id, int startPos, int track, stringMap filterParams, stringMap extra); signals: @@ -525,6 +528,8 @@ signals: void updateTrackEffectState(int); /** @brief Cursor position changed, repaint ruler.*/ void updateRuler(); + /** @brief Send data from a clip to be imported as keyframes for effect / transition.*/ + void importKeyframes(GRAPHICSRECTITEM type, const QString&, int maximum); }; #endif