[Marble-devel] User interaction with data in a LayerInterface subclass

Amit Chaudhuri amit.k.chaudhuri at gmail.com
Tue May 8 19:08:18 UTC 2012


Hi all,

[a word in praise of the techbase tutorials: they've been most helpful in
getting me started using marblewidget in my own applications.]

I store data on nodes and links in sqlite.  I have successfully added a
LayerInterface sub-class to a marblewidget and can show the nodes and links
in a manner which I'm very happy with.  I've followed the tutorial and
provided a render method which queries the database and then hands off
requests to draw points or lines using methods which wrap calls to
GeoPainter.  This handles the visual side of things very, very nicely.  My
problem comes with where I want to go and here's where I could use some
advice.

I want to be able to interact with individual lines or nodes by hovering
with a mouse, double clicking or selection through a menu.  I want to show
data such as a node code or a description when an item is hovered over.
I'd like to be able to double click and bring up a read only(?) form which
holds anything I've chosen to store in a database table associated with the
item.  This might be notes in an html file, an image of a building, string
or numeric data or a mixture of all of the above.  I'm quite happy with the
database side of this but I'm not sure where to start with the marble end.

Eventually, I'll probably want to have read/write capability (hence '?'
above).

Can I do what I want with the LayerInterface approach? If so, how do I
select an item?  [Might I be able to use the event filter and some
positional information to achieve this?]

If LayerInterface won't cut it, what sort of strategy would you suggest?

Grateful for any pointers..

Regards,


Amit (a.k.a A799679)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120508/85867074/attachment-0001.html>


More information about the Marble-devel mailing list