Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgLocalitiesModel Class Reference
[Library]

#include <omglocalitiesmodel.h>

Inheritance diagram for OmgLocalitiesModel:

Inheritance graph
[legend]
Collaboration diagram for OmgLocalitiesModel:

Collaboration graph
[legend]
List of all members.

Detailed Description

The OmgLocalitiesModel class implements the abstract data model QAbstractTableModel to provide a data model to use with Qt graphical view classes. Using this aproach provides a more performant way to let the user display samples than simply populating a QTableWidget with data. OmgLocalitiesModel is a non gui class and its expected to be used with a QTableModel in a gui context.

Definition at line 36 of file omglocalitiesmodel.h.

Public Member Functions

 OmgLocalitiesModel ()
 ~OmgLocalitiesModel ()
void setModel (OmgModel *const thepModel)
int columnCount (const QModelIndex &parent=QModelIndex()) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
QVariant headerData (int theSection, Qt::Orientation theOrientation, int theRole) const

Private Attributes

QPointer< OmgModelmpNicheModel


Constructor & Destructor Documentation

OmgLocalitiesModel::OmgLocalitiesModel  ) 
 

Definition at line 26 of file omglocalitiesmodel.cpp.

OmgLocalitiesModel::~OmgLocalitiesModel  ) 
 

Definition at line 30 of file omglocalitiesmodel.cpp.


Member Function Documentation

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

Returns the number of columns for the children of the given parent.

Definition at line 62 of file omglocalitiesmodel.cpp.

References mpNicheModel.

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), and setModel().

QVariant OmgLocalitiesModel::data const QModelIndex &  index,
int  role = Qt::DisplayRole
const
 

Returns the data stored under the given role for the item referred to by the index.

Definition at line 98 of file omglocalitiesmodel.cpp.

References mpNicheModel.

QVariant OmgLocalitiesModel::headerData int  theSection,
Qt::Orientation  theOrientation,
int  theRole
const
 

Returns the headerData for the specified section (row or col)

Definition at line 157 of file omglocalitiesmodel.cpp.

References mpNicheModel.

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

Returns the number of rows for the children of the given parent.

Definition at line 86 of file omglocalitiesmodel.cpp.

References mpNicheModel.

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), and setModel().

void OmgLocalitiesModel::setModel OmgModel *const   thepModel  ) 
 

Set the localities.

Parameters:
OmgModel * const - pointer to a constant omgmodel which contains the localities to be represented in this table model

Definition at line 34 of file omglocalitiesmodel.cpp.

References columnCount(), mpNicheModel, and rowCount().

Referenced by OmgLocalitiesModelTest::rowsAndColumns(), and OmgMainWindow::setCurrentModel().

Here is the call graph for this function:


Member Data Documentation

QPointer<OmgModel> OmgLocalitiesModel::mpNicheModel [private]
 

The model that has the localities (with their associated sampled environment values if available).

Definition at line 70 of file omglocalitiesmodel.h.

Referenced by columnCount(), data(), headerData(), rowCount(), and setModel().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:20 2008 for openModellerDesktop by  doxygen 1.4.1-20050210