Hi Niek,<div><br></div><div>If you try to automatically change any text representation that get created to use some other font size default, the right way to do that is to almost do the same thing as the example that you can find in ParaView source tree under the following directory: Examples/Plugins/RepresentationBehavior</div>
<div><br></div><div>But the content of the <span style="color:rgb(0,0,0)">onRepresentationAdded</span> will look like that:<br></div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">pqSurfaceRepresentationBehavior</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">onRepresentationAdded</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">pqRepresentation</span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">rep</span><span style="color:rgb(0,0,0)">)</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">rep</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="color:rgb(0,0,0)">getSMName</span><span style="color:rgb(0,0,0)">()</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">==</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">&quot;TextSourceRepresentation&quot;</span><span style="color:rgb(0,0,0)">)</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSMPropertyHelper</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">rep</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="color:rgb(0,0,0)">getProxy</span><span style="color:rgb(0,0,0)">(),</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">&quot;FontSize&quot;</span><span style="color:rgb(0,0,0)">).</span><span style="color:rgb(0,0,0)">Set</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">12</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">rep</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="color:rgb(0,0,0)">getProxy</span><span style="color:rgb(0,0,0)">()-&gt;</span><span style="font-style:italic;color:rgb(0,0,0)">UpdateVTKObjects</span><span style="color:rgb(0,0,0)">();</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(0,0,0)">}</span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,0)">}</span></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:arial;white-space:normal">Seb</span><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<br></pre><pre style="margin-top:0px;margin-bottom:0px"></pre></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 7, 2012 at 11:17 AM, Verhoeven, Nicolaas (UK) <span dir="ltr">&lt;<a href="mailto:Nicolaas.Verhoeven@baesystems.com" target="_blank">Nicolaas.Verhoeven@baesystems.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="color:#1f497d">(errata)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Typo in first message<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">The constructor is not <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">myDecorator::pqIrisAnnotationDecorator(pqDisplayPanel* panel) : Superclass(panel)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">but<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">myDecorator::</span> <span style="color:#1f497d">
myDecorator(pqDisplayPanel* panel) : Superclass(panel)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Apologies<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Niek<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:paraview-developers-bounces@paraview.org" target="_blank">paraview-developers-bounces@paraview.org</a>
 [mailto:<a href="mailto:paraview-developers-bounces@paraview.org" target="_blank">paraview-developers-bounces@paraview.org</a>] <b>On Behalf Of </b>Verhoeven, Nicolaas (UK)<br>
<b>Sent:</b> 07 November 2012 15:49<br>
<b>To:</b> <a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.org</a><br>
<b>Subject:</b> [Paraview-developers] How do you modifying the text display panel default settings via a plugin?<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:solid black 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p class="MsoNormal" align="center" style="text-align:center;background:white"><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal" align="center" style="text-align:center;background:white"><b><span style="font-size:15.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#333972">*** WARNING ***<u></u><u></u></span></b></p>

</div>
<div>
<p class="MsoNormal" align="center" style="margin-bottom:12.0pt;text-align:center;background:white">
<em><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#333972">This message originates from outside our organisation, either from an external partner or the internet.</span></em><i><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#333972"><br>

<em><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Keep this in mind if you answer this message.</span></em><br>
<em><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Please see <a href="http://intranet.ent.baesystems.com/howwework/security/spotlights/Documents/Dealing%20With%20Suspicious%20Emails.pdf" target="_blank">
this process</a> on how to deal with suspicious emails.</span></em></span></i><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#333972"><u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal">I have inherited a plugin for text annotation which is based on the source ‘Annotated Time’.<u></u><u></u></p>
<p class="MsoNormal">The text plugin is constructed as given by <a href="http://www.cmake.org/Wiki/ParaView/Plugin_HowTo#Deprecated" target="_blank">
http://www.cmake.org/Wiki/ParaView/Plugin_HowTo#Deprecated</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I know the constructor of myDecorator can be used to access the property FontSize e.g.<u></u><u></u></p>
<p class="MsoNormal">myDecorator::pqIrisAnnotationDecorator(pqDisplayPanel* panel) : Superclass(panel)<u></u><u></u></p>
<p class="MsoNormal">{<u></u><u></u></p>
<p class="MsoNormal">  pqRepresentation* rep = panel-&gt;getRepresentation();<u></u><u></u></p>
<p class="MsoNormal">  vtkSMProxy* repProxy = rep-&gt;getProxy();<u></u><u></u></p>
<p class="MsoNormal">  vtkSMProperty* smProb = repProxy-&gt;GetProperty(&quot;FontSize&quot;);<u></u><u></u></p>
<p class="MsoNormal">  QVariant v = pqSMAdaptor::getElementProperty(smProb);<u></u><u></u></p>
<p class="MsoNormal">  int fontSize0 = v.value&lt;int&gt;();<u></u><u></u></p>
<p class="MsoNormal">}<u></u><u></u></p>
<p class="MsoNormal">Therefor appending the following to this should change the fontsize.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">  v.setValue&lt;int&gt;(12);<u></u><u></u></p>
<p class="MsoNormal">  pqSMAdaptor::setElementProperty(smProb0,v);<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However this does not have any effect.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Questions:<u></u><u></u></p>
<p class="MsoNormal">Is it possible to use a ‘decorator’ to change the default settings as set by rendering.xml<u></u><u></u></p>
<p class="MsoNormal">If yes. What do I have to add to achieve my goal?<u></u><u></u></p>
<p class="MsoNormal">Further the used methods are flagged as deprecated. <u></u><u></u></p>
<p class="MsoNormal">What are the recommended alternatives? <u></u><u></u></p>
<p class="MsoNormal">Can these be used to change to default values via a plugin?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Niek<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
********************************************************************<br>
This email and any attachments are confidential to the intended<br>
recipient and may also be privileged. If you are not the intended<br>
recipient please delete it from your system and notify the sender.<br>
You should not copy it or use it for any purpose nor disclose or<br>
distribute its contents to any other person.<br>
********************************************************************<u></u><u></u></span></p>
</div></div></div>
</div>

<br>_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>