Marble Map Widget as a generator example

Posted by Helge Fredriksen
at 2010-06-03 07:08 +0200

Marble is one of the great achievements of the open source community. It's a kind of FOSS replacement for google earth that allows all kinds of maps to be loaded into a map engine and made zoomable/pannable. Since it's written in Qt and compiles on the newest version 4.6, it makes a great project for testing out the potential of Qt Jambi's generator to be able to map third party widgets to java. So I set forward to do just that.

Brewing your own Qt Jambi stubs towards existing C++ widgets involves creating your own ant project file for building, a typesystem file and a pro file. In addition you need a global.h file to help the generator find the declaration of the C++ classes.  The typesystem file tells the generator which enums and classes to map, and how to do that. I've done the mappings of some of the basic classes of marble in the qtjambi git repo. Also there's a README here which explains the steps one have to do to setup and compile the example here. The simple java source code can be seen here.

This is of course just a start of the mapping of the marble API. If you would like to extend you might do so, please feel free to make an open source project somewhere, or just use gitorious as I did.

Here's a screenshot of how it can look like:


← Back to blog
blog comments powered by Disqus
← Back to blog
This page was updated at 17.05.2016