GraphLayersModel Class Reference

#include <model_GraphLayers.h>

List of all members.

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())
Graphat (const QModelIndex &index)

Detailed Description

Definition at line 31 of file model_GraphLayers.h.


Constructor & Destructor Documentation

GraphLayersModel::GraphLayersModel ( GraphDocument document,
QObject parent = 0 
) [explicit]

Default Constructor.

Parameters:
document the GraphDocument that will populate the model.
Parameters:
parent the QObject that owns this Model.

Definition at line 27 of file model_GraphLayers.cpp.


Member Function Documentation

Graph * GraphLayersModel::at ( const QModelIndex &  index  ) 

select the graph at position index.

Parameters:
index the position of the graph that you want to select.
Returns:
the graph at position Index.

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.

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 39 of file model_GraphLayers.cpp.

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

return the flags for some item in the model.

Parameters:
index the index of the item
Returns:
a Qt::ItemFlags 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.

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 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.

Parameters:
position the index that the data will be inserted.
Parameters:
type the type of the graph.
Parameters:
QModelIndex The position that the item will be inserted after.
Returns:
true if success, false otherwise.

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.

Parameters:
position the first position to remove anything.
Parameters:
rows the number of rows to remove.
Parameters:
QModelIndex not used.
Returns:
true if success, false otherwise.

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.

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

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.

Parameters:
index the index of the item that will have it's data modified.
Parameters:
value the new value of the data.
Parameters:
role defaulted to Edit Role, if it's another, it does nothing.
Returns:
true if the data was changed, false if it wasn't.

Definition at line 81 of file model_GraphLayers.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