[Paraview-developers] pqFileChooserWidget questions

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Jul 2 16:58:49 EDT 2013


I think there needs to be another fix. If I remember correctly,
the setUseDirectoryMode() was added to support the use-case where the user
selects a foo.bar file, but the ServerManager Property on the filter/reader
is to be set to the containing directory for that file. I'll need to brush
my memory a bit more to figure out which concrete use-case was this one (or
if that's no longer the case). A quick search for "UseDirectoryName" hint
in ServerManager xml didn't yield anything. Rob, does CMB use it?

Utkarsh


On Tue, Jul 2, 2013 at 4:43 PM, Robert Maynard
<robert.maynard at kitware.com>wrote:

> Does it fail if you pass /tmp/? If you are in directory mode /tmp would
> need to first verify that tmp is a folder and not a file.
>
>
> On Tue, Jul 2, 2013 at 3:17 PM, Joshua Murphy <
> Joshua.Murphy at lasp.colorado.edu> wrote:
>
>> I figure it out.. In the file pqFileChooserWidget.cxx on line 99, the
>> code is:
>>
>> this->LineEdit->setText(QFileInfo(files[0]).path());
>>
>> To return the correct path, this would have to be:
>>
>> this->LineEdit->setText(QFileInfo(files[0]).filePath());
>>
>> I have made a copy of the widget and made this modification and it works
>> correctly.  Might someone make the change (baring any problems with this
>> unbeknownst to me) in the master code so that it might work as expected?
>>
>> Thanks,
>>
>> Josh
>>
>> From: Joshua Murphy <Joshua.Murphy at lasp.colorado.edu>
>> Date: Tuesday, July 2, 2013 1:00 PM
>> To: "paraview-developers at paraview.org" <paraview-developers at paraview.org>
>> Subject: [Paraview-developers] pqFileChooserWidget questions
>>
>> Hello,
>>
>> I am attempting to use pqFileChooserWidget to select a path for storing
>> temp files in my properties panel, and I am having trouble.
>>
>> I am using it as follows:
>>
>>
>>    1. create a custom property panel widget using a pqFileChooserWidget
>>    as the ui.
>>    2. Set  setUseDirectoryMode(true)
>>
>>
>> When selecting a path, the following odd behavior occurs:
>>
>> 1)  Select the path the I want
>> 2) click OK
>> 3) in the dialog, the path ONE STEP BELOW the selected path is displayed.
>>
>> For example: if I select /tmp, the ui will show that / is selected.   If
>> I select /tmp/sc01a, the ui shows /tmp as selected.
>>
>> Could someone provide some information on why this may be occurring?
>>
>> Thanks,
>> Josh
>>
>> Joshua J. Murphy
>> Computer Scientist
>> Laboratory for Atmospheric and Space Physics
>> University of Colorado, Boulder
>>
>>
>> _______________________________________________
>> Paraview-developers mailing list
>> Paraview-developers at paraview.org
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130702/d01e6cf7/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 16467 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130702/d01e6cf7/attachment-0001.png>


More information about the Paraview-developers mailing list