GraphPropertiesModel Class Reference

#include <model_GraphProperties.h>

List of all members.

Public Member Functions

 GraphPropertiesModel (QObject *parent=0)
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant data (const QModelIndex &index, int role) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void setDataSource (QObject *dataSource)
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Qt::ItemFlags flags (const QModelIndex &index) const
void addDynamicProperty (QString name, QVariant value, QObject *obj, bool isGlobal)

Detailed Description

Definition at line 30 of file model_GraphProperties.h.


Constructor & Destructor Documentation

GraphPropertiesModel::GraphPropertiesModel ( QObject parent = 0  )  [explicit]

Default Constructor.

Parameters:
parent the QObject that owns this Model.

Definition at line 6 of file model_GraphProperties.cpp.


Member Function Documentation

void GraphPropertiesModel::addDynamicProperty ( QString  name,
QVariant  value,
QObject obj,
bool  isGlobal 
)

Add properti to data source and insert a new row,

Definition at line 165 of file model_GraphProperties.cpp.

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

Gives the number or columns on the model.

Parameters:
parent a default constructed, unused, QModelIndex.
Returns:
the const value 2.

Definition at line 26 of file model_GraphProperties.cpp.

QVariant GraphPropertiesModel::data ( const QModelIndex &  index,
int  role 
) const

Return the data of a item on the model.

Parameters:
index the position of the item.
Parameters:
role the kind of data that you're trying to get.
Returns:
the QVariant of the data.

Definition at line 33 of file model_GraphProperties.cpp.

Qt::ItemFlags GraphPropertiesModel::flags ( const QModelIndex &  index  )  const

Definition at line 123 of file model_GraphProperties.cpp.

QVariant GraphPropertiesModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

some information that goes on the header.

Parameters:
section the place where the data will be.
Parameters:
orientation Horizontal or Vertical.
Parameters:
role defaulted to DisplayRole for displaying things.
Returns:
a QVariant containing the string of the header.

Definition at line 70 of file model_GraphProperties.cpp.

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

Gives the number of rows on the model.

Parameters:
parent a default constructed, unused, QModelIndex.
Returns:
the number of rows on the model.

Definition at line 13 of file model_GraphProperties.cpp.

bool GraphPropertiesModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Definition at line 139 of file model_GraphProperties.cpp.

void GraphPropertiesModel::setDataSource ( QObject dataSource  ) 

recreates the information on the model based on another datasource.

Parameters:
dataSource the new dataSource of the model.

Definition at line 93 of file model_GraphProperties.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:41 2010 for Gluon by  doxygen 1.6.3