[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 11:17:17 EST 2012


(errata)
Typo in first message

The constructor is not
myDecorator::pqIrisAnnotationDecorator(pqDisplayPanel* panel) : Superclass(panel)
but
myDecorator:: myDecorator(pqDisplayPanel* panel) : Superclass(panel)

Apologies

Niek


From: paraview-developers-bounces at paraview.org [mailto:paraview-developers-bounces at paraview.org] On Behalf Of Verhoeven, Nicolaas (UK)
Sent: 07 November 2012 15:49
To: paraview-developers at paraview.org
Subject: [Paraview-developers] How do you modifying the text display panel default settings via a plugin?


*** WARNING ***
This message originates from outside our organisation, either from an external partner or the internet.
Keep this in mind if you answer this message.
Please see this process<http://intranet.ent.baesystems.com/howwework/security/spotlights/Documents/Dealing%20With%20Suspicious%20Emails.pdf> on how to deal with suspicious emails.
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/67b6e534/attachment.htm>


More information about the Paraview-developers mailing list