MNE-CPP  beta 1.0
averagemodel.h
Go to the documentation of this file.
1 //=============================================================================================================
38 #ifndef AVERAGEMODEL_H
39 #define AVERAGEMODEL_H
40 
41 //*************************************************************************************************************
42 //=============================================================================================================
43 // INCLUDES
44 //=============================================================================================================
45 
46 #include "../Utils/rawsettings.h"
47 #include "../Utils/types.h"
48 
49 
50 //*************************************************************************************************************
51 //=============================================================================================================
52 // Qt INCLUDES
53 //=============================================================================================================
54 
55 #include <QAbstractTableModel>
56 
57 
58 //*************************************************************************************************************
59 //=============================================================================================================
60 // Eigen INCLUDES
61 //=============================================================================================================
62 
63 #include <Eigen/Core>
64 
65 
66 //*************************************************************************************************************
67 //=============================================================================================================
68 // MNE INCLUDES
69 //=============================================================================================================
70 
71 #include <fiff/fiff.h>
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // USED NAMESPACES
77 //=============================================================================================================
78 
79 using namespace Eigen;
80 using namespace FIFFLIB;
81 
82 
83 //*************************************************************************************************************
84 //=============================================================================================================
85 // DEFINE NAMESPACE MNEBrowseRawQt
86 //=============================================================================================================
87 
88 namespace MNEBrowseRawQt
89 {
90 
91 //=============================================================================================================
95 class AverageModel : public QAbstractTableModel
96 {
97  Q_OBJECT
98 public:
99  AverageModel(QObject *parent = 0);
100  AverageModel(QFile& qFile, QObject *parent);
101 
102  //=========================================================================================================
107  virtual int rowCount(const QModelIndex & parent = QModelIndex()) const;
108  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
109  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
110  virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
111  virtual bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
112  virtual Qt::ItemFlags flags(const QModelIndex & index) const;
113  virtual bool insertRows(int position, int span, const QModelIndex & parent = QModelIndex());
114  virtual bool removeRows(int position, int span, const QModelIndex & parent = QModelIndex());
115 
116  //=========================================================================================================
122  bool loadEvokedData(QFile& qFile);
123 
124  //=========================================================================================================
130  bool saveEvokedData(QFile& qFile);
131 
134 protected:
136  QSharedPointer<FiffIO> m_pfiffIO;
138  //=========================================================================================================
142  void clearModel();
143 
144 signals:
145  //=========================================================================================================
149  void fileLoaded(bool);
150 };
151 
152 } // NAMESPACE
153 
154 
155 
156 #endif // AVERAGEMODEL_H
Definition: fiff.h:98
evoked data set
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...
QSharedPointer< FiffIO > m_pfiffIO
Definition: averagemodel.h:136