<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> </o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </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> </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. I’m not sure if Python
dependence is a huge deal...<br>
<br>
That said, a plugin typically does not have direct access to pqMainWindowCore.
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. If
you can find a way around it, it would probably be cleaner. Besides, I
think that code is going to change soon anyway with the branding functionality
Utkarsh is getting ready to check in. 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, "Berk Geveci" <<a
href="berk.geveci@kitware.com">berk.geveci@kitware.com</a>> 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 <<a href="pat.marion@kitware.com">pat.marion@kitware.com</a>>
wrote:<br>
> Hi Jon,<br>
><br>
> Is there a requirement that this can't depend on python? Any<br>
> selection object that the pqSelectionInspectorPanel can create can be<br>
> created with python and the paraview python api. This is used a lot<br>
> in the pvblot plugin (Plugins/pvblot/tplot.py for example)<br>
><br>
> Paraview has the ability to dynamically create toolbar buttons mapped<br>
> to python routines (python scripts actually), or if you want something<br>
> with a more customized interface you can write a Qt plugin to<br>
> implement the UI but under the hood all it needs to do is call python<br>
> routines. Calling python from c++ is made quite easy by the class<br>
> pqPythonDialog (accessible to plugins thru the pqPythonManager).<br>
><br>
> Pat<br>
><br>
> On Mon, Oct 26, 2009 at 7:22 PM, Goldman, Jon <<a
href="jgoldma@sandia.gov">jgoldma@sandia.gov</a>> wrote:<br>
>> I am looking for feedback on the "right" way to proceed in
solving a particular problem inside a plugin.<br>
>><br>
>> 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>
>> - Open an exodus file<br>
>> - Select nodal variable DISPL<br>
>> - Select specific points/nodes by number, by typing in these
GlobalIDs: 100,113, and 270<br>
>> - Plot the selected points/nodes over time<br>
>><br>
>> ParaView's Selection Inspector, pqSelectionInspectorPanel class, has
functionality that accomplishes much or all of what I would need to satisfy
user requirements.<br>
>><br>
>> I see these possible paths:<br>
>> a) Re-use the Selection Inspector pqSelectionInspectorPanel object
that gets created when ParaView starts;<br>
>> b) Inherit from pqSelectionInspectorPanel, and override methods I need
for customization, create and manage my own object instance;<br>
>> c) Borrow and Re-write source code from pqSelectionInspectorPanel, and
implement needed functionality inside my plugin;<br>
>> d) I am missing something, and there is a more elegant way.<br>
>><br>
>> 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>
>><br>
>> 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>
>><br>
>> One question-- is (a) possible (or advisable) with today's ParaView
architecture/source code?<br>
>> I was looking through pqMainWindowCore where the pqSelectionInspectorPanel
gets created:<br>
>> void pqMainWindowCore::setupSelectionInspector(QDockWidget*
dock_widget)<br>
>> {<br>
>> pqSelectionInspectorPanel* const selection_inspector =<br>
>> new pqSelectionInspectorPanel(dock_widget)<br>
>> << pqSetName("selectionInspectorPanel");<br>
>> .<br>
>> .<br>
>> .<br>
>> }<br>
>> Does a plugin have access to pqMainWindowCore and the
pqSelectionInspectorPanel objects?<br>
>><br>
>> Option (c) introduces code maintenance, and other issues, but perhaps
is best-under-the-circumstances way to proceed...?<br>
>><br>
>> And of course I welcome (d) if somebody has other good ideas :-)<br>
>><br>
>> -Jon<br>
>><br>
>><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>
> _______________________________________________<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>
_______________________________________________<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>
**** Kenneth Moreland<br>
*** Sandia National
Laboratories<br>
*********** <br>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><br>
** *** ** phone: (505) 844-8919<br>
*** web: <a
href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a></span><o:p></o:p></p>
</div>
</body>
</html>