36 #ifndef REALTIMEMULTISAMPLEARRAYMODEL_H
37 #define REALTIMEMULTISAMPLEARRAYMODEL_H
55 #include <QAbstractTableModel>
64 #include <Eigen/SparseCore>
83 using namespace Eigen;
113 virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const ;
123 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const;
134 virtual QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
146 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
154 void setChannelInfo(QList<RealTimeSampleArrayChInfo> &chInfo);
172 void setSamplingInfo(
float sps,
int T,
float dest_sps = 128.0f);
180 void addData(
const QList<MatrixXd> &data);
190 fiff_int_t getKind(qint32 row)
const;
200 fiff_int_t getUnit(qint32 row)
const;
210 fiff_int_t getCoil(qint32 row)
const;
218 inline qint32 getMaxSamples()
const;
226 inline const QMap<qint32,qint32>& getIdxSelMap()
const;
234 void selectRows(
const QList<qint32> &selection);
240 void resetSelection();
248 inline qint32 numVLines()
const;
256 void toggleFreeze(
const QModelIndex &index);
264 inline bool isFreezed()
const;
272 inline const QMap< qint32,float >& getScaling()
const;
280 void setScaling(
const QMap< qint32,float >& p_qMapChScaling);
286 void updateProjection();
295 void newSelection(QList<qint32> selection);
298 QList<RealTimeSampleArrayChInfo> m_qListChInfo;
300 RowVectorXi m_vecBadIdcs;
302 SparseMatrix<double> m_matSparseProj;
303 bool m_bProjActivated;
305 QMap<qint32,qint32> m_qMapIdxRowSelection;
308 QVector<VectorXd> m_dataCurrent;
309 QVector<VectorXd> m_dataLast;
311 QVector<VectorXd> m_dataCurrentFreeze;
312 QVector<VectorXd> m_dataLastFreeze;
316 qint32 m_iDownsampling;
317 qint32 m_iMaxSamples;
318 qint32 m_iCurrentSample;
322 QMap< qint32,float > m_qMapChScaling;
333 return m_iMaxSamples;
341 return m_qMapIdxRowSelection;
365 return m_qMapChScaling;
370 #endif // REALTIMEMULTISAMPLEARRAYMODEL_H
const QMap< qint32, float > & getScaling() const
Old fiff_type declarations - replace them.
const QMap< qint32, qint32 > & getIdxSelMap() const
The RealTimeMultiSampleArrayModel class implements the data access model for a real-time multi sample...
QSharedPointer< FiffInfo > SPtr
Contains the declaration of the RealTimeSampleArrayChInfo class.
FiffInfo class declaration.
qint32 getMaxSamples() const