[Qgis-developer] color ramps for vector graduated symbols (ticket #782)

Matthew Perry perrygeo at gmail.com
Thu Nov 8 12:22:19 EST 2007


Marco,

On 11/8/07, Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch> wrote:
>
> Hi Matthew,
>
> I had a look at the color ramps patch and in my opinion, this is a really
> cool
> and useful enhancement.
>
> Some suggestions:
> - As you already wrote, it would be good to parse the directory and have a
> dropdown list


Yes. It's an easy fix and I have that working on my dev version (see
screenshot at http://perrygeo.net/img/Screenshot.jpg). I'll get another
patch out this weekend.

IMO the next UI enhancement would be to, instead of list the names of the
color ramp, show a small jpg so you can inspect the ramp visually.

- It would be more Qt style (and probably more platform independent) to use
> the QTextStream class instead of C i/o methods


Good to know. The C i/o and parsing style always felt a bit clunky.

- It seems to me that these .cpt files already define the number of steps
> and
> the class boundaries. Maybe it would be an option to have a button 'from
> color ramp...' in the graduated symbol dialog that opens a dialog where
> the
> available ranges are visualised. Then, after selecting and clicking ok,
> the
> classes, number of classes and their boundaries are directly inserted into
> the list. The same dialog could also be used for the continuous renderer
> (where the interpretation of the ramps would be continuous) so the ramps
> could be stored in one directore. What do you think?


I like having the color ramp as another standard option in the main dialog
window. I'm not sure if Qt can do this but it would be nice to see a
dropdown of visual representations of the ramps (a bunch of 100x20 jpgs) to
select from. But in terms of a dialog box that could be used in other
contexts, your idea of having a "From Color Ramp" button might be better.

In terms of getting this implemented, I just hacked this patch together for
graduated symbols but it would be worthwhile to abstract the color ramp
handling into a separate class so that all the various renderers can it.

-- 
Matthew T. Perry
http://www.perrygeo.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071108/180c9661/attachment.html


More information about the Qgis-developer mailing list