#include <MatrixModel.h>
Public Member Functions | |
double | cell (int row, int col) |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
double | data (int row, int col) const |
double * | dataVector () |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
MatrixModel (const QImage &image, QObject *parent) | |
MatrixModel (int rows=32, int cols=32, QObject *parent=0) | |
bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
QImage | renderImage () |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
QString | saveToString () |
void | setCell (int row, int col, double val) |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
void | setDataVector (const QVector< double > &data) |
void | setText (int row, int col, const QString &) |
QString | text (int row, int col) |
Private Attributes | |
int | d_cols |
QVector< double > | d_data |
Matrix * | d_matrix |
int | d_rows |
MatrixModel::MatrixModel | ( | int | rows = 32 , |
|
int | cols = 32 , |
|||
QObject * | parent = 0 | |||
) |
MatrixModel::MatrixModel | ( | const QImage & | image, | |
QObject * | parent | |||
) |
double MatrixModel::cell | ( | int | row, | |
int | col | |||
) |
int MatrixModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
QVariant MatrixModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const |
double MatrixModel::data | ( | int | row, | |
int | col | |||
) | const |
double* MatrixModel::dataVector | ( | ) | [inline] |
Qt::ItemFlags MatrixModel::flags | ( | const QModelIndex & | index | ) | const |
QVariant MatrixModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const |
bool MatrixModel::insertColumns | ( | int | column, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
bool MatrixModel::insertRows | ( | int | row, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
bool MatrixModel::removeColumns | ( | int | column, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
bool MatrixModel::removeRows | ( | int | row, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
QImage MatrixModel::renderImage | ( | ) |
int MatrixModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
QString MatrixModel::saveToString | ( | ) |
void MatrixModel::setCell | ( | int | row, | |
int | col, | |||
double | val | |||
) |
bool MatrixModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role | |||
) |
void MatrixModel::setDataVector | ( | const QVector< double > & | data | ) |
void MatrixModel::setText | ( | int | row, | |
int | col, | |||
const QString & | text | |||
) |
QString MatrixModel::text | ( | int | row, | |
int | col | |||
) |
int MatrixModel::d_cols [private] |
QVector<double> MatrixModel::d_data [private] |
Matrix* MatrixModel::d_matrix [private] |
int MatrixModel::d_rows [private] |