#include <model_GraphDocument.h>
Public Member Functions | |
GraphDocumentModel (QList< GraphDocument * > *documents, QObject *parent=0) | |
int | rowCount (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 |
Qt::ItemFlags | flags (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
GraphDocument * | at (const QModelIndex &index) |
Definition at line 30 of file model_GraphDocument.h.
GraphDocumentModel::GraphDocumentModel | ( | QList< GraphDocument * > * | documents, | |
QObject * | parent = 0 | |||
) | [explicit] |
Definition at line 27 of file model_GraphDocument.cpp.
GraphDocument * GraphDocumentModel::at | ( | const QModelIndex & | index | ) |
select the graph at position index.
index | the position of the graph that you want to select.
|
Definition at line 100 of file model_GraphDocument.cpp.
QVariant GraphDocumentModel::data | ( | const QModelIndex & | index, | |
int | role | |||
) | const |
Return the data of a item on the model.
index | the position of the item.
|
Definition at line 38 of file model_GraphDocument.cpp.
Qt::ItemFlags GraphDocumentModel::flags | ( | const QModelIndex & | index | ) | const |
return the flags for some item in the model.
index | the index of the item
|
Definition at line 62 of file model_GraphDocument.cpp.
QVariant GraphDocumentModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const |
some information that goes on the header.
section | the place where the data will be.
|
Definition at line 47 of file model_GraphDocument.cpp.
bool GraphDocumentModel::insertRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | index = QModelIndex() | |||
) |
This does not work as it should, it will insert ONE new row (not rows) to the model.
position | the index that the data will be inserted.
|
Definition at line 82 of file model_GraphDocument.cpp.
bool GraphDocumentModel::removeRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | index = QModelIndex() | |||
) |
remmove n rows, from position to potion+rows from the model.
position | the first position to remove anything.
|
Definition at line 92 of file model_GraphDocument.cpp.
int GraphDocumentModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Gives the number of rows on the model.
parent | a default constructed, unused, QModelIndex.
|
Definition at line 33 of file model_GraphDocument.cpp.
bool GraphDocumentModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
changes the data on a item.
index | the index of the item that will have it's data modified.
|
Definition at line 71 of file model_GraphDocument.cpp.