[Qgis-psc] Motion: git write access for Etienne Tourigny

Etienne Tourigny etourigny.dev at gmail.com
Wed Jul 11 04:42:29 PDT 2012


On Wed, Jul 11, 2012 at 8:23 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
> On Wed, Jul 11, 2012 at 11:15 AM, Tim Sutton <tim at linfiniti.com> wrote:
>> Hi
>>
>> On Wed, Jul 11, 2012 at 4:07 AM, Etienne Tourigny
>> <etourigny.dev at gmail.com> wrote:
>>> Thanks all
>>>
>>> I will start by committing a slightly modified version of my histogram
>>> improvements (in a pull request).
>>>
>>> Speaking of tests - any idea how the histogram could be tested, and if
>>> it's worth it?
>>
>> Ideal would be to move histogram logic down into the gui lib as we
>> don't yet have a test system in place for app. I could envisage a nice
>> call like:
>>
>> QSize mySize(800,400);
>> QImage myImage = myRasterLayer ->histogramImage(mySize);
>>
>> I don't know if that will make sense though given that you are adding
>> interactivity to the widget....
>
> Or simply have a HistogramGraph class in core lib - that would take
> care of bare histogram drawing (to any paint device) - and
> HistogramGraphWidget in gui lib that would take care of interactivity
> and would make use of HistogramGraph.

I think I see how this can be done. The drawing is done by a
QwtPlotCurve , in the interactive case it is linked to a QwtPlot with
attach() but if one were to simply draw it one would use the paint()
method.
I would then implement a HistogramGraph class (or methods in
QgsRasterLayer) to deal with the basic plotting and a
HistogramGraphWidget for the widget (or simply create the widget in
raster layer properties like now). Whichever approach, a file could be
saved from a calling test.

Anyway, I'll first merge what's existing and then proceed, perhaps
move this dicsussion to the dev ML.

>
> (and welcome to the team, Etienne!)

thanks!

>
> Cheers
> Martin



More information about the Qgis-psc mailing list