rocs/VisualEditor
#include <model_GraphProperties.h>
Inherits QAbstractTableModel.
Public Member Functions | |
GraphPropertiesModel (QObject *parent=0) | |
void | addDynamicProperty (QString name, QVariant value, QObject *obj) |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | setDataSource (QObject *dataSource) |
Detailed Description
Definition at line 29 of file model_GraphProperties.h.
Constructor & Destructor Documentation
|
explicit |
Default Constructor.
- Parameters
-
parent the QObject that owns this Model.
Definition at line 27 of file model_GraphProperties.cpp.
Member Function Documentation
void GraphPropertiesModel::addDynamicProperty | ( | QString | name, |
QVariant | value, | ||
QObject * | obj | ||
) |
Add properti to data source and insert a new row,.
Definition at line 170 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 45 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. role the kind of data that you're trying to get.
- Returns
- the QVariant of the data.
Definition at line 51 of file model_GraphProperties.cpp.
Qt::ItemFlags GraphPropertiesModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 126 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. orientation Horizontal or Vertical. role defaulted to DisplayRole for displaying things.
- Returns
- a QVariant containing the string of the header.
Definition at line 79 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 34 of file model_GraphProperties.cpp.
bool GraphPropertiesModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) |
Definition at line 138 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 95 of file model_GraphProperties.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:42:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.