MNE-CPP  beta 1.0
chinfomodel.h
1 //=============================================================================================================
38 #ifndef CHINFOCLASS_H
39 #define CHINFOCLASS_H
40 
41 //*************************************************************************************************************
42 //=============================================================================================================
43 // INCLUDES
44 //=============================================================================================================
45 
46 #include "../Utils/rawsettings.h"
47 #include "../Utils/types.h"
48 #include "../Utils/filteroperator.h"
49 
50 
51 //*************************************************************************************************************
52 //=============================================================================================================
53 // Qt INCLUDES
54 //=============================================================================================================
55 
56 #include <QAbstractTableModel>
57 #include <QVector3D>
58 
59 
60 //*************************************************************************************************************
61 //=============================================================================================================
62 // Eigen INCLUDES
63 //=============================================================================================================
64 
65 #include <Eigen/Core>
66 
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // MNE INCLUDES
71 //=============================================================================================================
72 
73 #include <fiff/fiff.h>
74 
75 
76 //*************************************************************************************************************
77 //=============================================================================================================
78 // USED NAMESPACES
79 //=============================================================================================================
80 
81 using namespace Eigen;
82 using namespace FIFFLIB;
83 
84 
85 //*************************************************************************************************************
86 //=============================================================================================================
87 // DEFINE NAMESPACE MNEBrowseRawQt
88 //=============================================================================================================
89 
90 namespace MNEBrowseRawQt
91 {
92 
93 //=============================================================================================================
97 class ChInfoModel : public QAbstractTableModel
98 {
99  Q_OBJECT
100 public:
101  ChInfoModel(QObject *parent = 0);
102 
103  //=========================================================================================================
108  virtual int rowCount(const QModelIndex & parent = QModelIndex()) const;
109  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
110  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
111  virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
112  virtual bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
113  virtual Qt::ItemFlags flags(const QModelIndex & index) const;
114  virtual bool insertRows(int position, int span, const QModelIndex & parent = QModelIndex());
115  virtual bool removeRows(int position, int span, const QModelIndex & parent = QModelIndex());
116 
117  //=========================================================================================================
123  void fiffInfoChanged(const FiffInfo &fiffInfo);
124 
125  //=========================================================================================================
131  void assignedOperatorsChanged(const QMap<int,QSharedPointer<MNEOperator> > &assignedOperators);
132 
133  //=========================================================================================================
139  void layoutChanged(const QMap<QString,QPointF> &layoutMap);
140 
141  //=========================================================================================================
147  const QStringList & getMappedChannelsList();
148 
149  //=========================================================================================================
156  int getIndexFromOrigChName(QString chName);
157 
158  //=========================================================================================================
165  int getIndexFromMappedChName(QString chName);
166 
167 signals:
168  //=========================================================================================================
173  void channelsMappedToLayout(const QStringList &mappedLayoutChNames);
174 
175 protected:
176  //=========================================================================================================
181  void clearModel();
182 
183  //=========================================================================================================
188  void mapLayoutToChannels();
189 
191  QMap<QString,QPointF> m_layoutMap;
192  QStringList m_aliasNames;
193  QStringList m_mappedLayoutChNames;
194  QMap<int,QSharedPointer<MNEOperator> > m_assignedOperators;
196 };
197 
198 } // NAMESPACE
199 
200 #endif // CHINFOCLASS_H
FIFF measurement file information.
Definition: fiff_info.h:96
QMap< int, QSharedPointer< MNEOperator > > m_assignedOperators
Definition: chinfomodel.h:194
QMap< QString, QPointF > m_layoutMap
Definition: chinfomodel.h:191
Definition: fiff.h:98
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...
QStringList m_mappedLayoutChNames
Definition: chinfomodel.h:193