qgis/Quantum-GIS — pull request #443 by olivierdalang (2013-02-26 19:58:44+00:00)
Title: Composer items unique ids

Hi !

Following that discussion : http://osgeo-org.1560.n6.nabble.com/Composer-item-s-IDs-td5034938.html

The idea is to implement Uuids for QgsComposerItems, allowing to store some composer-item specific settings (for plugins, collapsibleboxes states, etc...)

1) ID : this property is unaltered. It is still a user-defined QString
which is not necessarily unique. Only thing changed : all
QgsComposerItems now show the ID as a ToolTip. (same behaviour as
current QgsComposerMap)

2) UUID: this is a new property, which is not modifiable. It consists
of a QUuid geneated QString (looking like
{00000000-0000-0000-0000-000000000000} ). The Uuid is generated on
creation. It is kept when cut/paste, but regenerated on copy/paste and
on template loading. This way, the Uuid should always be unique.

This induces no API changes.

Another pull request will follow to make QgsComposerMap use this uuid instead of
int QgsComposerMap::id() (since this hides QString QgsComposerItem::id() ), but this induces some deeper changes and potential API change, so I prefer to do it separately.