[Qgis-developer] vector layer updates heads-up

Tim Sutton tim at linfiniti.com
Tue Aug 12 19:00:39 EDT 2008


Hi Jurgen

Wow these sound like really great improvements. I am only able to make
a brief reply now and will try to chat further on irc tomorrow:

- would it be easy / feasible to add a selectionSize method that
returns how many selected features there are? This will enable among
other things showing progress when iterating features.

- do your changes allow concurrent editing of attribute and digitising
of features - I have some uncommited stuff to provide table in dock
but ran into issues in this kind of mutimode editing.

I'll ask other stuff on IRC

regards

Tim

On 8/12/08, Jürgen E. Fischer <jef at norbit.de> wrote:
> Hi there,
>
> I'm currently working on the vector layer.  Originally I only wanted to
> add additional widgets to edit attributes.  Additionally to the
> traditional line edit I want to have a combobox using the existing
> attribute values (using the providers getUniqueValues()), a combobox
> that selects from a value map and maybe more (eg. angles with a spin
> box, dates, etc).
>
> Doing that I stubbled into some vector layer deficiencies resulting in
> following changes:
>
> commitAttributeChanges() is removed and replaced with addAttribute(),
> deleteAttribute() and changeAttributeValue().  Thereby the vector layer
> can keep handle all updates transparently until they are commited or
> rolled back.
>
> featuresInRectangle() can be thereby be used for both rendering and
> labeling (currently labeling is done directly on the data provider with
> the old attributes) without carring about the updates.
>
> The vector layer now also emits signals when editing starts or ends,
> when attributes are added or deleted or attribute values change (to be
> used by the attribute table, legend, QgisApp etc.).
>
> It's now also easily possible to add editing attributes elsewhere (like
> the identify dialog).
>
> I also moved some code:
> - toggleEditing() logic from the legend to QgisApp
> - attribute table logic from the legend to the attribute table itself
> - remove toggleEditing() logic from the attribute table and use QgisApp
>   instead
> - tracking and commiting attribute value changes from attribute table to
>   vector layer.
> - Adding and removing attributes from the attribute table to a new tab
>   in the vector layer properties.
>
> Attribute table and legend now connect to the vector layer signals to do
> the (visual) updates.
>
> QgisApp also has a static method instance() now, that allows everyone to
> connect to QgisApp signals or slots (like the attribute table).
>
> I also changed the vector data providers supportedNativeTypes() to
> report individual QVariant::Types (useful when adding attributes).
>
> As I've noticed #1215, I'm uploading my current work to [1] to gain some
> feed back, although it's not finished yet...
>
>
> Jürgen
>
>
> [1] http://buten.norbit.de/~jef/qgis-vlayer.diff
>
> --
> Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-0
> Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
> Software Engineer         D-26506 Norden               http://www.norbit.de
>
> --
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>

-- 
Sent from my mobile device

Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
Blog: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net


More information about the Qgis-developer mailing list