33 #include <QAbstractTableModel>
38 #include <gsl/gsl_matrix.h>
39 #include <gsl/gsl_permutation.h>
48 MatrixModel(
int rows = 32,
int cols = 32, QObject *parent = 0);
54 Qt::ItemFlags
flags(
const QModelIndex & index )
const;
58 void resample(
int rows,
int cols,
int method = 0);
60 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
63 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
66 bool removeRows(
int row,
int count,
const QModelIndex & parent = QModelIndex());
67 bool insertRows(
int row,
int count,
const QModelIndex & parent = QModelIndex());
69 bool removeColumns(
int column,
int count,
const QModelIndex & parent = QModelIndex());
70 bool insertColumns(
int column,
int count,
const QModelIndex & parent = QModelIndex());
72 double x(
int col)
const;
73 double y(
int row)
const;
75 double cell(
int row,
int col);
76 void setCell(
int row,
int col,
double val);
78 QString
text(
int row,
int col);
79 void setText(
int row,
int col,
const QString&);
83 double data(
int row,
int col)
const;
84 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
85 bool setData(
const QModelIndex & index,
const QVariant & value,
int role);
88 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
92 bool importASCII(
const QString &fname,
const QString &sep,
int ignoredLines,
bool stripSpaces,
93 bool simplifySpaces,
const QString& commentString,
int importAs,
94 const QLocale& locale,
int endLineChar = 0,
int maxRows = -1);
105 void fft(
bool inverse);
106 void clear(
int startRow = 0,
int endRow = -1,
int startCol = 0,
int endCol = -1);
107 bool calculate(
int startRow = 0,
int endRow = -1,
int startCol = 0,
int endCol = -1);
108 bool muParserCalculate(
int startRow = 0,
int endRow = -1,
int startCol = 0,
int endCol = -1);
109 double*
dataCopy(
int startRow = 0,
int endRow = -1,
int startCol = 0,
int endCol = -1);
110 void pasteData(
double *clipboardBuffer,
int topRow,
int leftCol,
int rows,
int cols);