[Qgis-developer] adding entry to legend view

humarco marco.hugentobler at karto.baug.ethz.ch
Fri Jul 14 06:33:46 EDT 2006


Hi Nitin,

It seems to me that your plugin is special in its real-time behaviour and 
canvas update mechanism (only draw new elements) and i agree that the vector 
provider/ vector layer interface are not well suited for this. 
But on the other hand your plugin feeds vector elements into qgis and you 
require functions like selection of features and insertion into the legend 
(and there perhaps reordering with other layers?). This functions are already 
written for vector layers and it would not be good coding style to rewrite 
them for canvas items.
For me it seems a better solution (at least in long term) to extend qgis such 
that it may handle real time data sources (as layers) in an appropriate way.

cheers,
Marco   


Am Mittwoch, 12. Juli 2006 15:39 schrieb nitin quick:
> i think it may not be.
> I don't think i could call named pipe as vector data source. It is more of
> asynchronous which i can ultimately desire to save as  one of the
> postgis/shape file(i am looking to work on that later since i curently have
> no idea in this regard.). Also that data from pipe can keep on coming for
> 18 minuets asynchrnously, so i am treating it as  non stop data, also how
> many thread will push data on pipe are not static.
> Iam also no able to intrepret it" So all you need to do is to add this
> provider to a vector layer and add this layer to the legend". I think it
> mean simply add it as a vector lyer and  to legend. but what about updation
> of it which may flicker badly if again a layer is refreshed completely.
> only some points may get changed.
>
> Now i am thinking  2 ways of doing it.
> First:  use QgsDataProvider then provide functionality for all the
> functions.i feel i ned to work out on Spatial refrence system. These Points
> currently i am intrepreting over map but i want them to come independently
> of map. SRS i am good at. This concept is very weak of mine. Then
> Projection WKT, for simple points defining latlong location what i can feed
> to it. No idea.
> Then how to keep updating it, same issue.
> Second is extension to my current plugin which display points read from
> fifo on canvas using qgsmapcanvasitem. Then i am thinking of generating a
> grid kinda view with each row for each element updating them continuously
> for location . What i also looking for is if i click on any item on canvas
> it should get highletd with correspondent or vice versa.i need to capture
> click event of canvas but i need to work out here how to capture click(
> which i think cnavas provides) and associate it to one of the object.
>
> I need help on above issue. I think ihave cleared well what i am thinking
> of doing. Any suggestion or guidance is open heartidily welcome.
>
> regards
> quick nitin



More information about the Qgis-developer mailing list