Skip to main content

EvokedSetModel

Namespace: DISPLIB  ·  Library: Display Library

#include <disp/evokedsetmodel.h>

class DISPLIB::EvokedSetModel

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.

Inheritance​


Public Methods​

EvokedSetModel(parent)​

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

Parameters:

  • parent : *QObject ** parent of the table model.

~EvokedSetModel()​


isInit()​

Returns whether this class is initalized.

Returns:

  • bool — Flag specifying whether this class is initalized.

getNumSamples()​

Returns the number of samples.

Returns:

  • qint32 — The number of samples.

rowCount(parent)​

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:

  • parent : const QModelIndex & not used.

Returns:

  • int — number of rows.

columnCount(parent)​

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

Parameters:

  • parent : const QModelIndex & not used.

Returns:

  • int — number of columns.

data(row, column, role)​

Data for the row and column and given display role.

Parameters:

  • row : int index row.

  • column : int index column.

  • role : int display role to access.

Returns:

  • QVariant — the accessed data.

data(index, role)​

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

Parameters:

  • index : const QModelIndex & determines item location.

  • role : int role to return.

Returns:

  • QVariant — accessed data.

headerData(section, orientation, role)​

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

Parameters:

  • section : int For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.

  • orientation : Qt::Orientation Qt::Horizontal or Qt::Vertical.

  • role : int role to show.

Returns:

  • QVariant — accessed eader data.

init()​


setEvokedSet(pEvokedSet)​

Sets corresponding evoked set.

Parameters:


getEvokedSet()​


updateData()​

Update stored data.


getAverageColor()​

Get the current average colors.

Returns:

  • QSharedPointer< QMap< QString, QColor > > — Pointer to the current average colors.

getAverageActivation()​

Get the current average activations.

Returns:

  • QSharedPointer< QMap< QString, bool > > — Pointer to the current average activations.

setAverageColor(qMapAverageColor)​

Set the average colors.

Parameters:

  • qMapAverageColor : const QSharedPointer< QMap< QString, QColor > > Pointer to the new average colors.

setAverageActivation(qMapAverageActivation)​

Set the average activations.

Parameters:

  • qMapAverageActivation : const QSharedPointer< QMap< QString, bool > > Pointer to the new average activations.

getKind(row)​

Returns the kind of a given channel number.

Parameters:

  • row : qint32 row number which correspodns to a given channel.

Returns:

  • FIFFLIB::fiff_int_t — kind of given channel number.

getIsChannelBad(row)​

Returns true or fals whether the provided channel is bad.

Parameters:

  • row : qint32 row number which correspodns to a given channel.

Returns:

  • bool — Returns true or fals whether the provided channel is bad.

getUnit(row)​

Returns the unit of a given channel number.

Parameters:

  • row : qint32 row number which correspodns to a given channel.

Returns:

  • FIFFLIB::fiff_int_t — unit of given channel number.

getCoil(row)​

Returns the coil type of a given channel number.

Parameters:

  • row : qint32 row number which correspodns to a given channel.

Returns:

  • FIFFLIB::fiff_int_t — coil type of given channel number.

getIdxSelMap()​

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

Returns:

  • const QMap< qint32, qint32 > & — the channel idx to selection status.

getNumberOfTimeSpacers()​

Returns the current number for the time spacers.

Returns:

  • int — the current number for the time spacers.

getBaselineInfo()​

Returns the current baseline information.

Returns:

  • QPair< QVariant, QVariant > — the current baseline information as a from to QPair.

getNumAverages()​

Returns the current number of stored averages.

Returns:

  • int — the current number of stored averages.

getNumPreStimSamples()​

Returns the number of pre-stimulus samples.

Returns:

  • qint32 — the number of pre-stimulus samples.

getSamplingFrequency()​

Returns the current sampling frequency.

Returns:

  • float — the current sampling frequency.

selectRows(selection)​

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

Parameters:

  • selection : const QList< qint32 > & channel index list to select.

resetSelection()​

Resets the current selection (selects all channels).


numVLines()​

Returns the number of vertical lines (one per second).

Returns:

  • qint32 — number of vertical lines.

isFreezed()​

Returns current freezing status.

Returns:

  • bool — the current freezing status.

updateProjection(projs)​

Update projections.

Parameters:

  • projs : const QList< FiffProj > & SSP projectors to store in the evoked set info and build the projection matrix from.

updateCompensator(to)​

Update the compensator.

Parameters:

  • to : int Compensator to use in fiff constant format FiffCtfComp.kind (NOT FiffCtfComp.ctfkind).

toggleFreeze()​

Toggle freeze for all channels when a channel is double clicked.


Authors of this file​