<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<title>Re: [Paraview-developers] plugin to simplify ParaView UI - selection by
node # and pqSelectionInspectorPanel issues</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Ok,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>All,
thanks for the feedback.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>-Jon<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> paraview-developers-bounces@paraview.org
[mailto:paraview-developers-bounces@paraview.org] <b>On Behalf Of </b>Moreland,
Kenneth<br>
<b>Sent:</b> Wednesday, October 28, 2009 8:27 AM<br>
<b>To:</b> Berk Geveci; pat marion<br>
<b>Cc:</b> paraview-developers@paraview.org<br>
<b>Subject:</b> Re: [Paraview-developers] plugin to simplify ParaView UI -
selection by node # and pqSelectionInspectorPanel issues<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'>That said, this is a plugin and not ever
intended to be part of the ParaView core. &nbsp;I&#8217;m not sure if Python
dependence is a huge deal...<br>
<br>
That said, a plugin typically does not have direct access to pqMainWindowCore.
&nbsp;I think you can get access indirectly by asking Qt for the top level
windows (is that what they call it?) and find one of the right class. &nbsp;If
you can find a way around it, it would probably be cleaner. &nbsp;Besides, I
think that code is going to change soon anyway with the branding functionality
Utkarsh is getting ready to check in. &nbsp;I would ping him first to see how
that will affect you.<br>
<br>
-Ken<br>
<br>
<br>
On 10/27/09 11:01 AM, &quot;Berk Geveci&quot; &lt;<a
href="berk.geveci@kitware.com">berk.geveci@kitware.com</a>&gt; wrote:</span><o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'>I would say not using Python from core C++ functionality
is a<br>
requirement. ParaView should be fully functional (with the exception<br>
of Python scripting and programmable filters) when Python is turned<br>
off.<br>
<br>
-berk<br>
<br>
On Mon, Oct 26, 2009 at 7:40 PM, pat marion &lt;<a href="pat.marion@kitware.com">pat.marion@kitware.com</a>&gt;
wrote:<br>
&gt; Hi Jon,<br>
&gt;<br>
&gt; Is there a requirement that this can't depend on python? &nbsp;Any<br>
&gt; selection object that the pqSelectionInspectorPanel can create can be<br>
&gt; created with python and the paraview python api. &nbsp;This is used a lot<br>
&gt; in the pvblot plugin (Plugins/pvblot/tplot.py for example)<br>
&gt;<br>
&gt; Paraview has the ability to dynamically create toolbar buttons mapped<br>
&gt; to python routines (python scripts actually), or if you want something<br>
&gt; with a more customized interface you can write a Qt plugin to<br>
&gt; implement the UI but under the hood all it needs to do is call python<br>
&gt; routines. &nbsp;Calling python from c++ is made quite easy by the class<br>
&gt; pqPythonDialog (accessible to plugins thru the pqPythonManager).<br>
&gt;<br>
&gt; Pat<br>
&gt;<br>
&gt; On Mon, Oct 26, 2009 at 7:22 PM, Goldman, Jon &lt;<a
href="jgoldma@sandia.gov">jgoldma@sandia.gov</a>&gt; wrote:<br>
&gt;&gt; I am looking for feedback on the &quot;right&quot; way to proceed in
solving a particular problem inside a plugin.<br>
&gt;&gt;<br>
&gt;&gt; I am working on a plugin for a group at Sandia whose members want to
be able to run certain ParaView operations, but do them quickly from a
simplified user interface, i.e. a plugin toolbar. For example they may want to
do these steps:<br>
&gt;&gt; &nbsp;- Open an exodus file<br>
&gt;&gt; &nbsp;- Select nodal variable DISPL<br>
&gt;&gt; &nbsp;- Select specific points/nodes by number, by typing in these
GlobalIDs: 100,113, and 270<br>
&gt;&gt; &nbsp;- Plot the selected points/nodes over time<br>
&gt;&gt;<br>
&gt;&gt; ParaView's Selection Inspector, pqSelectionInspectorPanel class, has
functionality that accomplishes much or all of what I would need to satisfy
user requirements.<br>
&gt;&gt;<br>
&gt;&gt; I see these possible paths:<br>
&gt;&gt; a) Re-use the Selection Inspector pqSelectionInspectorPanel object
that gets created when ParaView starts;<br>
&gt;&gt; b) Inherit from pqSelectionInspectorPanel, and override methods I need
for customization, create and manage my own object instance;<br>
&gt;&gt; c) Borrow and Re-write source code from pqSelectionInspectorPanel, and
implement needed functionality inside my plugin;<br>
&gt;&gt; d) I am missing something, and there is a more elegant way.<br>
&gt;&gt;<br>
&gt;&gt; I like the idea of (a), because in theory if the user uses the
standard ParaView GUI, or my plugin toolbar, the pqSelectionInspectorPanel will
stay consistent, making it easier to keep the state of ParaView and the plugin
in sync.<br>
&gt;&gt;<br>
&gt;&gt; Option (b) would not be too bad, because I'd be re-using more ParaView
code, and getting code changes if somebody updates the
pqSelectionInspectorPanel class. Drawbacks - there would be multiple in-core
instances of pqSelectionInspectorPanel, and it would be harder to keep the
plugin UI and ParaView UI in sync, and maybe there are some Qt or pQ
difficulties I am not aware of.<br>
&gt;&gt;<br>
&gt;&gt; One question-- is (a) possible (or advisable) with today's ParaView
architecture/source code?<br>
&gt;&gt; I was looking through pqMainWindowCore where the pqSelectionInspectorPanel
gets created:<br>
&gt;&gt; &nbsp;void pqMainWindowCore::setupSelectionInspector(QDockWidget*
dock_widget)<br>
&gt;&gt; &nbsp;{<br>
&gt;&gt; &nbsp; &nbsp;pqSelectionInspectorPanel* const selection_inspector =<br>
&gt;&gt; &nbsp; &nbsp; &nbsp;new pqSelectionInspectorPanel(dock_widget)<br>
&gt;&gt; &nbsp; &nbsp; &nbsp;&lt;&lt; pqSetName(&quot;selectionInspectorPanel&quot;);<br>
&gt;&gt; &nbsp; &nbsp;.<br>
&gt;&gt; &nbsp; &nbsp;.<br>
&gt;&gt; &nbsp; &nbsp;.<br>
&gt;&gt; &nbsp;}<br>
&gt;&gt; Does a plugin have access to pqMainWindowCore and the
pqSelectionInspectorPanel objects?<br>
&gt;&gt;<br>
&gt;&gt; Option (c) introduces code maintenance, and other issues, but perhaps
is best-under-the-circumstances way to proceed...?<br>
&gt;&gt;<br>
&gt;&gt; And of course I welcome (d) if somebody has other good ideas &nbsp;:-)<br>
&gt;&gt;<br>
&gt;&gt; -Jon<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Paraview-developers mailing list<br>
&gt;&gt; <a href="Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
&gt;&gt; <a
href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Paraview-developers mailing list<br>
&gt; <a href="Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
&gt; <a href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
&gt;<br>
_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br>
</span><o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'><br>
</span><span style='font-size:7.5pt;font-family:"Courier New"'><br>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<br>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National
Laboratories<br>
*********** &nbsp;<br>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><br>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<br>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a
href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a></span><o:p></o:p></p>

</div>

</body>

</html>