[Qgis-developer] What to do with attribute actions

Martin Dobias wonder.sk at gmail.com
Wed Apr 26 17:35:45 EDT 2006


Hi Gavin,

ok, I've moved attribute actions to the core library and created an
interface for gui independent output, so it should work for every app.

Therefore vector layer's class could be moved to core library without
problems, so I've decided not to create QgsCoreVectorLayer as a more
general interface.

Martin


On 4/26/06, Gavin Macaulay <gavin at macaulay.co.nz> wrote:
> Martin,
>
> I can think of a few instances where the attribute actions could by used
> by a 3rd party non-gui application (e.g., run an external program based on
> the attribute features in the current map bounding box). When qgis gets a
> scripting language I can see the actions becoming a part of the scripting
> ability, and I'd definitely want to see scripts in the non-GUI part of the
> qgis.
>
> An action is associated with the attributes of a geometry feature, and as
> such doesn't need to involve GUI classes.
>
> I think that a more general solution would be to abstract out the
> attribute actions and provide a specialisation that displays the output in
> the QgsMessageBox as present, with the non-specialised version using files
> or stdout, etc.
>
> Your suggestion about abstracting the QgsVectorLayer class would yield
> other benefits to those mentioned below, and may be a good idea in any
> case.
>
> Gavin
>
>
>
> Hi,
>
> the last thing regarding handling vector layers to resolve in library
> refactoring is to resolve attribute actions. The problem is that
> vector layer owns a set of these actions, however these are GUI
> dependent (they use QgsRunProcess to run the action which uses
> QgsMessageViewer to show the output).
>
> It would be possible to make attribute actions GUI independent,
> however I don't think that this feature could be used in 3rd party
> apps which will use core library, therefore I suggest creating a
> vector layer for core library e.g. QgsCoreVectorLayer, then QGIS
> application will have derived vector layer's class called
> QgsVectorLayer as before which will be more specialized. This would
> enable also more QGIS specific stuff to layer's definition without
> having to change basic layer's definition.
>
> Please share your opinions...
>
> Bye,
> Martin
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>



More information about the Qgis-developer mailing list