Vespucci  1.0.0
maplistmodel.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 MAPLISTMODEL_H
21 #define MAPLISTMODEL_H
22 
23 #include <QAbstractListModel>
25 
26 class VespucciWorkspace;
27 class MapData;
28 class VespucciDataset;
29 
33 class MapListModel : public QAbstractListModel
34 {
35  Q_OBJECT
36 public:
37  MapListModel(QObject *parent, VespucciDataset *dataset);
38  MapListModel();
39  int rowCount(const QModelIndex &parent) const;
40  bool removeRow(int row, const QModelIndex &parent);
41  bool AddMap(QSharedPointer<MapData> map);
42  QSharedPointer<MapData> MapAt(int row);
43  QVariant data(const QModelIndex &index, int role) const;
44  void ClearMaps();
45 
46 signals:
47 
48 public slots:
49 
50 private:
51  //This view displays the names of maps stored
54  QList<QSharedPointer<MapData> > maps_;
55  VespucciDataset *dataset_;
56 };
57 
58 #endif // MAPLISTMODEL_H
bool AddMap(QSharedPointer< MapData > map)
The MapData class Class for processed map data. Images are created from this data.
Definition: mapdata.h:44
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.
The VespucciWorkspace class A class which contains all "global variables" (that aren&#39;t held in MainWi...
void ClearMaps()
MapListModel::ClearMaps Clears the map container. Used when closing the program.
bool removeRow(int row, const QModelIndex &parent)
QVariant data(const QModelIndex &index, int role) const
MapListModel::data.
int rowCount(const QModelIndex &parent) const
QSharedPointer< MapData > MapAt(int row)
The MapListModel class Exposes the UI to the contents of the master map list.
Definition: maplistmodel.h:33