[Marble-devel] Help with MarbleWidget

Torsten Rahn tackat at t-online.de
Fri Jul 23 09:10:45 CEST 2010


Hi Bryan,

Sorry, so far I haven't managed to write up the Tutorial I promised earlier. :-(

Currently the only other way to add placemarks is through:

void MarbleWidget::addPlacemarkFile( const QString &filename );
void MarbleWidget::addPlacemarkData( const QString& data, const QString& key = 
"data" );

The file or string has got to be formatted as a KML file:

http://de.wikipedia.org/wiki/Keyhole_Markup_Language

This is quite convenient but the results are currently rather "fixed". 

So instead you might want to draw your own placemarks using the GeoPainter's 
Annotations for example.

On Friday 23 July 2010 02:52:11 Bryan Greenway wrote:
> I am trying to put the MarbleWidget into a Qt only application using Qt
> Creator, and am having some difficulty.  Here's is what I've done thus far:
> 1.       Followed instructions for downloading and compiling Marble on
> Windows.  That seemed to go fine.
> 2.       I looked at the QtMainWindow.cpp as a model for what I was putting
> together.  I deviated from that approach somewhat as I am creating a simple
> Dialog app.  On this dialog, I am trying  to instantiate a ControlView (as
> is done in QtMainWindow) from ControlView.cpp/.h.  See dialog.cpp/.h below.
> It appears to me that I'm not getting my libmarblewidget library to link.
> The file: libmarblewidget.dll is definitely in the
> c:\marble-build\src\lib\" directory.  And the makefile has the line:
> LIBS        =        -L"c:\Qt\2010.04\qt\lib" -lmingw32 -lqtmain
> "-Lc:\marble-build\src\lib -lmarblewidget.dll" -lQtGui4 -lQtCore4

I don't see a problem with these. Looks all fine to me (but I don't have any 
experience with compiling Marble on Windows, so ...).
 
> It also appears to me that I need to link in something for the
> MarbleControlBox and MapThemeManager.  I'm guessing that these are not part
> of the MarbleWidget, so something else will need to be included.

They are part of the library and they should get included from the ControlView 
IIRC. You can of course include the headers of those files but it doesn't look 
like a header problem to me - rather some problem with linking. 

Best Regards,

Torsten



More information about the Marble-devel mailing list