X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftransition.h;h=4f9378181eb6ed91dc74045b7b7221187c85324b;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=a904d1d670fb03b9882a51175fa7ad9f9c68d7f4;hpb=74a50cb99d5215db8256af51d915d65dc276ea70;p=kdenlive diff --git a/src/transition.h b/src/transition.h index a904d1d6..4f937818 100644 --- a/src/transition.h +++ b/src/transition.h @@ -41,7 +41,7 @@ class Transition : public AbstractClipItem Q_OBJECT public: - Transition(const ItemInfo info, int transitiontrack, double fps, QDomElement params = QDomElement(), bool automaticTransition = false); + Transition(const ItemInfo &info, int transitiontrack, double fps, const QDomElement ¶ms = QDomElement(), bool automaticTransition = false); virtual ~Transition(); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, @@ -53,20 +53,14 @@ public: /** @brief Returns the track number of the transition in the playlist. */ int transitionEndTrack() const; - bool hasClip(const ClipItem * clip) const; - bool belongsToClip(const ClipItem * clip) const; - bool invertedTransition() const; QString transitionTag() const; QStringList transitionInfo() const; - OPERATIONTYPE operationMode(QPointF pos); + OperationType operationMode(const QPointF &pos); static int itemHeight(); static int itemOffset(); //const QMap < QString, QString > transitionParameters() const; - void setTransitionParameters(const QDomElement params); - void setTransitionDirection(bool inv); + void setTransitionParameters(const QDomElement ¶ms); void setTransitionTrack(int track); - //Transition *reparent(ClipItem * clip); - bool isValid() const; /** @brief Links the transition to another track. * @@ -74,14 +68,15 @@ public: void updateTransitionEndTrack(int newtrack); void setForcedTrack(bool force, int track); bool forcedTrack() const; - const ClipItem *referencedClip() const; Transition *clone(); bool isAutomatic() const; void setAutomatic(bool automatic); bool hasGeometry(); int defaultZValue() const; - /** @brief When a transition is resized, check if keyframes are out of the transition and fix if necessary. */ - bool updateKeyframes(); + /** @brief When a transition is resized, check if keyframes are out of the transition and fix if necessary. + * @param oldEnd the previous transition end, so that when we expand the transition, if there is a keyframe at end we move it + */ + bool updateKeyframes(int oldEnd); protected: virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); @@ -96,22 +91,13 @@ private: /** @brief Contains the transition parameters. */ QDomElement m_parameters; - /** @brief The clip to which the transition is attached. */ - ClipItem *m_referenceClip; - - /** @brief The second clip to which the transition is attached. */ - ClipItem *m_secondClip; int m_transitionTrack; /** @brief Returns the display name for a transition type. */ - QString getTransitionName(const TRANSITIONTYPE & type); + QString getTransitionName(const TransitionType & type); /** @brief Returns the transition type for a given name. */ - TRANSITIONTYPE getTransitionForName(const QString & type); - -#if QT_VERSION >= 0x040600 - QPropertyAnimation *m_startAnimation; -#endif + TransitionType getTransitionForName(const QString & type); }; #endif