marble
#include <MarblePlacemarkModel.h>
Inherits QAbstractListModel.
Public Types | |
enum | Roles { GeoTypeRole = Qt::UserRole + 1, DescriptionRole, CoordinateRole, PopulationRole, AreaRole, CountryCodeRole, StateRole, VisualCategoryRole, StyleRole, PopularityIndexRole, PopularityRole, ObjectPointerRole, GmtRole, DstRole, GeometryRole, LongitudeRole, LatitudeRole } |
Signals | |
void | countChanged () |
Public Member Functions | |
MarblePlacemarkModel (QObject *parent=0) | |
~MarblePlacemarkModel () | |
void | addPlacemarks (int start, int length) |
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 |
QVariant | data (const QModelIndex &index, int role) const |
void | removePlacemarks (const QString &containerName, int start, int length) |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
void | setPlacemarkContainer (QVector< GeoDataPlacemark * > *container) |
Properties | |
int | count |
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
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. |
StateRole |
The state. |
VisualCategoryRole |
The category. |
StyleRole |
The style. |
PopularityIndexRole |
The popularity index. |
PopularityRole |
The popularity. |
ObjectPointerRole |
The pointer to a specific object. |
GmtRole |
The Greenwich Mean Time. |
DstRole |
The Daylight Saving Time. |
GeometryRole |
The GeoDataGeometry geometry. |
LongitudeRole |
The longitude in degree (for use in QML) |
LatitudeRole |
The latitude in degree (for use in QML) |
Definition at line 49 of file MarblePlacemarkModel.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new place mark model.
- Parameters
-
parent The parent object.
Definition at line 48 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 | ( | int | start, |
int | length | ||
) |
This method is used by the PlacemarkManager to add new place marks to the model.
Definition at line 184 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 148 of file MarblePlacemarkModel.cpp.
int MarblePlacemarkModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 81 of file MarblePlacemarkModel.cpp.
|
signal |
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 96 of file MarblePlacemarkModel.cpp.
void MarblePlacemarkModel::removePlacemarks | ( | const QString & | containerName, |
int | start, | ||
int | length | ||
) |
This method is used by the PlacemarkManager to remove place marks from the model.
Definition at line 205 of file MarblePlacemarkModel.cpp.
int MarblePlacemarkModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Return the number of Placemarks in the Model.
Definition at line 73 of file MarblePlacemarkModel.cpp.
void MarblePlacemarkModel::setPlacemarkContainer | ( | QVector< GeoDataPlacemark * > * | container | ) |
Definition at line 68 of file MarblePlacemarkModel.cpp.
Property Documentation
|
read |
Definition at line 43 of file MarblePlacemarkModel.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.