]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.cpp
Cleanup track actions, add "Select all clips in a track" and "Select all clips in...
[kdenlive] / src / customtrackview.cpp
index fd6d7084f35dbf459208f2017e3c79b01c1dd2bb..08b98cc26a3869c5c251e5f4f938f910143556ce 100644 (file)
@@ -6343,6 +6343,29 @@ void CustomTrackView::slotSelectTrack(int ix)
     viewport()->update();
 }
 
+void CustomTrackView::slotSelectClipsInTrack()
+{
+    QRectF rect(0, m_selectedTrack * m_tracksHeight + m_tracksHeight / 2, sceneRect().width(), m_tracksHeight / 2 - 1);
+    QList<QGraphicsItem *> selection = m_scene->items(rect);
+    m_scene->clearSelection();
+    for (int i = 0; i < selection.count(); i++) {
+        if (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET) {
+            selection.at(i)->setSelected(true);
+        }
+    }    
+}
+
+void CustomTrackView::slotSelectAllClips()
+{
+    QList<QGraphicsItem *> selection = m_scene->items();
+    m_scene->clearSelection();
+    for (int i = 0; i < selection.count(); i++) {
+        if (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET) {
+            selection.at(i)->setSelected(true);
+        }
+    }  
+}
+
 void CustomTrackView::selectClip(bool add, bool group, int track, int pos)
 {
     QRectF rect;