[Paraview] Dynamically updating GUI list components
clinton at elemtech.com
clinton at elemtech.com
Thu Jul 26 16:59:54 EDT 2007
I think you want to have the array selection list update when the check box is
checked/unchecked and before accept is pressed.
In that case, you'll have to write your own GUI side panel to allow that kind
of interaction. You can follow how pqXDMFPanel.cxx does it.
There's a helper proxy that interacts with the reader behind the scenes, and
updates the GUI with new options as other options are changed. When the
accept button is pressed the new values are put onto the proxy itself. It is
done this way to work properly with the new undo/redo framework.
Or did you only care that the new array selections update after you hit
accept? Then you can change them, and hit accept again. In that case, we'll
have to fix some ParaView code to make that work.
Clint
On Monday 23 July 2007 4:01:11 am Andy Heather wrote:
> Hi Clint,
>
> I've attached a tar file with an example reader - it creates simple
> client/server side plugins for files with extension '.test'. When you
> select 'PVTestReader.test', the code will generate a cube.
>
> The check-box on the properties panel switches between two data sets -
> one with five arrays, and the other with ten. The list view on the
> properties panel does not get updated, but if you go to the display
> panel, you can see that the relevant fields have been generated by
> looking at the 'color by' drop down selection.
>
> Thanks,
>
> Andy
>
> clinton at elemtech.com wrote:
> > Umm.. yeah, that looks like a bug.
> > Could you could possibly provide me some sample code to test against?
> >
> > Clint
> >
> > On Thursday 19 July 2007 4:57:52 am Andy Heather wrote:
> >> Hi,
> >>
> >> I'm updating a reader to ParaView 3.1, and having difficulties getting
> >> the GUI list components to update when new data sets are loaded - i.e.
> >> they remain fixed after the first instance they are populated, instead
> >> of growing/shrinking/changing array name entries etc. The list
> >> components are described by StringVectorProperty entries in the server
> >> manager XML, where each list entry contains a label and a check box,
> >> e.g.
> >>
> >>
> >> <StringVectorProperty
> >> name="RegionArrayInfo"
> >> information_only="1"
> >> label="Region Arrays">
> >> <ArraySelectionInformationHelper attribute_name="Region"/>
> >> </StringVectorProperty>
> >> <StringVectorProperty
> >> name="RegionStatus"
> >> command="SetRegionArrayStatus"
> >> number_of_elements="0"
> >> repeat_command="1"
> >> number_of_elements_per_command="2"
> >> element_types="2 0"
> >> information_property="RegionArrayInfo">
> >> <ArraySelectionDomain name="array_list">
> >> <RequiredProperties>
> >> <Property name="RegionArrayInfo"
> >> function="ArrayList"/>
> >> </RequiredProperties>
> >> </ArraySelectionDomain>
> >> </StringVectorProperty>
> >>
> >> The 'SetRegionArrayStatus' command simply enables/disables an array. The
> >> properties shown by the list are linked to a vtkDataArraySelection
> >> object. I can add/remove arrays from the object in the C++ code, but the
> >> changes are not shown by the GUI elements... Does anyone have a working
> >> example of using the XML StringVectorProperty component so that it
> >> automatically updates itself based on the current status of the
> >> vtkDataArraySelection object?
> >>
> >> Many thanks,
> >>
> >> Andy
> >>
> >> _______________________________________________
> >> ParaView mailing list
> >> ParaView at paraview.org
> >> http://www.paraview.org/mailman/listinfo/paraview
More information about the ParaView
mailing list