X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcustomtrackscene.h;h=386ec2f757ff0ec2c4eb6e60024db8ed131ae2f2;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=983548278b40c382668f2beb95d81b7222eac853;hpb=d43383d14efb17899c439d85c257f5be5d2a118e;p=kdenlive diff --git a/src/customtrackscene.h b/src/customtrackscene.h index 98354827..386ec2f7 100644 --- a/src/customtrackscene.h +++ b/src/customtrackscene.h @@ -17,6 +17,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ +/** + * @class CustomTrackScene + * @author Jean-Baptiste Mardelle + * @brief Holds all scene properties that need to be used by clip items. + */ #ifndef CUSTOMTRACKSCENE_H #define CUSTOMTRACKSCENE_H @@ -30,7 +35,13 @@ class KdenliveDoc; class MltVideoProfile; -/** This class holds all properties that need to be used by clip items */ +enum EditMode { + NormalEdit = 0, + OverwriteEdit = 1, + InsertEdit = 2 +}; + + class CustomTrackScene : public QGraphicsScene { @@ -38,20 +49,23 @@ class CustomTrackScene : public QGraphicsScene public: explicit CustomTrackScene(KdenliveDoc *doc, QObject *parent = 0); - virtual ~ CustomTrackScene(); - void setSnapList(QList snaps); - GenTime previousSnapPoint(GenTime pos); - GenTime nextSnapPoint(GenTime pos); + ~CustomTrackScene(); + void setSnapList(const QList & snaps); + GenTime previousSnapPoint(const GenTime &pos) const; + GenTime nextSnapPoint(const GenTime &pos) const; double getSnapPointForPos(double pos, bool doSnap = true); void setScale(double scale, double vscale); QPointF scale() const; int tracksCount() const; MltVideoProfile profile() const; + void setEditMode(EditMode mode); + EditMode editMode() const; private: KdenliveDoc *m_document; QList m_snapPoints; QPointF m_scale; + EditMode m_editMode; }; #endif