[Qgis-developer] adding entry to legend view

nitin quick quick.nitin at gmail.com
Thu Jul 20 08:05:05 EDT 2006


hi marco,
for simplicity i avoided implementing as one of dataSources. I will upgrade
to what you had told later.
 Currently i added a tablewidget to my plugin which displays my desired
current location on map. I wants to make mouse interactive with my elements
on anvas in the sense that whenever there is a click on such item ,
corresponding entry in the table will be highlighted or table will scrolled
to that entry. For this i used QgsMapCanvas::xyCoordinates signal. This i
had connected to one of slot ion my plugin. Now issue here is from same
class QgsMapCanvas signal renderComplete() is being propogated to my plugin
but xyCoordinates() is not. Can you suggest what could be the source of
problem . i also found in QgsMapCanvas::contentsMouseMoveEvent() signal
xyCoordinates is continuously being emitted.

Can you guide me in my approach or there is some other better way by which i
can achieve it.

regards
quickNitin

On 7/14/06, humarco <marco.hugentobler at karto.baug.ethz.ch> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20060720/0892583f/attachment.html


More information about the Qgis-developer mailing list