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

marble/src

MarblePlacemarkModel Class Reference

#include <MarblePlacemarkModel.h>

Inheritance diagram for MarblePlacemarkModel:

Inheritance graph
[legend]

List of all members.


Detailed Description

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

Definition at line 34 of file MarblePlacemarkModel.h.


Public Types

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

Public Member Functions

 MarblePlacemarkModel (PlaceMarkManager *manager, QObject *parent=0)
 ~MarblePlacemarkModel ()
QList< QPersistentModelIndex > persistentIndexList () const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
GeoDataPoint coordinateData (const QModelIndex &index) const
GeoDataStyle * styleData (const QModelIndex &index) const
QVariant data (const QModelIndex &index, int role) const
virtual QModelIndexList match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const

Protected Member Functions

int cityPopIdx (qint64 population)
int areaPopIdx (double area)

Friends

class PlaceMarkManager

Member Enumeration Documentation

enum MarblePlacemarkModel::Roles

The roles of the place marks.

Enumerator:
GeoTypeRole  The geo type (e.g. city or mountain).
DescriptionRole  The description.
CoordinateRole  The GeoDataPoint 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.

Definition at line 44 of file MarblePlacemarkModel.h.


Constructor & Destructor Documentation

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

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 49 of file MarblePlacemarkModel.cpp.

MarblePlacemarkModel::~MarblePlacemarkModel (  ) 

Destroys the place mark model.

Definition at line 58 of file MarblePlacemarkModel.cpp.


Member Function Documentation

QList< QPersistentModelIndex > MarblePlacemarkModel::persistentIndexList (  )  const

Definition at line 67 of file MarblePlacemarkModel.cpp.

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

Return the number of Placemarks in the Model.

Definition at line 77 of file MarblePlacemarkModel.cpp.

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

Definition at line 85 of file MarblePlacemarkModel.cpp.

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

Definition at line 93 of file MarblePlacemarkModel.cpp.

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

Definition at line 98 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 108 of file MarblePlacemarkModel.cpp.

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

Definition at line 144 of file MarblePlacemarkModel.cpp.

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

Definition at line 294 of file MarblePlacemarkModel.cpp.

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

Definition at line 316 of file MarblePlacemarkModel.cpp.


Friends And Related Function Documentation

friend class PlaceMarkManager [friend]

Definition at line 36 of file MarblePlacemarkModel.h.


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
  • 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