[Qgis-developer] Composer item's IDs
Olivier Dalang
olivier.dalang at gmail.com
Mon Feb 18 15:38:33 PST 2013
OK I've got something which seems to work well using QUuid.
It's easier with QUuid than an incremental id since there's no need to
store the last key.
It already works more or less, I'll make a pull request soon.
What do you think about the other attribute ? (which would be called
smthg like "Internal name", and would replace current id's behavior)
I'm not sure this is useful though. Maybe it will only be confusing to
the user...
Should I add this attribute or not ?
2013/2/18 Nathan Woodrow <madmanwoo at gmail.com>:
> Olivier,
>
> I added the item id for that reason. Feel free to rework then so they
> are auto generated and unique. That was my intention just never got
> around to it.
>
> - Nathan
>
> Sent from some fancy phone looking thingo
> From: Olivier Dalang
> Sent: 19/02/2013 3:27 AM
> To: qgis-developer at lists.osgeo.org
> Subject: [Qgis-developer] Composer item's IDs
> Hi !
>
> I'm developing a plugin which needs to attach some custom data to some
> Composer Item's instances.
> Thus, I need a way to identify the instances.
>
> I saw that there's an ID attribute in the ComposerItems, but don't
> really know how it's supposed to work. It seems for now it's only an
> user defined value, which remains empty when the user doesn't provide
> it and which also can be duplicated.
> So it seems I can't use this as an unique ID.
>
> What's the best way to do that ?
>
>
> More globally, what is this ID good for ? Is it's behavior not fully
> implemented yet ?
>
> I think it would be useful to auto-assign unique which the user
> couldn't change. If needed, another attribute ("name" or "tag") could
> be added to replace the current "ID" behaviour, allowing the user to
> define custom data.
>
> What do you think ?
>
> Thanks !!
>
> Olivier
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list