[Paraview-developers] ParaView XML menu - some queries

Chiranjib Sur sur.chiranjib at gmail.com
Tue Dec 8 13:05:17 EST 2015


Hi Utkarsh,
I am revisiting this section now. I was wondering if you or anybody else in
your team ever considered to give some code snippets in the wiki page? For
example, when I browse the wiki section you have mentioned, it would have
been really helpful if once could browse the code snippet for the
corresponding screenshot (or the pointer to the code snippets from the PV
code base).
Just a suggestions.

Thanks,
Chiranjib

On Sat, Sep 5, 2015 at 12:31 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:

> Utkarsh,
> Thank you so much for the pointers. Let me try these, and I will keep you
> posted if I face any difficulties.
>
> Thanks,
> Chiranjib
>
> On Fri, Sep 4, 2015 at 7:15 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> Chiranjib
>>
>>
>>> 1. Enable a checkbox and a corresponding passive button become active,
>>> e.g. (fig from left to fig at right)
>>>
>>> [image: Inline image 1]
>>>
>>>
>> In this particular case, we do this by implementing a custom
>> pqPropertyWidget subclass that handles this. The class of interest
>> is pqCubeAxesPropertyWidget.
>>
>>
>>> 2. How to select enable a drop down menu active, e.g.
>>>
>>> [image: Inline image 2]
>>>
>>
>> In this particular case, this too is managed by a custom widget
>> (pqPointSpriteControls). However, one can use PropertyWidgetDecorators
>> (described here
>> http://www.paraview.org/Wiki/ParaView/Properties_Panel#pqPropertyWidgetDecorator_.28base-class:_QObject.29)
>> for similar effect. Just search for Decorator in the filters.xml and you'll
>> see several examples of using decorator to enable/disable widgets based on
>> values of other properties. You can also define new decorators through
>> plugins.
>>
>>
>>> 3. How to bring a new button after selecting some menu options
>>> (checkbox, drop down etc.)
>>>
>>> [image: Inline image 3]
>>>
>>>
>>>
>> Custom widget here too. You can write a pqPropertyWidget subclass that
>> handles such customizations. A pqPropertyWidget can correspond to a single
>> property or a group of properties.
>>
>>
>>> Finally, is it possible to add two checkbox menu side by side.
>>> Currently, when I code it I get them in successive lines.
>>>
>>
>> You know it...custom widget for two properties. But those in a property
>> group and create a new widget for that group.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151208/5d6d9144/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 31955 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151208/5d6d9144/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 62109 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151208/5d6d9144/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 60240 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151208/5d6d9144/attachment-0005.png>


More information about the Paraview-developers mailing list