The TimelineMarker JavaScript global object. Remove or edit timeline markers.
More...
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};
}
◆ 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. |
name | String | (Optional) Name for the marker |
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.
◆ getAllMarkers
QScriptValue TimelineMarker::getAllMarkers |
( |
| ) |
|
|
slot |
Returns all the markers in the current Timeline.
- Returns
- an array of markers.
◆ getFirstMarkerAt
QScriptValue TimelineMarker::getFirstMarkerAt |
( |
int |
atFrame | ) |
|
|
slot |
Return a markers in the current Timeline that overlap the given frame.
- Returns
- a marker.
◆ getMarkersAtFrame
QScriptValue TimelineMarker::getMarkersAtFrame |
( |
int |
atFrame | ) |
|
|
slot |
Return all the markers in the current Timeline that overlap the given frame.
- 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.