[Paraview-developers] state file and int list

Cornelis Bockemühl cornelis.bockemuehl at gmail.com
Mon Mar 26 17:41:23 EDT 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180326/89f57dd5/attachment.html>


More information about the Paraview-developers mailing list