|
SciDAVis
1.D4
|
Model for the access to a Matrix. More...
#include <MatrixModel.h>
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::Matrix * | d_matrix |
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.
|
explicit |
Constructor.
References d_matrix, handleColumnsAboutToBeInserted(), handleColumnsAboutToBeRemoved(), handleColumnsInserted(), handleColumnsRemoved(), handleCoordinatesChanged(), handleDataChanged(), handleFormatChanged(), handleRowsAboutToBeInserted(), handleRowsAboutToBeRemoved(), handleRowsInserted(), and handleRowsRemoved().
| MatrixModel::~MatrixModel | ( | ) |
Destructor.
| int MatrixModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
References future::Matrix::columnCount(), and d_matrix.
Referenced by handleCoordinatesChanged(), and handleFormatChanged().
| QVariant MatrixModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
References d_matrix, and future::Matrix::text().
| Qt::ItemFlags MatrixModel::flags | ( | const QModelIndex & | index | ) | const |
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
References columnCount(), and rowCount().
Referenced by handleFormatChanged(), and MatrixModel().
|
privateslot |
References index().
Referenced by handleFormatChanged(), and MatrixModel().
|
privateslot |
References columnCount(), handleCoordinatesChanged(), handleDataChanged(), and rowCount().
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
privateslot |
Referenced by MatrixModel().
|
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 |
References d_matrix, and future::Matrix::rowCount().
Referenced by handleCoordinatesChanged(), and handleFormatChanged().
| bool MatrixModel::setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role | ||
| ) |
References d_matrix, and future::Matrix::view().
|
private |
Referenced by columnCount(), data(), headerData(), MatrixModel(), rowCount(), and setData().
1.8.1