Commit 0f24121a authored by luyikei's avatar luyikei

Timeline: Implement markers

parent 63047e77
......@@ -4,11 +4,11 @@ Rectangle {
id: ruler
height: 52
width: parent.width - initPosOfCursor
x: initPosOfCursor
color: "#333333"
Column {
Rectangle {
id: markersArea
height: 9
width: ruler.width
color: "#666666"
......@@ -120,6 +120,27 @@ Rectangle {
}
}
DropArea {
id: markersDropArea
width: parent.width
height: markersArea.height
keys: ["Marker"]
onPositionChanged: {
drag.source.position = ptof( drag.x );
}
}
MouseArea {
id: markersMouseArea
width: parent.width
height: markersArea.height
onClicked: {
addMarker( ptof( mouseX ) );
}
}
Connections {
target: workflow
onFrameChanged: {
......
......@@ -178,7 +178,13 @@ Rectangle {
if ( tracks.get( tracks.count - 1 )["clips"].count > 0 )
addTrack( trackType );
}
function addMarker( pos )
{
markers.append( {
"position": pos
} );
}
function zoomIn( ratio ) {
......@@ -254,6 +260,10 @@ Rectangle {
}
}
ListModel {
id: markers
}
MouseArea {
id: selectionArea
width: parent.width - initPosOfCursor
......@@ -387,6 +397,14 @@ Rectangle {
height: page.height
x: initPosOfCursor
}
Repeater {
model: markers
delegate: Marker {
position: model.position
markerModel: model
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment