Hi all +1 for using QProcess. I am using it in Lizmap Plugin to run external librairies (winSCP on windows, lftp on linux), and it works great. You can easily connect signals like readyReadStandardOutput(), readyReadStandardError() and finished(int, QProcess::ExitStatus) to your plugin methods.
Michael 2012/5/13 Etienne Tourigny <etourigny....@gmail.com> > Victor, > > I agree on all your points. > > May I suggest to have a unique interface/approach that other existing > interfaces can benefit from (i.e. standalone gdaltools and ftools). > > It seems that QProcess is an interesting candidate (and QThread when > not using external app.), because it works in both c++ and in pyqt > (ref. gdaltools) - plus there is already code inside qgis that uses > it. > > my 2 centavos > Etienne > > On Sun, May 13, 2012 at 6:13 PM, Victor Olaya <vola...@gmail.com> wrote: > > Here is my opinion on all that, in short: > > > > -The main idea of using threads is not now to execute multiplep > > algorithms at the same time, so we can remove a lot of complexity > > (like 2 processes writing the same file, as it was mentioned) > > > > -Implementing a canceling mechanism is going to be the greatest > > improvement once we have the threading stuff > > > > -So, for me, this is what should be done: > > > > 1)implementing the threading part > > 2) implement the cancelling mechanism (a responsive cancel button, etc) > > 3) modifying algorithm to respond to cancellin events. > > > > I think that would be more than enough for a first part, and it would > > be a great improvement for SEXTANTE > > > > Regards > > > > p.s. Just to let you know, I am leaving for Honduras tomorrow, and > > will be there working for 2 weeks, so I not might be very active on > > the lists during the next 15 days or so > > > > 2012/5/13 Marco Hugentobler <marco.hugentob...@sourcepole.ch>: > >> Hi Alex > >> > >> > >>>Also I think about rewritting fTools in C++ and integrating its > >>>algorithms into QGIS > >>>analysis library. This makes tools a bit faster and will allow to use > >>>algorithms in > >>>plugins > >> > >> That would be a great enhancement and leverage the analysis library as a > >> whole. > >> > >> Regards, > >> Marco > >> > >> > >> > >> > >> On 13.05.2012 09:23, Alexander Bruy wrote: > >>> > >>> Hi Etienne, > >>> > >>> 2012/5/12 Etienne Tourigny<etourigny....@gmail.com>: > >>>> > >>>> I stand corrected then - I guess I was confusing it with ftools, which > >>>> is blocking and does not spawn a process. > >>>> Any way ftools could be adapted to use the same approach as gdaltools? > >>> > >>> most fTools functions already implemented as threaded, but there are > some > >>> minor issues. I work on improving processes handing in fTools, and > several > >>> tools already don't block main QGIS window, has non-modal dialogs and > >>> allows > >>> to cancel running process. > >>> > >>> Also I think about rewritting fTools in C++ and integrating its > >>> algorithms into QGIS > >>> analysis library. This makes tools a bit faster and will allow to use > >>> algorithms in > >>> plugins > >>> > >> > >> > >> -- > >> Dr. Marco Hugentobler > >> Sourcepole - Linux& Open Source Solutions > >> Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland > >> marco.hugentob...@sourcepole.ch http://www.sourcepole.ch > >> Technical Advisor QGIS Project Steering Committee > >> > >> > >> _______________________________________________ > >> 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 > _______________________________________________ > 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