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

marble/src

Marble::MarblePlacemarkModel

Marble::MarblePlacemarkModel Class Reference

This class represents a model of all place marks which are currently available through a given PlaceMarkManager. More...

#include <MarblePlacemarkModel.h>

Inheritance diagram for Marble::MarblePlacemarkModel:

Inheritance graph
[legend]

List of all members.


Public Types

enum  Roles {
  GeoTypeRole = Qt::UserRole + 1, DescriptionRole, CoordinateRole, PopulationRole,
  AreaRole, CountryCodeRole, VisualCategoryRole, StyleRole,
  PopularityIndexRole, PopularityRole, ObjectPointerRole
}

Public Slots

void indexUpdate ()

Signals

void indexUpdated ()

Public Member Functions

void addPlaceMarks (PlaceMarkContainer &placeMarks, bool clearPrevious=false)
QModelIndexList approxMatch (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
Marble::GeoDataCoordinates coordinateData (const QModelIndex &index) const
QVariant data (const QModelIndex &index, int role) const
 MarblePlacemarkModel (PlaceMarkManager *manager, QObject *parent=0)
QList< QPersistentModelIndex > persistentIndexList () const
int rowCount (const QModelIndex &parent=QModelIndex()) const
Marble::GeoDataStyle * styleData (const QModelIndex &index) const
 ~MarblePlacemarkModel ()

Protected Member Functions

int areaPopIdx (qreal area)
int cityPopIdx (qint64 population)
int spacePopIdx (qint64 diameter)

Detailed Description

This class represents a model of all place marks which are currently available through a given PlaceMarkManager.

Definition at line 37 of file MarblePlacemarkModel.h.


Member Enumeration Documentation

enum Marble::MarblePlacemarkModel::Roles

The roles of the place marks.

Enumerator:
GeoTypeRole  The geo type (e.g. city or mountain).
DescriptionRole  The description.
CoordinateRole  The GeoDataCoordinates coordinate.
PopulationRole  The population.
AreaRole  The area size.
CountryCodeRole  The country code.
VisualCategoryRole  The category.
StyleRole  The style.
PopularityIndexRole  The popularity index.
PopularityRole  The popularity.
ObjectPointerRole  The pointer to a specific object.

Definition at line 47 of file MarblePlacemarkModel.h.


Constructor & Destructor Documentation

MarblePlacemarkModel::MarblePlacemarkModel ( PlaceMarkManager *  manager,
QObject *  parent = 0 
) [explicit]

Creates a new place mark model.

Parameters:
manager The place mark manager on which the model shall work.
parent The parent object.

Definition at line 53 of file MarblePlacemarkModel.cpp.

MarblePlacemarkModel::~MarblePlacemarkModel (  ) 

Destroys the place mark model.

Definition at line 63 of file MarblePlacemarkModel.cpp.


Member Function Documentation

void MarblePlacemarkModel::addPlaceMarks ( PlaceMarkContainer &  placeMarks,
bool  clearPrevious = false 
)

This method is used by the PlaceMarkManager to add new place marks to the model.

Note: The model takes ownership of the place marks!

Definition at line 209 of file MarblePlacemarkModel.cpp.

QModelIndexList MarblePlacemarkModel::approxMatch ( const QModelIndex &  start,
int  role,
const QVariant &  value,
int  hits = 1,
Qt::MatchFlags  flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) 
) const

Definition at line 173 of file MarblePlacemarkModel.cpp.

int MarblePlacemarkModel::areaPopIdx ( qreal  area  )  [protected]

Definition at line 430 of file MarblePlacemarkModel.cpp.

int MarblePlacemarkModel::cityPopIdx ( qint64  population  )  [protected]

Definition at line 385 of file MarblePlacemarkModel.cpp.

int MarblePlacemarkModel::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const

Definition at line 103 of file MarblePlacemarkModel.cpp.

GeoDataCoordinates MarblePlacemarkModel::coordinateData ( const QModelIndex &  index  )  const

Definition at line 111 of file MarblePlacemarkModel.cpp.

QVariant MarblePlacemarkModel::data ( const QModelIndex &  index,
int  role 
) const

Return the data according to the index.

Parameters:
index the index of the data
role which part of the data to return.
See also:
Roles

Definition at line 135 of file MarblePlacemarkModel.cpp.

void MarblePlacemarkModel::indexUpdate (  )  [slot]

This slot should update the persistentIndex.

Definition at line 73 of file MarblePlacemarkModel.cpp.

void Marble::MarblePlacemarkModel::indexUpdated (  )  [signal]

Signal that the persistant Index has been updated.

QList< QPersistentModelIndex > MarblePlacemarkModel::persistentIndexList (  )  const

Definition at line 90 of file MarblePlacemarkModel.cpp.

int MarblePlacemarkModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const

Return the number of Placemarks in the Model.

Definition at line 95 of file MarblePlacemarkModel.cpp.

int MarblePlacemarkModel::spacePopIdx ( qint64  diameter  )  [protected]

Definition at line 407 of file MarblePlacemarkModel.cpp.

GeoDataStyle * MarblePlacemarkModel::styleData ( const QModelIndex &  index  )  const

Definition at line 125 of file MarblePlacemarkModel.cpp.


The documentation for this class was generated from the following files:
  • MarblePlacemarkModel.h
  • MarblePlacemarkModel.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
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.7
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