Warning, /education/marble/src/DESIGN is written in an unsupported language. File is not indexed.
0001 0002 <<< WARNING: MOST OF THIS CONTENT IS NOT UP-TO-DATE >>> 0003 0004 0005 This file describes the design and structure of Marble 0006 0007 1. The main structure 0008 ===================== 0009 0010 Marble, the application, currently consists two main widgets: 0011 - a MarbleWidget that contains the view of the world, and 0012 - a MarbleControlBox that controls it. 0013 0014 The MarbleWidget is a view for the model represented by the MarbleModel 0015 class, which contains all the data necessary for manipulating and 0016 displaying the map. 0017 0018 0019 1.1 Library 0020 ------------ 0021 0022 The MarbleWidget is a very complex widget with lots of helper classes. 0023 MarbleWidget is contained in a library with just a few exported 0024 classes. Here we will present the exported classes of the library: 0025 0026 - MarbleWidget 0027 - MarbleModel 0028 - MarbleControlBox 0029 0030 These classes comprise the main interface to the Marble library. 0031 0032 0033 - PlacemarkModel 0034 - KAtlasThemeSelectView 0035 - LegendBrowser 0036 - SearchListView 0037 - (MarbleNavigator) 0038 0039 These are mainly parts of the more complex MarbleControlBox. The 0040 individual controls inside MarbleControlBox can be used by themselves 0041 if you want to create a simpler user interface. 0042 0043 NOTE: MarbleNavigator is currently not part of the library, but it 0044 will be moved there before the next release. 0045 0046 0047 - MapTheme 0048 0049 This class contains a set of colors, an icon some other misc data that 0050 will control the appearance of the map. By defining a new MapTheme, 0051 you can give a new appearance of an already existing map. 0052 0053 0054 - KAtlasAboutDialog (to be renamed into MarbleAboutDialog) 0055 0056 This is a special utility class which displays some information about 0057 Marble, shows the authors and will also show the license in the 0058 future. 0059 0060 0061 0062 2. The World Model 0063 ================== 0064 0065 The model of the world consists of 3 different parts, which can be 0066 viewed as separate layers: 0067 0068 - A pixel based area that is split up into tiles. Depending on the 0069 dataset, these tiles are produced from different data sources, 0070 either from satellite scans or from photographs. The tiles are 0071 stored in several different resolutions that are used in different 0072 zoom levels. The tiles are automatically generated the first time 0073 that the application is started, and are stored into 0074 $HOME/.marble/data/maps. For packaging purposes or to offer the 0075 same data to multiple users you can move these tiles into the 0076 system directory where marble gets installed (e.g. 0077 /usr/share/apps/marble/data/maps). 0078 0079 The main class of the tiles layer is the TextureMapper, which maps 0080 a tiled texture onto the projected sphere. 0081 0082 - Vectors that represent different kinds of borders -- geographical 0083 or political -- or features. Geographical borders can be 0084 coastlines, islands or lakes, but also rivers. Political borders 0085 are mostly countries, but also the states of the USA. Special 0086 features include the grid of lines that show the latitude and 0087 longitude as well as the tropics and arctics. 0088 0089 The main classes of the vectors are the GeoPolygon and the PntMap, 0090 which contain the actual vectors, but also a bounding box 0091 that specifies which area is being covered by each polygon. 0092 0093 - Points of interest, represented by the Placemark class. Right now 0094 these are mostly cities, but also some mountains and sea deeps. 0095 0096 The Placemark has a somewhat arbitrary selection of properties 0097 which comes from the Google Earth KML format. This will be 0098 restructured in future versions. Another important class is the 0099 PlacemarkContainer which collects a number of Placemarks into a 0100 container, just like the name suggests. A third level is provided 0101 by the PlacemarkManager class which manages several 0102 PlacemarkContainers (currently just one) and also imports and 0103 exports it to/from files in various file formats. 0104 0105 0106 For most maps, these 3 layers are just painted on top of each other in 0107 simple bottom top order. However, the Topographical Atlas View (the 0108 default view!) provides a special map in terms of composition: 0109 0110 The Topographical Atlas View "merges" the Texture (which contains 0111 the digital elevation data) and a Vector Layer to create a 0112 recolorized bumpmapped layer via the TextureColorizer class. 0113 0114 All map views and their use of layers get specified in a *.dgml XML 0115 file. The source format for the Placemark layer is Google Earth's KML 0116 file format which gets parsed and cached into a temporary binary file 0117 (.cache) for faster follow-up reading. 0118 0119 0120 2.1 The Tile System 0121 ------------------- 0122 0123 0124 FIXME: To be written... 0125 0126 0127 2.2 The Vector System 0128 --------------------- 0129 0130 FIXME: To be written... 0131 0132 FIXME: Explain the way nodes get filtered e.g. by ClipPainter. 0133 0134 FIXME: Explain the differences between the GeoPolygon and the 0135 ScreenPolygon, and how they interact. Also the PntMap and the 0136 VectorMap. 0137 0138 0139 2.3 Placemarks 0140 -------------- 0141 0142 FIXME: To be written... 0143 0144 FIXME: Explain how Placemark labels are placed so they don't cover each 0145 other. 0146 0147 0148 3. The Painting Process 0149 ======================= 0150 0151 FIXME: To be written... 0152 0153 0154 4. Library 0155 ========== 0156 0157 This section describes the library in more detail than the overview 0158 above, including the internal classes that are not exported to the 0159 external applications. This section is for developers that want to 0160 develop Marble itself, and not just use the classes in his/her own 0161 application. 0162 0163 0164 4.1 The Basic Building Blocks 0165 ----------------------------- 0166 0167 Quaternion 0168 GeoDataPoint, GeoPolygon, PntMap 0169 ScreenPolygon, VectorMap 0170 0171 0172 4.2. Class Overview 0173 ------------------- 0174 0175 Here follows now a list of classes, their roles and how they interact. 0176 0177 Basic classes 0178 - - - - - - - 0179 0180 Quaternion A simple implementation of the mathematical concept 0181 quaternion. 0182 0183 GeoDataPoint A point on the earth, (lon, lat) 0184 GeoPolygon A path or polygon on the earth, consisting of a vector 0185 of GeoDataPoints 0186 PntMap A collection of GeoPolygons ( QVector<GeoPolygon *> ) 0187 FIXME: Rename and move from GeoPolygon.h into own file. 0188 0189 ScreenPolygon A path or polygon on the screen. Uses screen 0190 coordinates. Uses floats due to antialiasing. 0191 VectorMap A Vector of ScreenPolygons. 0192 Rename FIXME 0193 GridMap The grid of lat-lon lines on the map. 0194 Another Vector of ScreenPolygons. Perhaps it should 0195 inherit or contain a VectorMap. 0196 0197 Placemark A point on the earth with some additional data. Can be 0198 selected and manipulated. Has a name. Today mostly 0199 used for cities of different size. 0200 At this point somewhat arbitrary in its choice of 0201 properties. Contains (among others): 0202 - Coordinate (GeoDataPoint) 0203 - Role (QChar) -- city, capital, etc 0204 - Population (int) 0205 - Description (QString) 0206 - Countrycode (QString) 0207 - View stuff (selected, labelstring, boundingbox, etc) 0208 0209 PlaceContainer A list of Placemarks ( QVector<Placemark *> ) 0210 0211 0212 Model / View 0213 - - - - - - - 0214 0215 MarbleModel The main model. Contains (among others): 0216 - MapTheme 0217 - GridMap 0218 - VectorComposer 0219 - PlacemarkManager 0220 - PlacemarkModel 0221 0222 VectorComposer Manages the different vector sub-layers which consist 0223 of coastlines, islands, lakes, glaciers, rivers 0224 as well as borders for the countries and the US 0225 States. These are all stored in PntMaps, one for each 0226 type. FIXME: Change Name. 0227 0228 MarbleWidget The view of a MarbleModel. 0229 0230 0231 Widgets 0232 ------- 0233 KAtlasControl The main window. Contains a MarbleWidget and a 0234 MarbleControlBox. 0235 0236 0237 Unsorted 0238 -------- 0239 0240 class ClipPainter; 0241 class HttpFetchFile; 0242 class KAtlasAboutDialog : public QDialog, private Ui::katlasAboutDialog { 0243 class KAtlasCrossHair : public QObject { 0244 class MarbleDirs 0245 class KAtlasFlag : public QObject { 0246 class KAtlasMapScale : public QObject { 0247 class KAtlasThemeSelectView : public QListView { 0248 class KAtlasTileCreatorDialog : public QDialog, private Ui::KAtlasTileCreatorDialog { 0249 class KAtlasTileCreatorDialog: public Ui_KAtlasTileCreatorDialog {}; 0250 class KAtlasViewInputHandler; 0251 class KAtlasViewPopupMenu; 0252 class KAtlasWindRose : public QObject { 0253 class KAtlasXmlHandler : public QXmlDefaultHandler { 0254 class MapTheme : public QObject 0255 class MeasureTool; 0256 class PlaceFolder : public QVector<Placemark*> { 0257 class PlacemarkInfoDialog: public Ui_PlacemarkInfoDialog {}; 0258 class PlacemarkManager; 0259 class PlacemarkModel : public QAbstractListModel { 0260 class PlacemarkPainter : public QObject { 0261 class QAbstractItemModel; 0262 class QMenu; 0263 class QStandardItemModel; 0264 class SearchComboBox : public QComboBox { 0265 class SearchListView : public QListView { 0266 class TextureColorizer; 0267 class TextureLoader; 0268 class TextureMapper { 0269 class TextureTile; 0270 class TileCreator : public QObject { 0271 class TinyWebBrowser : public QTextBrowser { 0272 class katlasAboutDialog: public Ui_katlasAboutDialog {};