Marble/MarbleDesigner

From KDE TechBase
Revision as of 15:22, 7 February 2009 by Tampakrap (talk | contribs) (Marble Designer Plugin - first step by tackat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Using the MarbleWidget 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:

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" group of widgets in the list of available widgets. 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.