1 #ifndef ADM_qtScript_Segment 2 #define ADM_qtScript_Segment 3 4 #include "ADM_inttype.h" 5 #include "QtScriptObject.h" 6 7 namespace ADM_qtScript 8 { 9 /** \brief The Segment %class holds the properties of a video segment. 10 */ 11 class Segment : public QtScriptObject 12 { 13 Q_OBJECT 14 15 private: 16 uint32_t _videoIndex; 17 uint64_t _duration, _absoluteStartTime, _relativeStartTime; 18 19 QScriptValue getAbsoluteStartTime(void); 20 QScriptValue getDuration(void); 21 QScriptValue getRelativeStartTime(void); 22 QScriptValue getVideoIndex(void); 23 24 public: 25 /** \cond */ 26 Segment(IEditor *editor, _SEGMENT* segment); 27 /** \endcond */ 28 29 /** \brief Returns the start time (in milliseconds) of the video segment in the editor. 30 */ 31 Q_PROPERTY(QScriptValue /*% Number %*/ absoluteStartTime READ getAbsoluteStartTime); 32 33 /** \brief Returns the duration (in milliseconds) of the video segment. 34 */ 35 Q_PROPERTY(QScriptValue /*% Number %*/ duration READ getDuration); 36 37 /** \brief Returns the start time (in milliseconds) of the video segment relative to the source video file. 38 */ 39 Q_PROPERTY(QScriptValue /*% Number %*/ relativeStartTime READ getRelativeStartTime); 40 41 /** \brief Returns a zero-based index of the video file from which the video segment is sourced. 42 * 43 * \sa Editor.videoProperties 44 */ 45 Q_PROPERTY(QScriptValue /*% Number %*/ videoIndex READ getVideoIndex); 46 }; 47 } 48 #endif 49