Editing Properties Of Writers

From ParaQ Wiki
Jump to navigationJump to search

There is currently no way to configure a writer when saving data in ParaView 3. For example, you may want to tell the writer whether or not to write out ghost cells or whether to write out all the timesteps or just the current one.

Fortunately, much of the functionality we need to support editing a writer's properties is already implemented. The pqAutoGeneratedObjectPanel class enables editing of a pqProxy's properties via automatically generated Qt widgets based on the property types. Thus, any writer's properties defined in writers.xml will be editable from this interface (except for the filename and input proxy which we won't allow).

What's left to do is to write a pqWriter class that inherits from pqProxy. When the pqWriterFactory creates and registers the writer proxy that can read the given data, pqServerManagerObserver will create a pqWriter object and emit a signal that tells pqMainWindowCore to create the pqAutoGeneratedObjectPanel (in its own dialog box instead of in the object inspector) for the pqWriter.

I think this is the most flexible solution. We leverage the work that's already been done to link properties with editable Qt widgets. And we'd be able to support new writers in the future with no problem.


pqAutoGeneratedObjectPanel does require a pqProxy. The code used by pqAutoGeneratedObjectPanel to generate the widgets and link them up only requires a vtkSMProxy. So you can leverage the code without making a pqWriter and all the other stuff related to that. --Clinton 12:56, 12 June 2007 (EDT)

Two comments. First, before this is implemented we need to go through the writers XML to clean it up so that the right things are exposed to the users. Second, if no properties are exposed to the user, then the write options dialog box should be skipped and the data just written out. --Ken 13:40, 12 June 2007 (EDT)