Vespucci  1.0.0
vespuccitablemodel.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef VESPUCCITABLEMODEL_H
21 #define VESPUCCITABLEMODEL_H
22 
23 #include <QAbstractTableModel>
26 class VespucciDataset;
27 
32 class VespucciTableModel : public QAbstractTableModel
33 {
34  Q_OBJECT
35 public:
36  VespucciTableModel(QObject *parent, const mat & input_data, const QStringList &data_keys);
37  VespucciTableModel(QObject *parent, const mat & input_data, const uword &start_column, const QStringList &data_keys);
38  int rowCount(const QModelIndex &parent) const;
39  int columnCount(const QModelIndex &parent) const;
40  QVariant data(const QModelIndex &index, int role) const;
41  const mat& GetMatrix() const;
42  bool SaveMatrix(const QString &filename, const QString &extension) const;
43  uword MatrixColumns();
44  QStringList data_keys();
45 
46 signals:
47 
48 public slots:
49 
50 private:
55  uword start_column_;
59  const mat & data_;
60 
61  QStringList data_keys_;
62 };
63 
64 #endif // VESPUCCITABLEMODEL_H
The VespucciTableModel class The QAbstractTableModel that handles armadillo objects for the DataViewe...
uword MatrixColumns()
VespucciTableModel::MatrixColumns.
int columnCount(const QModelIndex &parent) const
VespucciTableModel::columnCount.
The VespucciDataset class This is the main class for dealing with hyperspectral data. This handles the import and export of spectra, and the creation of maps. Images are handled by the MapData class. This class is intended to be allocated on the heap inside of a smart pointer, there is no copy constructor.
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.