36 #ifndef CHANNELINFOMODEL_H
37 #define CHANNELINFOMODEL_H
43 #include "../../disp_global.h"
49 #include <QAbstractTableModel>
50 #include <QSharedPointer>
80 namespace ChannelInfoModelRoles
82 enum ItemRole{GetOrigChName = Qt::UserRole + 1009,
83 GetMappedLayoutChName = Qt::UserRole + 1010,
84 GetChNumber = Qt::UserRole + 1011,
85 GetChKind = Qt::UserRole + 1012,
86 GetMEGType = Qt::UserRole + 1013,
87 GetChUnit = Qt::UserRole + 1014,
88 GetChAlias = Qt::UserRole + 1015,
89 GetChPosition = Qt::UserRole + 1016,
90 GetChDigitizer = Qt::UserRole + 1017,
91 GetChActiveFilter = Qt::UserRole + 1018,
92 GetChCoilType = Qt::UserRole + 1019,
93 GetIsBad = Qt::UserRole + 1020};
105 typedef QSharedPointer<ChannelInfoModel>
SPtr;
106 typedef QSharedPointer<const ChannelInfoModel>
ConstSPtr;
108 ChannelInfoModel(QSharedPointer<FIFFLIB::FiffInfo>& pFiffInfo, QObject *parent = 0);
115 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const;
116 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const;
117 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
118 virtual QVariant data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const;
119 virtual bool setData(
const QModelIndex & index,
const QVariant & value,
int role = Qt::EditRole);
120 virtual Qt::ItemFlags flags(
const QModelIndex & index)
const;
121 virtual bool insertRows(
int position,
int span,
const QModelIndex & parent = QModelIndex());
122 virtual bool removeRows(
int position,
int span,
const QModelIndex & parent = QModelIndex());
130 void setFiffInfo(QSharedPointer<FIFFLIB::FiffInfo>& pFiffInfo);
138 void assignedOperatorsChanged(
const QMap<
int,QSharedPointer<MNEOperator> > &assignedOperators);
146 void layoutChanged(
const QMap<QString,QPointF> &layoutMap);
154 const QStringList & getMappedChannelsList();
163 int getIndexFromOrigChName(QString chName);
172 int getIndexFromMappedChName(QString chName);
180 QStringList getBadChannelList();
194 void mapLayoutToChannels();
210 void channelsMappedToLayout(
const QStringList &mappedLayoutChNames);
214 #endif // CHANNELINFOMODEL_H