[Paraview-developers] state file and int list

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Mar 26 21:16:03 EDT 2018


I suspect the problem is with the hooking up of the property and the widget.

1. ensure that pqPropertyLinks is setup correctly so that
servermanager-property and teh Qt property are linked correct
2. ensure correct signal is fired with the widget is changed by the user
3. add break points in getIds to confirm that it gets called when user
changes UI and its returning correct values.

Utkarsh

On Mon, Mar 26, 2018 at 5:41 PM, Cornelis Bockemühl <
cornelis.bockemuehl at gmail.com> wrote:

> Dear all,
>
> For some PV filter (named "WriteValue") I am writing a custom widget
> (class pqPropertyGroupWidget). This includes 4 properties: a string, two
> "double" values and a list of int values. The list of int values I am
> "attaching" to the widget with this property definition:
>
> Q_PROPERTY(QList Ids READ getIds WRITE setIds NOTIFY idsChanged)
>
> and then in the code I have getIds, setIds and idsChanged defined and
> declared properly. Everything works fine and nice so far.
>
> Only what I do not see is anything in the "state" file: there my filter is
> specified as follows:
>
>     <Proxy group="filters" type="WriteValue" id="4604" servers="1">
>       <Property name="Ids" id="4604.Ids"/>
>       <Property name="Input" id="4604.Input" number_of_elements="1">
>         <Proxy value="4344" output_port="0"/>
>         <Domain name="groups" id="4604.Input.groups"/>
>         <Domain name="input_type" id="4604.Input.input_type"/>
>       </Property>
>       <Property name="ReplacementValue" id="4604.ReplacementValue"
> number_of_elements="1">
>         <Element index="0" value="2"/>
>         <Domain name="range" id="4604.ReplacementValue.range"/>
>       </Property>
>       <Property name="TargetArrayName" id="4604.TargetArrayName"
> number_of_elements="1">
>         <Element index="0" value="NewAtt"/>
>       </Property>
>       <Property name="Value" id="4604.Value" number_of_elements="1">
>         <Element index="0" value="12"/>
>         <Domain name="range" id="4604.Value.range"/>
>       </Property>
>     </Proxy>
>
> So the "TargetArrayName", the "Value" and the "ReplacementValue" are all
> fine with their proper values. Only the "Ids" looks like it contains
> nothing - which is not the case!
>
> The specification in the server manager XML looks as follows:
>
>       <IntVectorProperty command="AddId"
>                          clean_command="ClearIds"
>                          label="Ids"
>                          name="Ids"
>                          number_of_elements_per_command="1"
>                          repeat_command="1">
>         <Documentation>
>           IDs for which the value should be set
>         </Documentation>
>       </IntVectorProperty>
>
> Is there anything still obviously missing for proper handling of that
> "Ids" property also in the state file - including the list of values? Or is
> this simply not a built-in feature, so I need to "dig" even deeper -
> somehow?
>
> Many thanks for any helpful hint!
>
> Regards,
> Cornelis
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180326/74cdda67/attachment.html>


More information about the Paraview-developers mailing list