marble/src
MarbleModel Class Reference
#include <MarbleModel.h>

Detailed Description
The data model (not based on QAbstractModel) for a MarbleWidget.This class provides a data storage and indexer that can be displayed in a MarbleWidget. It contains 3 different datatypes: tiles which provide the background, vectors which provide things like country borders and coastlines and placemarks which can show points of interest, such as cities, mountain tops or the poles.
The tiles provide the background of the image and can be for instance height and depth fields, magnetic strength, topographic data or anything else that is area based.
The vectors provide things like country borders and coastlines. They are stored in separate files and can be added or removed at anytime.
The placemarks contain points of interest, such as cities, mountain tops or the poles. These are sorted by size (for cities) and category (capitals, other important cities, less important cities, etc) and are displayed with different color or shape like square or round.
- See also:
- MarbleWidget
Definition at line 91 of file MarbleModel.h.
Constructor & Destructor Documentation
| MarbleModel::MarbleModel | ( | QWidget * | parent | ) |
Construct a new MarbleModel.
- Parameters:
-
parent the parent widget
Definition at line 75 of file MarbleModel.cpp.
| MarbleModel::~MarbleModel | ( | ) | [virtual] |
Definition at line 151 of file MarbleModel.cpp.
Member Function Documentation
| void MarbleModel::paintGlobe | ( | ClipPainter * | painter, | |
| int | width, | |||
| int | height, | |||
| ViewParams * | viewParams, | |||
| bool | redrawBackground, | |||
| const QRect & | dirtyRect | |||
| ) |
Paint the model into the view.
- Parameters:
-
painter the QPainter used to paint the view width the width of the widget height the height of the widget viewParams the view parameters controlling the paint process redrawBackground a boolean controlling if the background should be redrawn in addition to the globe itself dirtyRect the rectangle of the widget that needs redrawing.
NOTE: This function will probably move to MarbleWidget in KDE 4.1, making the MarbleModel/MarbleWidget pair truly follow the Model/View paradigm.
Definition at line 339 of file MarbleModel.cpp.
| QAbstractItemModel * MarbleModel::placeMarkModel | ( | ) | const |
Return the list of PlaceMarks as a QAbstractItemModel *.
- Returns:
- a list of all PlaceMarks in the MarbleModel.
Definition at line 473 of file MarbleModel.cpp.
| QItemSelectionModel * MarbleModel::placeMarkSelectionModel | ( | ) | const |
Definition at line 478 of file MarbleModel.cpp.
| QString MarbleModel::mapTheme | ( | ) | const |
Return the name of the current map theme.
- Returns:
- the identifier of the current MapTheme. To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:
Definition at line 188 of file MarbleModel.cpp.
| MapTheme * MarbleModel::mapThemeObject | ( | ) | const |
Definition at line 194 of file MarbleModel.cpp.
| void MarbleModel::setMapTheme | ( | const QString & | selectedMap, | |
| QWidget * | parent, | |||
| Projection | currentProjection | |||
| ) |
Set a new map theme to use.
- Parameters:
-
selectedMap the identifier of the selected map theme parent the parent widget currentProjection the current projection
NOTE: Both the parent and currentProjection parameters will disappear soon.
The ID of the new maptheme. To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:
Example: maptheme = "bluemarble/bluemarble.dgml"
Definition at line 210 of file MarbleModel.cpp.
| int MarbleModel::minimumZoom | ( | ) | const |
| int MarbleModel::maximumZoom | ( | ) | const |
| HttpDownloadManager * MarbleModel::downloadManager | ( | ) | const |
Return the downloadmanager to load missing tiles.
- Returns:
- the HttpDownloadManager instance.
Definition at line 310 of file MarbleModel.cpp.
| void MarbleModel::setDownloadManager | ( | HttpDownloadManager * | downloadManager | ) |
Set the downloadmanager to load missing tiles.
- Parameters:
-
downloadManager the HttpDownloadManager instance
Definition at line 316 of file MarbleModel.cpp.
| void MarbleModel::addPlaceMarkFile | ( | const QString & | filename | ) |
Definition at line 518 of file MarbleModel.cpp.
| QVector< QPersistentModelIndex > MarbleModel::whichFeatureAt | ( | const QPoint & | curpos | ) | const |
Definition at line 525 of file MarbleModel.cpp.
| PlaceMarkLayout * MarbleModel::placeMarkLayout | ( | ) | const |
Definition at line 498 of file MarbleModel.cpp.
| VectorComposer * MarbleModel::vectorComposer | ( | ) | const |
Definition at line 483 of file MarbleModel.cpp.
| TextureColorizer * MarbleModel::textureColorizer | ( | ) | const |
Definition at line 488 of file MarbleModel.cpp.
| AbstractScanlineTextureMapper * MarbleModel::textureMapper | ( | ) | const |
Definition at line 493 of file MarbleModel.cpp.
| GpsLayer * MarbleModel::gpsLayer | ( | ) | const |
Definition at line 503 of file MarbleModel.cpp.
| GpxFileModel * MarbleModel::gpxFileModel | ( | ) | const |
Definition at line 508 of file MarbleModel.cpp.
| FileViewModel * MarbleModel::fileViewModel | ( | ) | const |
Definition at line 513 of file MarbleModel.cpp.
| bool MarbleModel::showGps | ( | ) | const |
Return whether the Gps Data is visible.
- Returns:
- The Gps Data visibility.
Definition at line 168 of file MarbleModel.cpp.
| void MarbleModel::setShowGps | ( | bool | visible | ) |
Set whether the Gps Data is visible.
- Parameters:
-
visible visibility of the Gps Data.
Definition at line 173 of file MarbleModel.cpp.
| void MarbleModel::startPolling | ( | int | time = 1000 |
) |
Start the model's timer polling.
- Parameters:
-
time the amount of milliseconds between each poll
Definition at line 178 of file MarbleModel.cpp.
| void MarbleModel::stopPolling | ( | ) |
| void MarbleModel::creatingTilesStart | ( | TileCreator * | , | |
| const QString & | name, | |||
| const QString & | description | |||
| ) | [signal] |
| void MarbleModel::themeChanged | ( | QString | mapTheme | ) | [signal] |
Signal that the map theme has changed, and to which theme.
- Parameters:
-
name the identifier of the new map theme.
- See also:
- mapTheme
| void MarbleModel::modelChanged | ( | ) | [signal] |
Signal that the MarbleModel has changed in general.
| void MarbleModel::regionChanged | ( | BoundingBox | rect | ) | [signal] |
Signal that a region of the earth has changed.
- Parameters:
-
rect the region that changed.
| void MarbleModel::timeout | ( | ) | [signal] |
Signal that a timer has gone off.
This is currently used only for GPS things right now, but will likely be used for more things in the future.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference