[Marble-devel] dbus interface to Marble, some questions

Torsten Rahn rahn at kde.org
Sat Feb 28 01:48:02 CET 2009


On Friday 27 February 2009 09:02:21 Arnd Baecker wrote:
> http://techbase.kde.org/Development/Tutorials/D-Bus/Introduction
> for more info.
>
> To give some more examples (which I will add to the wiki, promised ;-):

GREAT! :-)

> Actually, qdbusview shows "MarbleWidget::setHome" twice,

yes and clicking on each gives the same number of parameters queried ;-( 
Looks like a qdbusview bug to me: qdbusview seems to have problems with 
overloaded functions (is overloading allowed in dbus even? If it's not we need 
to cherry-pick the "scriptable" methods).

> presumably because MarbleWidget.cpp defines both
>   void MarbleWidget::setHome( qreal lon, qreal lat, int zoom )
>   void MarbleWidget::setHome(const GeoDataCoordinates& homePoint, int zoom)
> ?

Yes, maybe it helps if we just explicitely mark the preferred methods as 
scriptable (see qt docs). 

>   CALL org.kde.MarbleWidget.openGpxFile /tmp/test.gpx
>   Invalid number of parameters

I've just google'd for this error message + qdbus. Could be another bug in 
qdbus :-/

> Now my main question: Is there any way, to get the
> lon,lat,zoom of the center of the current view as return parameters
> using a dbus call?

yes, currently I've just "exported" all slots. You are right that we need to 
markt the getters (which do exist in the C++ API - but don't get prefixed with 
"get" according to Qt standards) as scriptable to export them to the d-bus 
interface.

Torsten




More information about the Marble-devel mailing list