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

Chiranjib Sur sur.chiranjib at gmail.com
Mon Apr 27 14:20:17 EDT 2015


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/d64cfe23/attachment-0001.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/d64cfe23/attachment-0001.png>


More information about the Paraview-developers mailing list