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

kstars

Public Member Functions | List of all members
SkyObjListModel Class Reference

#include <skyobjlistmodel.h>

Inheritance diagram for SkyObjListModel:
Inheritance graph
[legend]

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.

Author
Samikshan Bairagya

Definition at line 30 of file skyobjlistmodel.h.

Constructor & Destructor Documentation

SkyObjListModel::SkyObjListModel ( SkyObjItem *  soitem = 0,
QObject *  parent = 0 
)
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
sobjPointer 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:
  • skyobjlistmodel.h
  • skyobjlistmodel.cpp
This file is part of the KDE documentation.
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.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal