Marble/OnlineServices

From KDE TechBase
Revision as of 15:50, 25 July 2009 by Tampakrap (talk | contribs) (Created page with '{{TutorialBrowser| series=Marble Tutorial| name=Creating your first Marble Online Services Plugin| pre=[http://mindview.net/Books/TICPP/ThinkingInCPP2e.html C++], [http://www....')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Creating your first Marble Online Services Plugin
Tutorial Series   Marble Tutorial
Previous   C++, Qt, KDE4 development environment
What's Next  
Further Reading   CMake

This Tutorial is unfinished, I'll finish it in a few days.

Abstract

You will here learn to create your own online service plugins. If you don't know what is meant by online service, you will see these in the Marble menu at "View"->"Online Services". You'll need KDE 4.3 to build this tutorial. If you want to write plugins for Marble, it could be useful to do this in KDE's subversion. Please contact the Marble developers for this (IRC, E-Mail).

Structure

An online services plugin or data plugin consist of three classes at least. The class to display the information is the Data Item (the base class is AbstractDataPluginItem). It stores the information for single places on the map and displays them.

The Model (base class AbstractDataPluginModel) stores all items. Storing the items will be done by AbstractDataPluginModel itself. Your only job is to get information for new items when the displayed part of the earth changes. This can include downloading so called "Description files" from the servers of an online service and parsing them. These "Description files" contain lists of items in a specific part of the earth (specified by a LatLonAltBox).

The class based on AbstractDataPlugin is the representation class of our plugin. It provides the name and the idea of the plugin. You also have to set your model there.