On Sat, May 12, 2012 at 5:41 PM, Giuseppe Sucameli
<brush.ty...@gmail.com> wrote:
> Hi,
>
> On Sat, May 12, 2012 at 8:56 PM, Etienne Tourigny
> <etourigny....@gmail.com> wrote:
>> Any way ftools could be adapted to use the same approach as gdaltools?
>
> yes, it could. The only problem running non-modal dialogs
> are crashes accessing deleted objects like layers removed by
> the user.
>
> The solution implemented in GdalTools is to use the
> QgsMapLayerRegistry signals to update the list of layers
> and the combos.
>
>> However - this hack might work - when the characteristic
>> '0...10...20...30...40...50...60...70...80...90...100 - done.' output
>> is detected (say after '0...10') then the output would be interpreted
>> as progress report, which could be used to update the gui every 10% -
>> until 100 is read. I have never seen output mixed with progress report
>> in gdal utilities, although I may be wrong.
>
> yes, it could be done.
>
>>> Stopping/killing the execution thread should be enough.
>>> GdalTools asks for confirmation and then does it.
>>
>> This has to be done manually, externally to qgis though.
>
> Externally?

I mean finding the thread through 'top' (in unixes) and killing it,
rather than having a gui to do it (like a Cancel button)

>
>> Would it be possible to have a "Cancel" button in the dialogs
>> that would respond to user input, or respond to the Escape key
>> when pressed?
>
> Yes, why not?
> I'm not sure I've understood.

I was just wondering if the ui could respond to a click on a Cancel
button, or a hit on the escape key - but I guess it could since the
operation is done in another (non-blocking) thread.

>
>>>> Also, this could enable several similar operations to be done in
>>>> parallel - as long as they are not working on the same output files.
> [[snip]]
>> Am I wrong to think that currently, 2 gdaltools operations could run
>> concurrently with the same output file, with all associated problems?
>
> uhm.. sorry, I've read too fast and I misunderstood your words.
>
> No, I don't know what happens if two tools wrote on the same output,
> though I think GDAL locks the output file until it finished.
>
> Let's give me a try :)
>
> BTW, why should two tools work on the same output file?

user error - in the case of a more complex workflow with sextante this
might happen more often, so it would be good to make sure.

regards,
Etienne

> Cheers.
>
>> thanks
>> Etienne
>>
>>>
>>> Regards.
>>>
>>>> Etienne
>>>>
>>>> On Fri, May 11, 2012 at 3:25 AM, Paolo Cavallini <cavall...@faunalia.it> 
>>>> wrote:
>>>>> Il 10/05/2012 23:15, Martin Dobias ha scritto:
>>>>>
>>>>>> What should be the benefit of multithreading here? To run algorithms
>>>>>> outside from main thread so that GUI does not get blocked?
>>>>>
>>>>> IMHO this is the main reason; I think the way GDALTools work is fine for 
>>>>> the user.
>>>>> All the best.
>>>>>
>>>>> --
>>>>> Paolo Cavallini - Faunalia
>>>>> www.faunalia.eu
>>>>> Full contact details at www.faunalia.eu/pc
>>>>> _______________________________________________
>>>>> Qgis-developer mailing list
>>>>> Qgis-developer@lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>> _______________________________________________
>>>> Qgis-developer mailing list
>>>> Qgis-developer@lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>>
>>> --
>>> Giuseppe Sucameli
>
>
>
> --
> Giuseppe Sucameli
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to