[Marble-devel] Re: Programatically add click-able item..

Torsten Rahn tackat at t-online.de
Thu Feb 17 12:17:40 CET 2011


Hi,

Sorry for replying this late.

On Saturday, 12. February 2011 03:26:56 Paul Danko wrote:
> I am new to marble plugin development, but I have a few questions I haven’t
> been able to answer via searches on the web or looking through marble
> source.

Great!  
 
> I was able to create custom layers using Torstens tutorials via inheriting
> from LayerInterface. I also understand that programmatically adding
> clickable items (like placemarks) can only be done from a plugin, unless I
> implement mouse tracking manually to see if my items intersect with current
> mouse position (translated into coordinates).

Well if you need a custom menu or action then the recommended way is to use 
plugins indeed (or inheriting from the Widget, and creating a new Input 
handler). 
 
> What is the best mechanism for programmatically adding a clickable item
> (perhaps one for which I can define the action associated with the click)
> within a plugin?

Did you have a look at the existing Online Plugins such as the Wikipedia / 
Photo / Earthquake plugins? Does your use case fit into that area or is it 
somewhat different?

Does your item consist of a plain pixmap or do you want it to be a linestring 
/ polygon?


> If there are some thoughts to adding a way to programatically add an item
> via the MarbleWidget object, I would be open to helping contribute to get
> it into the baseline.

Cool. The whole GeoGraphicsItem-area is still not considered feature complete 
and we welcome patches for improving the code base. Just put up your patches 
on reviewboard.kde.org or if you have questions about concepts in advance you 
can chat with us either here or on IRC (#marble). 

Best Regards,

Torsten

> 
> 
> Thanks,
> 
> 
> 
> -Paul



More information about the Marble-devel mailing list