[Paraview-developers] Help with advanced GUI for filter

Ellon Paiva ellonpaiva at gmail.com
Tue May 24 18:51:59 EDT 2016


Utkarsh,

I finally got my widget to work more or less like I want! FYI I created 
a long StringVectorProperty with the following xml code:

           <StringVectorProperty name="OutlierFilters"
                                 command="AddOutlierFilter"
    clean_command="CleanOutlierFilters"
                                 number_of_elements="0"
    number_of_elements_per_command="14"
                                 element_types="2 2 2 1 0 0 1 1 1 1 1 1 1 1"
                                 repeat_command="1">
             <Documentation>
               Define which outlier filters to use and in which order.
             </Documentation>
           </StringVectorProperty>


and I created a Q_PROPERTY on my widget of QStringList type, with 
functions to create the string from internal data and to set the 
internal data from the string. This way all the internal data is 
serialized through this string.

I still have some problems to address:

 1. When I click on Apply button in the filter with my custom widget the
    RequestData() method of my vtkPolyDataAlgorithm subclass is not
    being called, but if I change the parameters of any filter before
    this one in the pipeline then it's called. Do you know what's going
    wrong here? Maybe I'm forgetting to call something like
    pqPropertyWidget::changeAvailable()?
 2. I would like to have one of the properties of my widget to be
    populated with the names of the input arrays. Can I do it from the
    C++ code?


Best,

Ellon


On 05/24/2016 04:42 PM, Utkarsh Ayachit wrote:
>> Quick question: is there a way to have a vector property that has N
>> elements, but only exhibit one of them? If yes, can a descriptor be used to
>> control which of the vector elements is exhibited?
> Not by default, you can create a custom widget for the same, however.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160525/322428d2/attachment.html>


More information about the Paraview-developers mailing list