v2.0.0
Loading...
Searching...
No Matches
DISPLIB::EvokedSetModel Class Reference

QAbstractTableModel wrapping a FiffEvokedSet (one row per channel, one column per condition). More...

#include <evokedsetmodel.h>

Public Types

typedef QSharedPointer< EvokedSetModelSPtr
typedef QSharedPointer< const EvokedSetModelConstSPtr

Signals

void newSelection (QList< qint32 > selection)
void newAverageColorMap (const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
void newAverageActivationMap (const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)

Public Member Functions

 EvokedSetModel (QObject *parent=0)
 ~EvokedSetModel ()
bool isInit () const
qint32 getNumSamples () const
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant data (int row, int column, int role=Qt::DisplayRole) const
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void init ()
void setEvokedSet (QSharedPointer< FIFFLIB::FiffEvokedSet > pEvokedSet)
QSharedPointer< FIFFLIB::FiffEvokedSet > getEvokedSet ()
void updateData ()
QSharedPointer< QMap< QString, QColor > > getAverageColor () const
QSharedPointer< QMap< QString, bool > > getAverageActivation () const
void setAverageColor (const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
void setAverageActivation (const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
FIFFLIB::fiff_int_t getKind (qint32 row) const
bool getIsChannelBad (qint32 row) const
FIFFLIB::fiff_int_t getUnit (qint32 row) const
FIFFLIB::fiff_int_t getCoil (qint32 row) const
const QMap< qint32, qint32 > & getIdxSelMap () const
int getNumberOfTimeSpacers () const
QPair< QVariant, QVariant > getBaselineInfo () const
int getNumAverages () const
qint32 getNumPreStimSamples () const
float getSamplingFrequency () const
void selectRows (const QList< qint32 > &selection)
void resetSelection ()
qint32 numVLines () const
bool isFreezed () const
void updateProjection (const QList< FIFFLIB::FiffProj > &projs)
void updateCompensator (int to)
void toggleFreeze ()

Detailed Description

QAbstractTableModel wrapping a FiffEvokedSet (one row per channel, one column per condition).

Propagates baseline-correction, SSP-projection and bad-channel updates so connected views (ButterflyView, AverageLayoutView) stay in sync with the latest pre-processing settings.

Definition at line 92 of file evokedsetmodel.h.

Inheritance diagram for DISPLIB::EvokedSetModel:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const EvokedSetModel> DISPLIB::EvokedSetModel::ConstSPtr

Const shared pointer type for EvokedSetModel.

Definition at line 98 of file evokedsetmodel.h.

◆ SPtr

Shared pointer type for EvokedSetModel.

Definition at line 97 of file evokedsetmodel.h.

Constructor & Destructor Documentation

◆ EvokedSetModel()

EvokedSetModel::EvokedSetModel ( QObject * parent = 0)

Constructs an real-time multi sample array table model for the given parent.

Parameters
[in]parentparent of the table model.

Definition at line 55 of file evokedsetmodel.cpp.

◆ ~EvokedSetModel()

EvokedSetModel::~EvokedSetModel ( )

Definition at line 71 of file evokedsetmodel.cpp.

Member Function Documentation

◆ columnCount()

int EvokedSetModel::columnCount ( const QModelIndex & parent = QModelIndex()) const
virtual

Returns the number of columns for the children of the given parent.

Parameters
[in]parentnot used.
Returns
number of columns.

Definition at line 88 of file evokedsetmodel.cpp.

◆ data() [1/2]

QVariant EvokedSetModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
virtual

Returns the data stored under the given role for the item referred to by the index.

Parameters
[in]indexdetermines item location.
[in]rolerole to return.
Returns
accessed data.

Definition at line 95 of file evokedsetmodel.cpp.

◆ data() [2/2]

QVariant EvokedSetModel::data ( int row,
int column,
int role = Qt::DisplayRole ) const

Data for the row and column and given display role

Parameters
[in]rowindex row.
[in]columnindex column.
[in]roledisplay role to access.
Returns
the accessed data.

Definition at line 491 of file evokedsetmodel.cpp.

◆ getAverageActivation()

QSharedPointer< QMap< QString, bool > > EvokedSetModel::getAverageActivation ( ) const

Get the current average activations

Returns
Pointer to the current average activations.

Definition at line 400 of file evokedsetmodel.cpp.

◆ getAverageColor()

QSharedPointer< QMap< QString, QColor > > EvokedSetModel::getAverageColor ( ) const

Get the current average colors

Returns
Pointer to the current average colors.

Definition at line 393 of file evokedsetmodel.cpp.

◆ getBaselineInfo()

QPair< QVariant, QVariant > EvokedSetModel::getBaselineInfo ( ) const

Returns the current baseline information

Returns
the current baseline information as a from to QPair.

Definition at line 572 of file evokedsetmodel.cpp.

◆ getCoil()

fiff_int_t EvokedSetModel::getCoil ( qint32 row) const

Returns the coil type of a given channel number

Parameters
[in]rowrow number which correspodns to a given channel.
Returns
coil type of given channel number.

Definition at line 459 of file evokedsetmodel.cpp.

◆ getEvokedSet()

QSharedPointer< FIFFLIB::FiffEvokedSet > EvokedSetModel::getEvokedSet ( )

Definition at line 776 of file evokedsetmodel.cpp.

◆ getIdxSelMap()

const QMap< qint32, qint32 > & EvokedSetModel::getIdxSelMap ( ) const

Returns a map which conatins the channel idx and its corresponding selection status

Returns
the channel idx to selection status.

Definition at line 498 of file evokedsetmodel.cpp.

◆ getIsChannelBad()

bool EvokedSetModel::getIsChannelBad ( qint32 row) const

Returns true or fals whether the provided channel is bad.

Parameters
[in]rowrow number which correspodns to a given channel.
Returns
Returns true or fals whether the provided channel is bad.

Definition at line 433 of file evokedsetmodel.cpp.

◆ getKind()

fiff_int_t EvokedSetModel::getKind ( qint32 row) const

Returns the kind of a given channel number

Parameters
[in]rowrow number which correspodns to a given channel.
Returns
kind of given channel number.

Definition at line 421 of file evokedsetmodel.cpp.

◆ getNumAverages()

int EvokedSetModel::getNumAverages ( ) const

Returns the current number of stored averages

Returns
the current number of stored averages.

Definition at line 580 of file evokedsetmodel.cpp.

◆ getNumberOfTimeSpacers()

int EvokedSetModel::getNumberOfTimeSpacers ( ) const

Returns the current number for the time spacers

Returns
the current number for the time spacers.

Definition at line 558 of file evokedsetmodel.cpp.

◆ getNumPreStimSamples()

qint32 EvokedSetModel::getNumPreStimSamples ( ) const

Returns the number of pre-stimulus samples

Returns
the number of pre-stimulus samples.

Definition at line 518 of file evokedsetmodel.cpp.

◆ getNumSamples()

qint32 EvokedSetModel::getNumSamples ( ) const

Returns the number of samples.

Returns
The number of samples.

Definition at line 478 of file evokedsetmodel.cpp.

◆ getSamplingFrequency()

float EvokedSetModel::getSamplingFrequency ( ) const

Returns the current sampling frequency

Returns
the current sampling frequency.

Definition at line 544 of file evokedsetmodel.cpp.

◆ getUnit()

fiff_int_t EvokedSetModel::getUnit ( qint32 row) const

Returns the unit of a given channel number

Parameters
[in]rowrow number which correspodns to a given channel.
Returns
unit of given channel number.

Definition at line 447 of file evokedsetmodel.cpp.

◆ headerData()

QVariant EvokedSetModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
virtual

Returns the data for the given role and section in the header with the specified orientation.

Parameters
[in]sectionFor horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.
[in]orientationQt::Horizontal or Qt::Vertical.
[in]rolerole to show.
Returns
accessed eader data.

Definition at line 199 of file evokedsetmodel.cpp.

◆ init()

void EvokedSetModel::init ( )

Definition at line 245 of file evokedsetmodel.cpp.

◆ isFreezed()

bool EvokedSetModel::isFreezed ( ) const

Returns current freezing status

Returns
the current freezing status.

Definition at line 551 of file evokedsetmodel.cpp.

◆ isInit()

bool EvokedSetModel::isInit ( ) const

Returns whether this class is initalized.

Returns
Flag specifying whether this class is initalized.

Definition at line 471 of file evokedsetmodel.cpp.

◆ newAverageActivationMap

void DISPLIB::EvokedSetModel::newAverageActivationMap ( const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
signal

Emmited when new average activation is available

Parameters
[in]qMapAverageActivationthe average activation map.

◆ newAverageColorMap

void DISPLIB::EvokedSetModel::newAverageColorMap ( const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
signal

Emmited when new average color is available

Parameters
[in]qMapAverageColorthe average color map.

◆ newSelection

void DISPLIB::EvokedSetModel::newSelection ( QList< qint32 > selection)
signal

Emmited when new selcetion was made

Parameters
[in]selectionlist of all selected channels.

◆ numVLines()

qint32 EvokedSetModel::numVLines ( ) const

Returns the number of vertical lines (one per second)

Returns
number of vertical lines.

Definition at line 505 of file evokedsetmodel.cpp.

◆ resetSelection()

void EvokedSetModel::resetSelection ( )

Resets the current selection (selects all channels)

Definition at line 612 of file evokedsetmodel.cpp.

◆ rowCount()

int EvokedSetModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
virtual

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Parameters
[in]parentnot used.
Returns
number of rows.

Definition at line 77 of file evokedsetmodel.cpp.

◆ selectRows()

void EvokedSetModel::selectRows ( const QList< qint32 > & selection)

Selects the given list of channel indeces and unselect all other channels

Parameters
[in]selectionchannel index list to select.

Definition at line 587 of file evokedsetmodel.cpp.

◆ setAverageActivation()

void EvokedSetModel::setAverageActivation ( const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)

Set the average activations

Parameters
[in]qMapAverageActivationPointer to the new average activations.

Definition at line 414 of file evokedsetmodel.cpp.

◆ setAverageColor()

void EvokedSetModel::setAverageColor ( const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)

Set the average colors

Parameters
[in]qMapAverageColorPointer to the new average colors.

Definition at line 407 of file evokedsetmodel.cpp.

◆ setEvokedSet()

void EvokedSetModel::setEvokedSet ( QSharedPointer< FIFFLIB::FiffEvokedSet > pEvokedSet)

Sets corresponding evoked set

Parameters
[in]pEvokedSetThe evoked set.

Definition at line 232 of file evokedsetmodel.cpp.

◆ toggleFreeze()

void EvokedSetModel::toggleFreeze ( )

Toggle freeze for all channels when a channel is double clicked

Definition at line 759 of file evokedsetmodel.cpp.

◆ updateCompensator()

void EvokedSetModel::updateCompensator ( int to)

Update the compensator

Parameters
[in]toCompensator to use in fiff constant format FiffCtfComp.kind (NOT FiffCtfComp.ctfkind).

Definition at line 700 of file evokedsetmodel.cpp.

◆ updateData()

void EvokedSetModel::updateData ( )

Update stored data

Definition at line 293 of file evokedsetmodel.cpp.

◆ updateProjection()

void EvokedSetModel::updateProjection ( const QList< FIFFLIB::FiffProj > & projs)

Update projections

Definition at line 631 of file evokedsetmodel.cpp.


The documentation for this class was generated from the following files: