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

OmgExperimentItemModel Class Reference
[Library]

#include <omgexperimentitemmodel.h>

Inheritance diagram for OmgExperimentItemModel:

Inheritance graph
[legend]
Collaboration diagram for OmgExperimentItemModel:

Collaboration graph
[legend]
List of all members.

Detailed Description

The OmgExperimentItemModel class implements the abstract data model QAbstractItemModel 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 and experiment in a tree view or list view rather than simply populating a QTreeWidget with data. OmgExperimentItemModel is a non gui class and its expected to be used with a QTreeView in a gui context.

Definition at line 37 of file omgexperimentitemmodel.h.

Public Member Functions

 OmgExperimentItemModel ()
 ~OmgExperimentItemModel ()
void setExperiment (OmgExperiment *const thepExperiment)
QModelIndex parent (const QModelIndex &) const
QModelIndex index (int theRow, int theColumn, const QModelIndex &theParent=QModelIndex()) const
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< OmgExperimentmpExperiment


Constructor & Destructor Documentation

OmgExperimentItemModel::OmgExperimentItemModel  ) 
 

Definition at line 25 of file omgexperimentitemmodel.cpp.

OmgExperimentItemModel::~OmgExperimentItemModel  ) 
 

Definition at line 29 of file omgexperimentitemmodel.cpp.


Member Function Documentation

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

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

Definition at line 75 of file omgexperimentitemmodel.cpp.

Referenced by setExperiment().

QVariant OmgExperimentItemModel::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 91 of file omgexperimentitemmodel.cpp.

References mpExperiment.

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

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

Definition at line 114 of file omgexperimentitemmodel.cpp.

References mpExperiment.

QModelIndex OmgExperimentItemModel::index int  theRow,
int  theColumn,
const QModelIndex &  theParent = QModelIndex()
const
 

Returns the data item and row,coloum

Definition at line 54 of file omgexperimentitemmodel.cpp.

References mpExperiment.

QModelIndex OmgExperimentItemModel::parent const QModelIndex &   )  const
 

Get the parent of the supplied model

Definition at line 49 of file omgexperimentitemmodel.cpp.

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

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

Definition at line 79 of file omgexperimentitemmodel.cpp.

References mpExperiment.

Referenced by setExperiment().

void OmgExperimentItemModel::setExperiment OmgExperiment *const   thepExperiment  ) 
 

Set the experiment.

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

Definition at line 33 of file omgexperimentitemmodel.cpp.

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

Here is the call graph for this function:


Member Data Documentation

QPointer<OmgExperiment> OmgExperimentItemModel::mpExperiment [private]
 

The experiment associated with this model.

Definition at line 75 of file omgexperimentitemmodel.h.

Referenced by data(), headerData(), index(), rowCount(), and setExperiment().


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