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

Detailed Description
Layouts the place marks with a passed QPainter.Definition at line 43 of file PlaceMarkLayout.h.
Public Slots | |
| void | requestStyleReset () |
Public Member Functions | |
| PlaceMarkLayout (QObject *parent=0) | |
| ~PlaceMarkLayout () | |
| void | paintPlaceFolder (QPainter *painter, ViewParams *viewParams, const QAbstractItemModel *placeMarkModel, const QItemSelectionModel *selectionModel, bool firstTime=true) |
| int | maxLabelHeight (const QAbstractItemModel *model, const QItemSelectionModel *selectionModel) const |
| QVector< QPersistentModelIndex > | whichPlaceMarkAt (const QPoint &pos) |
| PlaceMarkPainter * | placeMarkPainter () const |
Constructor & Destructor Documentation
| PlaceMarkLayout::PlaceMarkLayout | ( | QObject * | parent = 0 |
) |
| PlaceMarkLayout::~PlaceMarkLayout | ( | ) |
Member Function Documentation
| void PlaceMarkLayout::paintPlaceFolder | ( | QPainter * | painter, | |
| ViewParams * | viewParams, | |||
| const QAbstractItemModel * | placeMarkModel, | |||
| const QItemSelectionModel * | selectionModel, | |||
| bool | firstTime = true | |||
| ) |
Layouts the place marks.
- Parameters:
-
painter The painter that is used for painting. width The width of the image that shall be painted. height The height of the image that shall be painted. viewParams Parameters that influence the painting. placeMarkModel The PlaceMarkModel or a proxy model on top of it. selectionModel The selection model for the PlaceMarkModel. planetAxis The position of the planet axis. firstTime Whether the map is painted the first time.
First handle the selected place marks, as they have the highest priority.
Now handle all other place marks...
We handled selected place marks already, so we skip them here... Assuming that only a small amount of places is selected we check for the selected state after all other filters
Definition at line 177 of file PlaceMarkLayout.cpp.
| int PlaceMarkLayout::maxLabelHeight | ( | const QAbstractItemModel * | model, | |
| const QItemSelectionModel * | selectionModel | |||
| ) | const |
Returns a the maximum height of all possible labels.
WARNING: This is a really slow method as it traverses all placemarks to check the labelheight. FIXME: Once a StyleManager that manages all styles has been implemented just traverse all existing styles.
Definition at line 144 of file PlaceMarkLayout.cpp.
| QVector< QPersistentModelIndex > PlaceMarkLayout::whichPlaceMarkAt | ( | const QPoint & | pos | ) |
Returns a list of model indexes that are at position pos.
Definition at line 115 of file PlaceMarkLayout.cpp.
| PlaceMarkPainter * PlaceMarkLayout::placeMarkPainter | ( | ) | const |
Definition at line 139 of file PlaceMarkLayout.cpp.
| void PlaceMarkLayout::requestStyleReset | ( | ) | [slot] |
Definition at line 102 of file PlaceMarkLayout.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference