[Paraview-developers] How do you modifying the text display panel default settings via a plugin?

Verhoeven, Nicolaas (UK) Nicolaas.Verhoeven at baesystems.com
Wed Nov 7 10:48:39 EST 2012


I have inherited a plugin for text annotation which is based on the source 'Annotated Time'.
The text plugin is constructed as given by http://www.cmake.org/Wiki/ParaView/Plugin_HowTo#Deprecated

I know the constructor of myDecorator can be used to access the property FontSize e.g.
myDecorator::pqIrisAnnotationDecorator(pqDisplayPanel* panel) : Superclass(panel)
{
  pqRepresentation* rep = panel->getRepresentation();
  vtkSMProxy* repProxy = rep->getProxy();
  vtkSMProperty* smProb = repProxy->GetProperty("FontSize");
  QVariant v = pqSMAdaptor::getElementProperty(smProb);
  int fontSize0 = v.value<int>();
}
Therefor appending the following to this should change the fontsize.

  v.setValue<int>(12);
  pqSMAdaptor::setElementProperty(smProb0,v);

However this does not have any effect.

Questions:
Is it possible to use a 'decorator' to change the default settings as set by rendering.xml
If yes. What do I have to add to achieve my goal?
Further the used methods are flagged as deprecated.
What are the recommended alternatives?
Can these be used to change to default values via a plugin?

Regards

Niek

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20121107/df413834/attachment.htm>


More information about the Paraview-developers mailing list