[Paraview-developers] Add "text" in the property panel display fields
Mathieu Westphal
mathieu.westphal at kitware.com
Tue Mar 7 05:44:17 EST 2017
Let's take this back to the ml so everyone can see.
This looks like a Box Widget panel, and it is not generated from xml, but
from a specific .ui file
./Qt/ApplicationComponents/Resources/UI/pqBoxPropertyWidget.ui
To use it from a xml file, you have to specify a specific panel usage
panel_widget="InteractiveBox"
see ParaViewCore/ServerManager/SMApplication/Resources/utilities.xml:668
vtkPVBox xml declaration.
Regards,
Mathieu Westphal
On Tue, Mar 7, 2017 at 11:33 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:
> Thanks once again. This is very helpful. I come up with questions as I
> explore more (and when you answer :)).
>
> Where can I find the source (xml) which creates the following panel for
> the transformation filter
>
> [image: Inline image 1]
>
> Chiranjib
>
> On Tue, Mar 7, 2017 at 3:52 PM, Mathieu Westphal <
> mathieu.westphal at kitware.com> wrote:
>
>> filters.xml can be found here :
>> ParaViewCore/ServerManager/SMApplication/Resources/filters.xml
>>
>> Generally speaking, if one wants to find the xml and vtk classes of a
>> filter used in paraview :
>> - Click on Help button in Properties Dock Widget -> Open the help for the
>> filter
>> - On top of the help page is the label and name of the filter
>> - Then open ParaViewCore/ServerManager/SMApplication/Resources/*.xml
>> file and search for the name of the filter
>> - once the xml declaration of the filter is found, look for
>> class="vtkClassName", this is the name of the vtkClass
>>
>> Another way to only get the vtk class name would be using the python
>> shell this way :
>> - Select filter
>> - Open python shell
>> - GetActiveSource().SMProxy.GetVTKClassName()
>>
>> Regards,
>>
>> Mathieu Westphal
>>
>> On Tue, Mar 7, 2017 at 11:14 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
>> wrote:
>>
>>> Thanks again. Can you spare me the path of the file "filters.xml". That
>>> would be very helpful.
>>>
>>> I have another question. Typically, where to find the source for the
>>> Filters and the corresponding servermanager.xml file?
>>>
>>> Chiranjib
>>>
>>>
>>> On Tue, Mar 7, 2017 at 3:32 PM, Mathieu Westphal <
>>> mathieu.westphal at kitware.com> wrote:
>>>
>>>> You can diferentiate between the name of the property, and it's label.
>>>> see filters.xml:6081 vtkWarpVector -> SelectInputVectors property.
>>>>
>>>> Mathieu Westphal
>>>>
>>>> On Tue, Mar 7, 2017 at 11:00 AM, Chiranjib Sur <sur.chiranjib at gmail.com
>>>> > wrote:
>>>>
>>>>> Thank Mathieu.
>>>>> Yes, I thought about that. In that case I resolve the value using:
>>>>>
>>>>> vtkSMPropertyHelper( proxy(), "Height (in cm)" ).GetAsDouble();
>>>>>
>>>>> But I wanted to make it more clean without adding the "units" to the
>>>>> label.
>>>>>
>>>>> Thanks,
>>>>> Chiranjib
>>>>>
>>>>> On Tue, Mar 7, 2017 at 3:11 PM, Mathieu Westphal <
>>>>> mathieu.westphal at kitware.com> wrote:
>>>>>
>>>>>> Hello
>>>>>>
>>>>>> I suposed you may already have thought of that, but
>>>>>> the easiest way to go would be to label you property "Height (cm)"
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Mathieu Westphal
>>>>>>
>>>>>> On Tue, Mar 7, 2017 at 10:31 AM, Chiranjib Sur <
>>>>>> sur.chiranjib at gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I am developing a plugin and while doing so, I thought of putting "units
>>>>>>> system" to the numeric fields in the property panel. For example,
>>>>>>> the in the below screenshot I want to add " in cm" after the
>>>>>>> numeric field.
>>>>>>>
>>>>>>> [image: Inline image 1]
>>>>>>>
>>>>>>> Currently, I can extract the numeric value of these quantities by
>>>>>>> using "vtkSMPropertyHelper" like
>>>>>>>
>>>>>>> vtkSMPropertyHelper( proxy(), "Height" ).GetAsDouble();
>>>>>>>
>>>>>>> This utility I want to retain. I am wondering, how can I add strings
>>>>>>> like "cm" etc in the display menu without reading them using
>>>>>>> vtkSMPropertyHelper.
>>>>>>>
>>>>>>> Any clue?
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>> Chiranjib
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Search the list archives at: http://markmail.org/search/?q=
>>>>>>> Paraview-developers
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170307/3b1bdbb7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 23940 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170307/3b1bdbb7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 5263 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170307/3b1bdbb7/attachment-0003.png>
More information about the Paraview-developers
mailing list