20 #ifndef DATASETTREEMODEL_H 21 #define DATASETTREEMODEL_H 23 #include <QAbstractItemModel> 28 class DatasetTreeItem;
31 class AnalysisResultTreeItem;
42 QVariant
data(
const QModelIndex &
index,
int role)
const Q_DECL_OVERRIDE;
43 Qt::ItemFlags
flags(
const QModelIndex &index)
const Q_DECL_OVERRIDE;
44 QVariant
headerData(
int section, Qt::Orientation orientation,
45 int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
46 QModelIndex
index(
int row,
int column,
47 const QModelIndex &parent = QModelIndex())
const Q_DECL_OVERRIDE;
48 QModelIndex
parent(
const QModelIndex &index)
const Q_DECL_OVERRIDE;
49 int rowCount(
const QModelIndex &parent)
const Q_DECL_OVERRIDE;
50 int columnCount(
const QModelIndex &parent)
const Q_DECL_OVERRIDE;
52 const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
54 void AddDataset(QSharedPointer<VespucciDataset> dataset);
55 bool IsMatrix(
const QModelIndex &index);
57 bool IsMap(
const QModelIndex &index);
65 TreeItem *SetupDatasetTreeItem(QSharedPointer<VespucciDataset> dataset);
66 TreeItem *SetupAnalysisResultTreeItem(QSharedPointer<VespucciDataset> dataset, QSharedPointer<AnalysisResults> results,
TreeItem *parent);
67 TreeItem *SetupMatrixTreeItem(
const QString &dataset_key,
const QString &results_key,
const QString &matrix_key,
const mat & matrix,
TreeItem *parent);
68 TreeItem *SetupMatrixTreeItem(
const QString &dataset_key,
const QString &matrix_key,
const mat & matrix,
TreeItem *parent);
69 TreeItem *SetupMapTreeItem(
const QString &dataset_key,
70 const QString &map_key,
71 QSharedPointer<MapData>
data,
73 QString DescribeMatrix(
const mat & matrix)
const;
74 QString DescribeSpectra(
const mat & spectra_matrix)
const;
75 QString DescribeAbscissa(
const vec &abscissa)
const;
76 bool DatasetAdded()
const;
77 bool DatasetRemoved()
const;
83 #endif // DATASETTREEMODEL_H bool IsMap(const QModelIndex &index)
void AddDataset(QSharedPointer< VespucciDataset > dataset)
bool IsMatrix(const QModelIndex &index)
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE
bool IsDataset(const QModelIndex &index)
void UpdateData(const DataModel *data_model)
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE
TreeItem * getItem(const QModelIndex &index) const
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE
int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE
DatasetTreeModel(QObject *parent)
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE
void removeRow(const QModelIndex &index)
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) Q_DECL_OVERRIDE
int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE
void SetupModelData(const DataModel *data_model)
DatasetTreeModel::SetupModelData.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE