[Qgis-developer] Adding icons in map composer

Larry Shaffer larrys at dakotacarto.com
Fri Sep 27 12:22:58 PDT 2013

Hi Paolo,

On Fri, Sep 27, 2013 at 10:38 AM, Paolo Cavallini <cavallini at faunalia.it>wrote:

> Hash: SHA1
> Hi all.
> In Print composer, it is apparently impossible to choose icons from any
> directory but
> fo the first one on the list.

Not sure what you mean exactly. Please see issue #7764 [0] for an
explanation of how that combobox works (i.e. not as a filter).

> Furthermore, the interface is quite different from the icon selector from
> the
> Symbology, and this is confusing for the user.

When looking to add a non-embedded widget for selecting SVG backgrounds for
labels, I opted to extract Arun's GSoC project embedded symbology selector
code to a standalone class, QgsSvgSelectorWidget [1]. There is an issue [2]
for using this to replace the one in Composer; however, there are several
design decisions to be made/coded before that can happen:

* Refactor the class to be a more generic image selector, maybe
QgsGraphicSelector or QgsImageSelector, with its construction defining a
'filter' for what type of images are to be browsed, e.g. all, .svg,
.png|.jpg, etc. This is important for replacing the Composer selector, as
it is for selecting both pixel- and vector-based images.

* Add functionality to selector to allow editing of the image search paths.
This should allow editing of app- and project-level search paths, which
should be adjusted to allow for both pixel- and vector-based images, not
just SVGs as it is now.

* Optionally, if the set selector filter allows for multiple image types,
add a filter combobox to the widget that allows for sub-filtering by
allowable image types.

* Optionally, once something like Arun's Resource Sharing tools/repository
exists [3], the selector can be integrated to pull new symbols down, or
possibly browse on-line ones.

* Optionally allow the widget to dynamically have two basic aspect ratio
layouts, horizontal and vertical, for when embedding in a wider variety of
parent layouts.

Once the class is fixed up, it can replace the embedded code in symbology
and the selector in Composer, and offer a consistent selector to be used
across the app and by plugin developers.

Any opinions on this would be greatly appreciated. While I can code this, I
do not currently have time to do so. Anyone looking for a straightforward
and very useful project, this is a good one.

[0] http://hub.qgis.org/issues/7764
[1] http://drive.dakotacarto.com/qgis/svg-selector.png ,
[2] http://hub.qgis.org/issues/8257



> Finally, I could not find anywhere the nice set of north arrows we had
> (justa couple
> of poor wind roses.
> Am I missing something?
> All the best.
> - --
> Paolo Cavallini - Faunalia
> www.faunalia.eu
> Full contact details at www.faunalia.eu/pc
> Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
> Version: GnuPG v1.4.14 (GNU/Linux)
> Comment: Using GnuPG with Icedove - http://www.enigmail.net/
> iEYEARECAAYFAlJFtI8ACgkQ/NedwLUzIr4zoQCgoaFs/kbOpeKOr9U47IdhiXwh
> 0Y4An2W0chAgZ24q8TmQYt+2LH5TuBZN
> =bMNc
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130927/452cfa58/attachment.html>

More information about the Qgis-developer mailing list