27 QAbstractTableModel(parent),
36 : QAbstractTableModel(parent),
40 start_column_ = start_column;
51 if (role != Qt::DisplayRole){
54 int row = index.row();
55 int column = index.column() + start_column_;
56 return QString::number(data_.at(row, column));
71 return (data_.n_cols <= 15 ? data_.n_cols : 15);
96 if (extension ==
"bin")
97 return data_.save(filename.toStdString(), raw_binary);
98 else if (extension ==
"csv")
99 return data_.save(filename.toStdString(), csv_ascii);
100 else if (extension ==
"txt")
101 return data_.save(filename.toStdString(), raw_ascii);
uword MatrixColumns()
VespucciTableModel::MatrixColumns.
int columnCount(const QModelIndex &parent) const
VespucciTableModel::columnCount.
VespucciTableModel(QObject *parent, const mat &input_data, const QStringList &data_keys)
VespucciTableModel::VespucciTableModel.
bool SaveMatrix(const QString &filename, const QString &extension) const
const mat & GetMatrix() const
VespucciTableModel::GetMatrix.
QVariant data(const QModelIndex &index, int role) const
VespucciTableModel::data.
int rowCount(const QModelIndex &parent) const
VespucciTableModel::rowCount.