23 QAbstractListModel(parent)
41 if (!index.isValid() || index.row() >= maps_.size())
43 else if (role == Qt::DisplayRole)
44 return QVariant(maps_.at(index.row())->name());
51 beginRemoveRows(parent, row, row);
54 emit dataChanged(parent, parent);
60 int row = maps_.size();
61 QModelIndex index = createIndex(row, 0);
62 beginInsertRows(index, row, row);
65 emit dataChanged(index, index);
bool AddMap(QSharedPointer< MapData > map)
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.
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)