• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

marble/src

PlaceMarkLayout Class Reference

#include <PlaceMarkLayout.h>

Inheritance diagram for PlaceMarkLayout:

Inheritance graph
[legend]

List of all members.


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  ) 

Creates a new place mark layout.

Definition at line 34 of file PlaceMarkLayout.cpp.

PlaceMarkLayout::~PlaceMarkLayout (  ) 

Destroys the place mark painter.

Definition at line 97 of file PlaceMarkLayout.cpp.


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:
  • PlaceMarkLayout.h
  • PlaceMarkLayout.cpp

marble/src

Skip menu "marble/src"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal