Editing Properties Of Writers: Difference between revisions

From ParaQ Wiki
Jump to navigationJump to search
(New page: There is currently no way to configure a writer before saving data in ParaView 3. For example, you may want to tell the writer whether or not to write out ghost cells or whether or not to ...)
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
There is currently no way to configure a writer before saving data in ParaView 3. For example, you may want to tell the writer whether or not to write out ghost cells or whether or not to write out all the timesteps.
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, the functionality is almost all implemented to support editing a writer's properties. The pqAutoGeneratedObjectPanel class enables editing of a pqProxy's properties via automatically generated Qt widgets based on the property types. Thus, any properties defined in writers.xml for a given writer will be editable from this interface (except for the filename and input proxy).  
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 write a pqWriter class that inherits from pqProxy. pqServerManagerObserver will create a pqWriter object when  a proxy is registered in the server manager that is a member of the "writers" group. pqMainWindowCore could be notified of this and create the pqAutoGeneratedObjectPanel in a new QDialg box.
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.
--[[User:Clinton|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.
--[[User:Kmorel|Ken]] 13:40, 12 June 2007 (EDT)

Latest revision as of 12:40, 12 June 2007

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)