Marble/MarbleDesigner: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
=== Compiling the MarbleWidget Plugin === | === Compiling the MarbleWidget Plugin === | ||
The | The Marble Widget 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: | 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: | ||
Line 22: | Line 22: | ||
Once you have compiled | Once you have compiled Marble using make you can install everything using "make install". This should install the file | ||
<code> | <code> | ||
Line 39: | Line 39: | ||
=== Using the MarbleWidget Plugin === | === Using the MarbleWidget Plugin === | ||
You can use this | You can use this Marble Widget just like all other widgets inside Designer: Once you have started Designer you can choose a new form from the ready-made templates (e.g. a QWidget). Now you can just drag and drop the Marble Widget from the widget box onto your form: | ||
Line 45: | Line 45: | ||
The map properties of the | Alternatively we also provide other widget plugins that allow controlling the Marble Widget: e.g. the navigation widget plugin and the latitude-longitude widget plugin. | ||
The map properties of the Marble Widget can be adjusted in the Property Editor on the right: all properties get assigned and displayed immediately on the map without having to press the "Preview" menu entry. | |||
Line 58: | Line 60: | ||
</code> | </code> | ||
The file | |||
The file example2.ui nicely demonstrate how signals and slots work with the MarbleWidget: | |||
Line 64: | Line 67: | ||
You can preview the widget by choosing | You can preview the widget by choosing "Preview" from the "Form" menu. Inside the preview it's possible to pan and zoom the map. Of course the signal-slot connections can be tested inside the preview as well. |
Revision as of 15:38, 11 February 2009
Editing Projects/Marble/MarbleDesigner
Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenčina | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
Tutorial Series | Marble Widget Plugin for Qt Designer |
Previous | Qt Designer |
What's Next | n/a |
Further Reading | n/a |
The Marble Widget Plugin for Qt Designer
Compiling the MarbleWidget Plugin
The Marble Widget 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.
Using the MarbleWidget Plugin
You can use this Marble Widget just like all other widgets inside Designer: Once you have started Designer you can choose a new form from the ready-made templates (e.g. a QWidget). Now you can just drag and drop the Marble Widget from the widget box onto your form:
Alternatively we also provide other widget plugins that allow controlling the Marble Widget: e.g. the navigation widget plugin and the latitude-longitude widget plugin.
The map properties of the Marble Widget can be adjusted in the Property Editor on the right: all properties get assigned and displayed immediately on the map without having to press the "Preview" menu entry.
There are two ready-made examples available inside the example directory of the Marble source code:
marble/examples/example1.ui
marble/examples/example2.ui
The file example2.ui nicely demonstrate how signals and slots work with the MarbleWidget:
You can preview the widget by choosing "Preview" from the "Form" menu. Inside the preview it's possible to pan and zoom the map. Of course the signal-slot connections can be tested inside the preview as well.