SpikeStream Application Library
0.2
|
00001 #ifndef ANALYSESMODEL_H 00002 #define ANALYSESMODEL_H 00003 00004 //SpikeStream includes 00005 #include "AnalysisInfo.h" 00006 using namespace spikestream; 00007 00008 //Qt includes 00009 #include <QAbstractTableModel> 00010 #include <QList> 00011 #include <QHash> 00012 00013 namespace spikestream { 00014 00017 class AnalysesModel : public QAbstractTableModel { 00018 Q_OBJECT 00019 00020 public: 00021 AnalysesModel(unsigned int analysisType); 00022 ~AnalysesModel(); 00023 int columnCount(const QModelIndex& parent = QModelIndex()) const; 00024 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; 00025 QList<AnalysisInfo> getSelectedAnalyses(); 00026 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 00027 void reload(); 00028 int rowCount(const QModelIndex& parent = QModelIndex()) const; 00029 bool setData(const QModelIndex& index, const QVariant& value, int role=Qt::EditRole); 00030 00031 private: 00032 //==================== VARIABLES ==================== 00035 QList<AnalysisInfo> analysisInfoList; 00036 00039 QHash<int, bool> selectionMap; 00040 00042 unsigned int analysisType; 00043 00044 static const int numCols = 8; 00045 static const int selectCol = 0; 00046 static const int idCol = 1; 00047 static const int netIDCol = 2; 00048 static const int archIDCol = 3; 00049 static const int timeCol = 4; 00050 static const int descCol = 5; 00051 static const int paramCol = 6; 00052 static const int typeCol = 7; 00053 }; 00054 00055 } 00056 00057 #endif//ANALYSESMODEL_H 00058