Marble/MarbleDesigner: Difference between revisions

From KDE TechBase
No edit summary
No edit summary
Line 1: Line 1:
== Using the MarbleWidget Designer Plugin ==
{{Template:I18n/Language Navigation Bar|Editing Projects/Marble/MarbleDesigner}}
{{TutorialBrowser|
 
series=Marble Widget Plugin for Qt Designer |
 
name=Look Mom, No Code!|
 
pre=[http://doc.trolltech.com/designer-manual.html Qt Designer]|
}}
 
== Using the MarbleWidget Plugin for Qt Designer ==


The MarbleWidget is also offered as a designer plugin. If you compile Marble yourself you probably need to enable the compilation of the designer plugin:
The MarbleWidget is also offered as a designer plugin. If you compile Marble yourself you probably need to enable the compilation of the designer plugin:

Revision as of 09:00, 11 February 2009


Editing Projects/Marble/MarbleDesigner

Look Mom, No Code!
Tutorial Series   Marble Widget Plugin for Qt Designer
Previous   Qt Designer
What's Next   n/a
Further Reading   n/a

Using the MarbleWidget Plugin for Qt Designer

The MarbleWidget is also offered as a designer plugin. If you compile Marble yourself you probably need to enable the compilation of the designer plugin:

If your source directory is "~/marble" and your build directory is "~/marble_build" then you can enable compilation of the designer plugin via the cmake call:

cmake -DWITH_DESIGNER_PLUGIN=ON ../marble

Once you have compiled marble using make you can install everything using "make install". This should install the file

MarbleWidgetPlugin.so

into Qt's designer plugin directory (please check this in case things don't work out).

Once you start Qt Designer you should spot a new "Marble Desktop Globe" category in the widget box on the left. You can just use this MarbleWidget like all other widgets by dragging it onto your form and by adjusting the properties of the MarbleWidget.

As a ready-made example you can load the two examples in:

marble/examples/example1.ui marble/examples/example2.ui

The examples nicely demonstrate how signals and slots work with the MarbleWidget.