[vlmc-devel] ClipContextMenu: Add Delete
Yikai Lu
git at videolan.org
Sat Jul 23 17:12:27 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul 23 23:35:44 2016 +0900| [ed4b22656e0aa3880b04a06a97f9327a4ceb09ca] | committer: Yikai Lu
ClipContextMenu: Add Delete
> https://code.videolan.org/videolan/vlmc/commit/ed4b22656e0aa3880b04a06a97f9327a4ceb09ca
---
src/Gui/timeline/ClipContextMenu.qml | 22 ++++++++++++++++++++++
src/Gui/timeline/main.qml | 4 ++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/Gui/timeline/ClipContextMenu.qml b/src/Gui/timeline/ClipContextMenu.qml
index f9baf87..35a5aff 100644
--- a/src/Gui/timeline/ClipContextMenu.qml
+++ b/src/Gui/timeline/ClipContextMenu.qml
@@ -1,5 +1,6 @@
import QtQuick 2.0
import QtQuick.Controls 1.4
+import QtQuick.Dialogs 1.2
Menu {
id: clipContextMenu
@@ -36,6 +37,27 @@ Menu {
}
}
+ MenuSeparator { }
+
+ MenuItem {
+ text: "Delete"
+
+ onTriggered: {
+ removeClipDialog.visible = true;
+ }
+ }
+
+ MessageDialog {
+ id: removeClipDialog
+ title: "VLMC"
+ text: qsTr( "Do you really want to remove the clip?" )
+ icon: StandardIcon.Question
+ standardButtons: StandardButton.Yes | StandardButton.No
+ onYes: {
+ workflow.removeClip( clip.uuid );
+ }
+ }
+
onAboutToShow: {
grouped = findGroup( clip.uuid );
}
diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
index d7a3144..9f7ac9f 100644
--- a/src/Gui/timeline/main.qml
+++ b/src/Gui/timeline/main.qml
@@ -459,7 +459,7 @@ Rectangle {
}
MessageDialog {
- id: removeClipDialog
+ id: removeSelectedClipsDialog
title: "VLMC"
text: qsTr( "Do you really want to remove selected clips?" )
icon: StandardIcon.Question
@@ -472,7 +472,7 @@ Rectangle {
Keys.onPressed: {
if ( event.key === Qt.Key_Delete ) {
- removeClipDialog.visible = true;
+ removeSelectedClipsDialog.visible = true;
}
else if ( event.key === Qt.Key_Plus && event.modifiers & Qt.ControlModifier )
{
More information about the Vlmc-devel
mailing list