kstars
#include <skyobjlistmodel.h>

Public Member Functions | |
SkyObjListModel (SkyObjItem *soitem=0, QObject *parent=0) | |
void | addSkyObject (SkyObjItem *sobj) |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
SkyObjItem * | getSkyObjItem (int index) |
QList< SkyObjItem * > | getSkyObjItems () |
void | resetModel () |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Detailed Description
Represents a model for the list of interesting sky-objects to be displayed in the QML interface.
Definition at line 30 of file skyobjlistmodel.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 20 of file skyobjlistmodel.cpp.
Member Function Documentation
void SkyObjListModel::addSkyObject | ( | SkyObjItem * | sobj | ) |
Add a sky-object to the model.
- Parameters
-
sobj Pointer to sky-object to be added.
Definition at line 25 of file skyobjlistmodel.cpp.
QVariant SkyObjListModel::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const |
Overriden method from QAbstractItemModel.
- Returns
- Data stored under the given role for the sky-object item referred to by the index.
Definition at line 37 of file skyobjlistmodel.cpp.
SkyObjItem * SkyObjListModel::getSkyObjItem | ( | int | index | ) |
Get sky-object item referred to by index.
- Returns
- Pointer to SkyObjItem referred to by index.
Definition at line 52 of file skyobjlistmodel.cpp.
QList< SkyObjItem * > SkyObjListModel::getSkyObjItems | ( | ) |
Get the list of sky-object items in the model.
- Returns
- A QList of pointers to SkyObjItems which are there in the model.
Definition at line 47 of file skyobjlistmodel.cpp.
void SkyObjListModel::resetModel | ( | ) |
Erase all data in model.
Definition at line 57 of file skyobjlistmodel.cpp.
int SkyObjListModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Overridden method from QAbstractItemModel.
- Returns
- The number of items in the sky-object list model.
Definition at line 32 of file skyobjlistmodel.cpp.
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:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.