[Paraview] Programmatic interaction with the colorScalarBar

cunrein cunrein at micron.com
Wed Apr 1 11:16:34 EDT 2009


Hello List,

I have a custom object panel for a custom filter plugin, and wish to add 
some functionality to it.

In particular, I wish to programmatically

1.  set the colorBy scalar in the variableToolbar
2.  set the min/max range for the colorScalarBar
3.  turn on the colorScalarBar legend visibility

At the time my accept method is run, (when the user clicks accept), the 
filter's output has not yet been filled (since the RequestData has not 
yet been issued), and the view has not yet been opened.  Hence I do not 
have a pipeLineRepresentation in hand.  With a very distasteful hack I 
have used the timer to trigger a slot method 1 second later, at which 
time the view is filled and the dataRepresentation is available.  I 
imagine there must be some Qt or pq trigger fired when a new view has 
been created or when a new pipeLineRepresentation has been added to the 
pipeLine, but I have not yet been able to find it.

If I physically interact with the gui by clicking the 'Toggle Color 
Legend Visibility' QtToolButton in the variableToolbar, the color legend 
is displayed and a pqScalarBarRepresentation object is created and 
available through the core::ServerManager.  But I cannot figure out how 
to programmatically 'click' this QtToolButton.  Once the 
pqScalarBarRepresentation is created, performing 1 and 2 above is not 
too difficult.  Anybody have any hints for me?

Thanks, Chris


More information about the ParaView mailing list