MNE-CPP  beta 1.0
Signals | Public Member Functions | List of all members
XDISPLIB::SensorModel Class Reference

The SensorModel class implements a table model which holds the sensor model properties. More...

#include <sensormodel.h>

Inheritance diagram for XDISPLIB::SensorModel:

Signals

void newSelection (QList< qint32 > selection)
 
void newLayout ()
 

Public Member Functions

 SensorModel (QObject *parent=0)
 
 SensorModel (QIODevice *device, QObject *parent=0)
 
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
 
const QList< SensorLayout > & getSensorLayouts () const
 
qint32 getNumLayouts () const
 
qint32 getCurrentLayout () const
 
const QMap< QString, qint32 > & getNameIdMap () const
 
void applySensorGroup (int id)
 
void setCurrentLayout (int id)
 
const QList< SensorGroup > & getSensorGroups () const
 
void mapChannelInfo (const QList< XMEASLIB::RealTimeSampleArrayChInfo > &chInfoList)
 
void updateChannelState (SensorItem *item)
 
void silentUpdateSelection (const QList< qint32 > &selection)
 

Detailed Description

The SensorModel class implements a table model which holds the sensor model properties.

DECLARE CLASS SensorModel

Definition at line 37 of file sensormodel.h.

Constructor & Destructor Documentation

SensorModel::SensorModel ( QObject *  parent = 0)

Constructs a SensorModel for the given parent.

Parameters
[in]parentparent of item

Definition at line 66 of file sensormodel.cpp.

SensorModel::SensorModel ( QIODevice *  device,
QObject *  parent = 0 
)

Constructs a SensorModel from a device for the given parent.

Parameters
[in]devicedevice to read from
[in]parentparent of SensorModel

Definition at line 75 of file sensormodel.cpp.

Member Function Documentation

void SensorModel::applySensorGroup ( int  id)

Apply a sensor selection group

Parameters
[in]idid of the sensor group to apply

Definition at line 206 of file sensormodel.cpp.

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

Number of columns for the given model index parent

Parameters
[in]parentthe parent of the model index
Returns
the number of columns

Definition at line 107 of file sensormodel.cpp.

QVariant XDISPLIB::SensorModel::data ( int  row,
int  column,
int  role = Qt::DisplayRole 
) const
inline

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 225 of file sensormodel.h.

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

Data for the given index and given display role

Parameters
[in]indexindex row
[in]roledisplay role to access
Returns
the accessed data

Definition at line 116 of file sensormodel.cpp.

qint32 XDISPLIB::SensorModel::getCurrentLayout ( ) const
inline

Index of the current layout

Returns
the index of the current layout

Definition at line 257 of file sensormodel.h.

const QMap< QString, qint32 > & XDISPLIB::SensorModel::getNameIdMap ( ) const
inline

The channel name to the overall channel number map

Returns
a reference to channel name to the overall channel number map

Definition at line 265 of file sensormodel.h.

qint32 XDISPLIB::SensorModel::getNumLayouts ( ) const
inline

The number of loaded sensor layouts

Returns
the number of loaded sensor layouts

Definition at line 241 of file sensormodel.h.

const QList< SensorGroup > & XDISPLIB::SensorModel::getSensorGroups ( ) const
inline

Get available sensor groups

Returns
list of available sensor groups

Definition at line 249 of file sensormodel.h.

const QList< SensorLayout > & XDISPLIB::SensorModel::getSensorLayouts ( ) const
inline

The loaded sensor layouts

Returns
the loaded sensor layouts

Definition at line 233 of file sensormodel.h.

void SensorModel::mapChannelInfo ( const QList< XMEASLIB::RealTimeSampleArrayChInfo > &  chInfoList)

Channel info to map layouts to

Parameters
[in]chInfoListchannel info to map layouts to

Definition at line 238 of file sensormodel.cpp.

void XDISPLIB::SensorModel::newLayout ( )
signal

Signal emitted when new layout is selected

void XDISPLIB::SensorModel::newSelection ( QList< qint32 >  selection)
signal

Signal emitted when selection changed

Parameters
[in]selectionlist of channels which should be selected
int SensorModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Number of rows for the given model index parent

Parameters
[in]parentthe parent of the model index
Returns
the number of rows

Definition at line 95 of file sensormodel.cpp.

void SensorModel::setCurrentLayout ( int  id)

Set the current layout to display

Parameters
[in]idid of the sensor layout to display

Definition at line 220 of file sensormodel.cpp.

void SensorModel::silentUpdateSelection ( const QList< qint32 > &  selection)

Change selction without emitting newSelection signal

Parameters
[in]selectionlist of channels which should be selected

Definition at line 261 of file sensormodel.cpp.

void SensorModel::updateChannelState ( SensorItem item)

Update channel selection state of item

Parameters
[in]itemsensor item which changed selection state

Definition at line 252 of file sensormodel.cpp.


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