[Paraview-developers] Changing context menu of a view from a plugin
Jérôme
jerome.velut at gmail.com
Fri Apr 22 08:00:42 EDT 2011
Thanks Utkarsh !
> To get rid of the existing behavior, you can do something like:
>
> delete mainWindow->findChild<pqPipelineContextMenuBehavior*>()
Very good: I will try it very soon.
>> I also would like the buildMenu function to be called everytime, not
>> only when a pqDataRepresentation is picked. Should I submit a patch?
>
> That may need some restructuring, since ParaView doesn't want this. We
> want the "view-based" context menu when clicking in empty spaces. But
> it's doable.
I submitted a patch (http://public.kitware.com/Bug/view.php?id=12120)
that keeps the different behaviours depending on where the click
occurs (empty space or not). This is a simple refactorization of
buildMenu and eventFilter, but I am now able to override it in my
derived class. The interface of pqPipelineContexMenuBehaviour is not
changed. I tested this modification on Linux only.
>> Subsidiary question: right clicking on an ImageSlice representation
>> makes the eventFilter to behave as nothing were found... Is it on
>> purpose?
>
> Some representations such as slice/outline cannot be selected yet.
> Since the context menu depends on the selection mechanism, it cannot
> work unless that feature is implemented. I has been in our todo list
> for sometime, but has not been high on the priority queue.
>
Isn't it possible to mimic the 'P'- key event of a point source?
Though I suspect deep differences between client and server event
mechanism, could it be a workaround ?
Thanks a lot, Utkarsh !
Jerome
More information about the Paraview-developers
mailing list