SciDAVis  1.D4
Public Member Functions | Private Attributes
MatrixModel Class Reference

Model for the access to a Matrix. More...

#include <MatrixModel.h>

List of all members.

Public Member Functions

 MatrixModel (future::Matrix *matrix)
 Constructor.
 ~MatrixModel ()
 Destructor.
Overloaded functions from QAbstractItemModel
Qt::ItemFlags flags (const QModelIndex &index) const
QVariant data (const QModelIndex &index, int role) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
bool setData (const QModelIndex &index, const QVariant &value, int role)
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex parent (const QModelIndex &child) const

Private Slots

Handlers for events from Matrix
void handleColumnsAboutToBeInserted (int before, int count)
void handleColumnsInserted (int first, int count)
void handleColumnsAboutToBeRemoved (int first, int count)
void handleColumnsRemoved (int first, int count)
void handleRowsAboutToBeInserted (int before, int count)
void handleRowsInserted (int first, int count)
void handleRowsAboutToBeRemoved (int first, int count)
void handleRowsRemoved (int first, int count)
void handleDataChanged (int top, int left, int bottom, int right)
void handleCoordinatesChanged ()
void handleFormatChanged ()

Private Attributes

future::Matrixd_matrix

Detailed Description

Model for the access to a Matrix.

This is a model in the sense of Qt4 model/view framework which is used to access a Matrix object from any of Qt4s view classes, typically a QMatrixView. Its main purposes are translating Matrix signals into QAbstractItemModel signals and translating calls to the QAbstractItemModel read/write API into calls in the public API of Matrix.


Constructor & Destructor Documentation

MatrixModel::MatrixModel ( future::Matrix matrix)
explicit
MatrixModel::~MatrixModel ( )

Destructor.


Member Function Documentation

int MatrixModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
QVariant MatrixModel::data ( const QModelIndex &  index,
int  role 
) const

References d_matrix, and future::Matrix::text().

Qt::ItemFlags MatrixModel::flags ( const QModelIndex &  index) const
void MatrixModel::handleColumnsAboutToBeInserted ( int  before,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleColumnsAboutToBeRemoved ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleColumnsInserted ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleColumnsRemoved ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleCoordinatesChanged ( )
privateslot

References columnCount(), and rowCount().

Referenced by handleFormatChanged(), and MatrixModel().

void MatrixModel::handleDataChanged ( int  top,
int  left,
int  bottom,
int  right 
)
privateslot

References index().

Referenced by handleFormatChanged(), and MatrixModel().

void MatrixModel::handleFormatChanged ( )
privateslot
void MatrixModel::handleRowsAboutToBeInserted ( int  before,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleRowsAboutToBeRemoved ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleRowsInserted ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

void MatrixModel::handleRowsRemoved ( int  first,
int  count 
)
privateslot

Referenced by MatrixModel().

QVariant MatrixModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
QModelIndex MatrixModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
QModelIndex MatrixModel::parent ( const QModelIndex &  child) const
int MatrixModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
bool MatrixModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)

References d_matrix, and future::Matrix::view().


Member Data Documentation

future::Matrix* MatrixModel::d_matrix
private

The documentation for this class was generated from the following files: