Commit 4b9f1ba1 authored by Rohit Yadav's avatar Rohit Yadav

GraphicsEffectItem.cpp: Implement menu action to set properties of an effect item.

Reuses EffectInstanceWidget for setting the values.
parent 64bd0d80
......@@ -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
......
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