[Paraview-developers] using File>Open dialogue in custom filter

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Apr 27 15:12:07 EDT 2015


Chiranjib,

No, that's not what I mean. Your FileName is not being shown since you have
the panel_visibility="never".
Change that to "default" or "advanced" as appropriate.

Utkarsh

On Mon, Apr 27, 2015 at 2:20 PM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:

> HI Utkarsh,
> Great, Let me try it.
> Currently, I have declared it like
>
> <StringVectorProperty animateable="0"                            command="SetFileName"                            name="FileName"                            number_of_elements="1"                            panel_visibility="never">        <FileListDomain name="files" />
>
> ....
>
> so that I can extract the "FileName" as a string. However, with this, I
> don't have an option to select the files using pop-up.
>
> If I understood it correctly, I need to use the following part along with
> the one I already have ?
>
> <StringVectorProperty animateable="0"                            command="SetQFileName"                            name="QFileName"                            number_of_elements="1"                            panel_visibility="default"> .....
>
>
> Is it what you mean by adding FileListDomain ?
>
> Thanks,
> Chiranjib
>
> On Mon, Apr 27, 2015 at 6:56 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> Simply add the "FileListDomain" to the property as done for the QFileName
>> property here:
>> https://gitlab.kitware.com/paraview/paraview/blob/master/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml#L2659-2667
>>
>>
>> On Mon, Apr 27, 2015 at 6:27 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
>> wrote:
>>
>>> Hi,
>>> I am trying to write my own filter (C++) and want to deal with reading
>>> an existing file. I intend implement  a functionality where file selection
>>> will results into popping up a window like when one does, File->Open action.
>>>
>>> In the following screen capture, I want to implement that functionality
>>> so that when one clicks mouse inside the text box, File->Open windows will
>>> popup and the user can select the file he/she wants. (The alternative is to
>>> provide the file name by typing which is error prone and I want to avoid
>>> that)
>>>
>>> [image: Inline image 1]
>>>
>>> After reading various posts from the previous mailing threads and the
>>> other documentation, I narrowed down my idea to use the class pqFileDialog.
>>> Is this the right choice or are there some alternatives? Are there any
>>> place where, I can read and learn about usage of this class ?
>>>
>>> Google search points me towards solutions in pure Qt which looks like :
>>>
>>>
>>> http://stackoverflow.com/questions/14372012/qt-standard-dialogs-example-open-file
>>>
>>>
>>> Any suggestions from the experts?
>>>
>>> Thanks,
>>> 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/20150427/3b62719a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3734 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20150427/3b62719a/attachment.png>


More information about the Paraview-developers mailing list