[Paraview] Press Apply Button from Toolbar

Jérôme jerome.velut at gmail.com
Sun Mar 21 16:36:18 EDT 2010


Finally, I got it. I had to use UpdateSelfAndAllInputs( ) from the
vtkSMProxy,
then set a representation of that proxy to visible (create one if
necessary),
then call render() on the application core instance and finally set the
modified
state of the underlying pqPipelineSource to UNMODIFIED (that switch off the
Apply button).

Well, sorry for that soliloquy. 'Hope it will help someone other than me!

Jerome

2010/3/21 Jérôme <jerome.velut at gmail.com>

> OK, let's go further on my investigations : I found that
> pqObjectInspectorWidget
> is responsible of emitting the 'accept' signal and implements also the
> 'onaccept'
> slot. The latter seems to do what I want! But I didn't find, for now, how
> to get
> an instance of the pqObjectInspectorWidget.
>
> Work and see...
> Jerome
>
> 2010/3/20 Jérôme <jerome.velut at gmail.com>
>
> Hi,
>>
>> I dig out this old thread when searching how to Update the pipeline from
>> code. In my
>> case, I don't want an auto-apply behaviour. But as soon as a special
>> interaction occurs,
>> I want the whole pipeline to update.
>> I tried different things I though suitable, but it was not:
>> - renderAllViews( true ) from a newly object-builder-created
>> pqPipelineSource
>> - UpdatePipeline from the same proxy
>> - Render from the underlying vtkRenderWindowInteractor
>>
>> I didn't find in the code what the click-apply-button signal actually
>> does.
>> What I want is to embed in a single clck on a image the following
>> interaction steps:
>> 1) add a PointSource to the server
>> 2) set the position in the image
>> 3) click the Apply button
>>
>> The first 2 steps are OK. Still remain the 3rd, which I have to do by
>> hand.
>> Reminder: I am *very* lazy!
>>
>> Thanks for your suggestions
>> Jerome
>>
>> 2009/2/3 Michael Geppert <MichaelGeppert at gmx.net>
>>
>> Hi David,
>>>
>>> thanks, I haven't tried the Auto Accept yet, I'm going to try it as soon
>>> as possible... It is still a workaround, is there any other possibility?
>>>
>>> Best regards,
>>> Michael
>>>
>>> David E DeMarle schrieb:
>>>
>>>  Does the Auto Accept toggle work for you?
>>>> It is under Options->General
>>>>
>>>>
>>>> On Mon, Feb 2, 2009 at 10:40 AM, Michael Geppert <
>>>> MichaelGeppert at gmx.net> wrote:
>>>>
>>>>
>>>>> Hi everyone,
>>>>>
>>>>> I wrote a toolbar plugin with a copy & paste function for filter
>>>>> pipelines.
>>>>> My toolbar button just copies the selected part of the pipeline to the
>>>>> selected source. Now I would like my filter to auto-press the apply
>>>>> button
>>>>> of every newly-created filter, is this possible somehow?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Michael Geppert
>>>>> _______________________________________________
>>>>> ParaView mailing list
>>>>> ParaView at paraview.org
>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> ParaView mailing list
>>> ParaView at paraview.org
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100321/0578eae8/attachment.htm>


More information about the ParaView mailing list