#include <model_GraphLayers.h>
Public Member Functions | |
GraphLayersModel (GraphDocument *document, 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 type, const QModelIndex &index=QModelIndex()) |
bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
Graph * | at (const QModelIndex &index) |
Definition at line 31 of file model_GraphLayers.h.
GraphLayersModel::GraphLayersModel | ( | GraphDocument * | document, | |
QObject * | parent = 0 | |||
) | [explicit] |
Default Constructor.
document | the GraphDocument that will populate the model.
|
Definition at line 27 of file model_GraphLayers.cpp.
Graph * GraphLayersModel::at | ( | const QModelIndex & | index | ) |
select the graph at position index.
index | the position of the graph that you want to select.
|
Definition at line 112 of file model_GraphLayers.cpp.
QVariant GraphLayersModel::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 39 of file model_GraphLayers.cpp.
Qt::ItemFlags GraphLayersModel::flags | ( | const QModelIndex & | index | ) | const |
return the flags for some item in the model.
index | the index of the item
|
Definition at line 72 of file model_GraphLayers.cpp.
QVariant GraphLayersModel::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 53 of file model_GraphLayers.cpp.
bool GraphLayersModel::insertRows | ( | int | position, | |
int | type, | |||
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 92 of file model_GraphLayers.cpp.
bool GraphLayersModel::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 103 of file model_GraphLayers.cpp.
int GraphLayersModel::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_GraphLayers.cpp.
bool GraphLayersModel::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 81 of file model_GraphLayers.cpp.