TimeLineMarker Class Reference

The TimelineMarker JavaScript global object. Remove or edit timeline markers. More...

Public Slots

QScriptValue createMarker (QScriptValue marker)
 
QScriptValue setMarker (QScriptValue marker)
 
bool deleteMarker (QScriptValue marker)
 
QScriptValue getMarkers ()
 

Detailed Description

The TimelineMarker JavaScript global object. Remove or edit timeline markers.

This interface is used to access the functionalities of the Timeline Markers such as create/remove/edit markers.

Note
The colour for a timeline marker can be defined either by an integer representing an RGBA value at 8 bit per channel, or a color keyword name as defined by the World Wide Web Consortium.
function addMarkerAtFrame(int frame){
var mLength = 0;
var mColor = "red";
var marker = {frame:1, length:mLength, color:mColor};
TimelineMarker.createMarker(marker);
}

Member Function Documentation

◆ createMarker

QScriptValue TimeLineMarker::createMarker ( QScriptValue  marker)
slot

Creates a marker.

Parameters
marker- The marker to create. A marker object has the following properties:
Property Type Description
frame int The number of the frame.
length int (Optional) The length of the marker.
color int or String (Optional) The colour of the marker. Can be an integer RGBA value or a standard W3C colour keyword name in a string.
notes String (Optional) Notes for the marker
Returns
the newly created marker.

◆ deleteMarker

bool TimeLineMarker::deleteMarker ( QScriptValue  marker)
slot

Delete the marker

Parameters
marker- The marker to delete.
Returns
true if the marker was successfully deleted, false if not.

◆ getMarkers

QScriptValue TimeLineMarker::getMarkers ( )
slot

Return the all the markers in the current Timeline.

Returns
an array of markers.

◆ setMarker

QScriptValue TimeLineMarker::setMarker ( QScriptValue  marker)
slot

Modifies a marker with marker object.

Parameters
marker- The marker object to replace the marker with.
Returns
the modified marker object.