]> git.sesse.net Git - kdenlive/blobdiff - src/definitions.h
Scroll timeline when seeking near a border and also when dragging a clip, should...
[kdenlive] / src / definitions.h
index 56733d6534d0e2af4b1a7e2f373fc2c750216fa4..9ee7be59da5e64bf8c4cd8c9b106ab1651c4cb05 100644 (file)
 #ifndef DEFINITIONS_H
 #define DEFINITIONS_H
 
-#define FRAME_SIZE 90
-#define MAXCLIPDURATION 15000
+#include <KLocale>
 
-enum OPERATIONTYPE { NONE = 0, MOVE = 1, RESIZESTART = 2, RESIZEEND = 3, FADEIN = 4, FADEOUT = 5};
-enum CLIPTYPE { UNKNOWN = 0, AUDIO = 1, VIDEO = 2, AV = 3, COLOR = 4, IMAGE = 5, TEXT = 6, SLIDESHOW = 7, VIRTUAL = 8, PLAYLIST = 9};
+#include "gentime.h"
 
-struct TrackViewClip {
-    int startTime;
-    int duration;
-    int cropTime;
-    QString producer;
+const int FRAME_SIZE = 90;
+const int MAXCLIPDURATION = 15000;
+
+enum OPERATIONTYPE { NONE = 0, MOVE = 1, RESIZESTART = 2, RESIZEEND = 3, FADEIN = 4, FADEOUT = 5, TRANSITIONSTART = 6, TRANSITIONEND = 7, MOVEGUIDE = 8, KEYFRAME = 9, SEEK = 10};
+enum CLIPTYPE { UNKNOWN = 0, AUDIO = 1, VIDEO = 2, AV = 3, COLOR = 4, IMAGE = 5, TEXT = 6, SLIDESHOW = 7, VIRTUAL = 8, PLAYLIST = 9, FOLDER = 10};
+enum GRAPHICSRECTITEM { AVWIDGET = 70000 , LABELWIDGET , TRANSITIONWIDGET  , GROUPWIDGET};
+
+enum PROJECTTOOL { SELECTTOOL = 0 , RAZORTOOL = 1 };
+
+enum TRANSITIONTYPE {
+    /** TRANSITIONTYPE: between 0-99: video trans, 100-199: video+audio trans, 200-299: audio trans */
+    LUMA_TRANSITION = 0,
+    COMPOSITE_TRANSITION = 1,
+    PIP_TRANSITION = 2,
+    LUMAFILE_TRANSITION = 3,
+    MIX_TRANSITION = 200
+};
+
+enum MessageType {
+    DefaultMessage,
+    OperationCompletedMessage,
+    InformationMessage,
+    ErrorMessage
+};
+
+enum TRACKTYPE { AUDIOTRACK = 0, VIDEOTRACK = 1 };
+
+struct TrackInfo {
+    TRACKTYPE type;
+    bool isMute;
+    bool isBlind;
+};
+
+struct ItemInfo {
+    GenTime startPos;
+    GenTime endPos;
+    GenTime cropStart;
+    int track;
+};
+
+struct MltVideoProfile {
+    QString path;
+    QString description;
+    int frame_rate_num;
+    int frame_rate_den;
+    int width;
+    int height;
+    bool progressive;
+    int sample_aspect_num;
+    int sample_aspect_den;
+    int display_aspect_num;
+    int display_aspect_den;
 };
 
+class CommentedTime {
+public:
+    CommentedTime(): t(GenTime(0)) {}
+    CommentedTime(const GenTime time, QString comment)
+            : t(time), c(comment) { }
+
+    QString comment()   const          {
+        return (c.isEmpty() ? i18n("Marker") : c);
+    }
+    GenTime time() const          {
+        return t;
+    }
+    void    setComment(QString comm) {
+        c = comm;
+    }
+
+    /* Implementation of > operator; Works identically as with basic types. */
+    bool operator>(CommentedTime op) const {
+        return t > op.time();
+    }
+    /* Implementation of < operator; Works identically as with basic types. */
+    bool operator<(CommentedTime op) const {
+        return t < op.time();
+    }
+    /* Implementation of >= operator; Works identically as with basic types. */
+    bool operator>=(CommentedTime op) const {
+        return t >= op.time();
+    }
+    /* Implementation of <= operator; Works identically as with basic types. */
+    bool operator<=(CommentedTime op) const {
+        return t <= op.time();
+    }
+    /* Implementation of == operator; Works identically as with basic types. */
+    bool operator==(CommentedTime op) const {
+        return t == op.time();
+    }
+    /* Implementation of != operator; Works identically as with basic types. */
+    bool operator!=(CommentedTime op) const {
+        return t != op.time();
+    }
+
+private:
+    GenTime t;
+    QString c;
+
+
+};
 #endif