[vlmc-devel] TransitionItem.qml: Implement a dialog for removing a transition
Yikai Lu
git at videolan.org
Thu Aug 10 20:51:55 CEST 2017
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Aug 11 03:25:36 2017 +0900| [141beca333e199f662bc3287766044239f598f30] | committer: Yikai Lu
TransitionItem.qml: Implement a dialog for removing a transition
> https://code.videolan.org/videolan/vlmc/commit/141beca333e199f662bc3287766044239f598f30
---
src/Gui/timeline/TransitionItem.qml | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/Gui/timeline/TransitionItem.qml b/src/Gui/timeline/TransitionItem.qml
index fbebf903..1cfa09c0 100644
--- a/src/Gui/timeline/TransitionItem.qml
+++ b/src/Gui/timeline/TransitionItem.qml
@@ -1,4 +1,6 @@
import QtQuick 2.0
+import QtQuick.Controls 1.4
+import QtQuick.Dialogs 1.2
Rectangle {
id: transition
@@ -153,6 +155,12 @@ Rectangle {
workflow.moveTransitionBetweenTracks( uuid, trackId - 1, trackId );
}
+ onClicked: {
+ if ( mouse.button & Qt.RightButton ) {
+ transitionContextMenu.popup();
+ }
+ }
+
states: [
State {
name: "Move"
@@ -171,4 +179,28 @@ Rectangle {
}
]
}
+
+ Menu {
+ id: transitionContextMenu
+ title: "Edit"
+
+ MenuItem {
+ text: "Delete"
+
+ onTriggered: {
+ removeTransitionDialog.visible = true;
+ }
+ }
+
+ MessageDialog {
+ id: removeTransitionDialog
+ title: "VLMC"
+ text: qsTr( "Do you really want to remove the transition?" )
+ icon: StandardIcon.Question
+ standardButtons: StandardButton.Yes | StandardButton.No
+ onYes: {
+ workflow.removeTransition( uuid );
+ }
+ }
+ }
}
More information about the Vlmc-devel
mailing list