[vlmc-devel] GraphicsEffectItem.cpp: Implement menu action to set properties of an effect item.

Rohit Yadav git at videolan.org
Wed Jul 27 19:29:48 CEST 2011


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Wed Jul 27 23:16:06 2011 +0530| [4b9f1ba11727c0722ca71dc80ac35c39d7e0ced1] | committer: Rohit Yadav

GraphicsEffectItem.cpp: Implement menu action to set properties of an effect item.
Reuses EffectInstanceWidget for setting the values.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=4b9f1ba11727c0722ca71dc80ac35c39d7e0ced1
---

 src/Gui/timeline/GraphicsEffectItem.cpp |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/Gui/timeline/GraphicsEffectItem.cpp b/src/Gui/timeline/GraphicsEffectItem.cpp
index 1aba88f..a1406cd 100644
--- a/src/Gui/timeline/GraphicsEffectItem.cpp
+++ b/src/Gui/timeline/GraphicsEffectItem.cpp
@@ -26,6 +26,7 @@
 #include "Commands.h"
 #include "EffectHelper.h"
 #include "EffectInstance.h"
+#include "EffectInstanceWidget.h"
 #include "GraphicsTrack.h"
 #include "Timeline.h"
 #include "TracksScene.h"
@@ -327,8 +328,10 @@ GraphicsEffectItem::contextMenuEvent( QGraphicsSceneContextMenuEvent *event )
 
     QMenu menu( tracksView() );
 
-    QAction* removeAction = menu.addAction( "Remove" );
-    QAction* changeColorAction = menu.addAction( "Set color" );
+    QAction* removeAction = menu.addAction( tr( "Remove" ) );
+    QAction* changeColorAction = menu.addAction( tr( "Set color" ) );
+    menu.addSeparator();
+    QAction* changeEffectProperties = menu.addAction( tr( "Effect Properties" ) );
 
     QAction* selectedAction = menu.exec( event->screenPos() );
     if ( !selectedAction )
@@ -341,6 +344,12 @@ GraphicsEffectItem::contextMenuEvent( QGraphicsSceneContextMenuEvent *event )
         m_itemColor = QColorDialog::getColor( m_itemColor, tracksView() );
         update();
     }
+    else if ( selectedAction == changeEffectProperties )
+    {
+        EffectInstanceWidget *effectProperties = new EffectInstanceWidget();
+        effectProperties->setEffectInstance( m_effectHelper->effectInstance() );
+        effectProperties->show();
+    }
 }
 
 void



More information about the Vlmc-devel mailing list