MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Slots | Signals | Public Member Functions | List of all members
DISPLIB::BidsViewModel Class Reference

The BidsViewModel class is the base data container. More...

#include <bidsviewmodel.h>

Public Types

typedef QSharedPointer< BidsViewModelSPtr
 
typedef QSharedPointer< const BidsViewModelConstSPtr
 

Public Slots

void addData (QModelIndex selectedItem, QStandardItem *pNewItem, int iDataType)
 
void addToData (QStandardItem *pNewItem, const QModelIndex &parentIndex, int iDataType)
 
QModelIndex addSubject (const QString &sSubjectName)
 
QModelIndex addSessionToSubject (const QString &sSubjectName, const QString &sSessionName)
 
QModelIndex addSessionToSubject (QModelIndex subjectIndex, const QString &sSessionName)
 
QModelIndex addDataToSession (QModelIndex sessionIndex, QStandardItem *pNewItem, int iDataType)
 
QModelIndex moveSessionToSubject (QModelIndex subjectIndex, QModelIndex sessionIndex)
 
QModelIndex moveDataToSession (QModelIndex sessionIndex, QModelIndex dataIndex)
 
bool removeItem (QModelIndex itemIndex)
 

Signals

void newItemIndex (QModelIndex itemIndex)
 

Public Member Functions

 BidsViewModel (QObject *pParent=Q_NULLPTR)
 
 ~BidsViewModel ()
 

Detailed Description

The BidsViewModel class is the base data container.

DECLARE CLASS BidsViewModel

Definition at line 104 of file bidsviewmodel.h.

Inheritance diagram for DISPLIB::BidsViewModel:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for BidsViewModel.

Definition at line 110 of file bidsviewmodel.h.

◆ SPtr

Shared pointer type for BidsViewModel.

Definition at line 109 of file bidsviewmodel.h.

Constructor & Destructor Documentation

◆ BidsViewModel()

BidsViewModel::BidsViewModel ( QObject *  pParent = Q_NULLPTR)

Constructs the Analyze Data Model.

Definition at line 59 of file bidsviewmodel.cpp.

◆ ~BidsViewModel()

BidsViewModel::~BidsViewModel ( )

Destroys the Analyze Data Model.

Definition at line 67 of file bidsviewmodel.cpp.

Member Function Documentation

◆ addData

void BidsViewModel::addData ( QModelIndex  selectedItem,
QStandardItem *  pNewItem,
int  iDataType 
)
slot

Adds data to the item model.

Parameters
[in]sSubjectNameThe subject name to store the data under.
[in]pItemThe item to be added.

Definition at line 73 of file bidsviewmodel.cpp.

◆ addDataToSession

QModelIndex BidsViewModel::addDataToSession ( QModelIndex  sessionIndex,
QStandardItem *  pNewItem,
int  iDataType 
)
slot

Adds data item pNewItem to session at sessionIndex

Parameters
[in]sessionIndexIndex of session to which data will be added.
[in]pNewItemNew item to be added.
Returns
index of newly added item.

Definition at line 243 of file bidsviewmodel.cpp.

◆ addSessionToSubject [1/2]

QModelIndex BidsViewModel::addSessionToSubject ( const QString &  sSubjectName,
const QString &  sSessionName 
)
slot

Adds session named after sSessionName to subjects names sSubjectName

Parameters
[in]sSubjectNameName of subject to which session will be added.
[in]sSessionNameName of session to add.
Returns
index of newly added item.

Definition at line 161 of file bidsviewmodel.cpp.

◆ addSessionToSubject [2/2]

QModelIndex BidsViewModel::addSessionToSubject ( QModelIndex  subjectIndex,
const QString &  sSessionName 
)
slot

Adds session named after sSessionName to subject at subjectIndex

Parameters
[in]subjectIndexIndex of subject to which session will be added.
[in]sSessionNameName of session to add.
Returns
index of newly added item.

Definition at line 213 of file bidsviewmodel.cpp.

◆ addSubject

QModelIndex BidsViewModel::addSubject ( const QString &  sSubjectName)
slot

Adds subject with given input name

Parameters
[in]sSubjectNamename of subject name.
Returns
index of newly added item.

Definition at line 134 of file bidsviewmodel.cpp.

◆ addToData

void BidsViewModel::addToData ( QStandardItem *  pNewItem,
const QModelIndex &  parentIndex,
int  iDataType 
)
slot

Adds a sub-item to a data item (ex. an average)

Parameters
[in]pNewItemitem to be added.
[in]parentIndexindex of where the nitem should be added.

Definition at line 117 of file bidsviewmodel.cpp.

◆ moveDataToSession

QModelIndex BidsViewModel::moveDataToSession ( QModelIndex  sessionIndex,
QModelIndex  dataIndex 
)
slot

Moves data at dataIndex to session at sessionIndex

Parameters
[in]sessionIndexTarget session.
[in]dataIndexData to be moved.
Returns

Definition at line 328 of file bidsviewmodel.cpp.

◆ moveSessionToSubject

QModelIndex BidsViewModel::moveSessionToSubject ( QModelIndex  subjectIndex,
QModelIndex  sessionIndex 
)
slot

Moves a session to a new subject

Parameters
[in]subjectIndexTarget subject.
[in]sessionIndexSession to be moved.
Returns

Definition at line 299 of file bidsviewmodel.cpp.

◆ newItemIndex

void DISPLIB::BidsViewModel::newItemIndex ( QModelIndex  itemIndex)
signal

Emit index of newly added items to be selected

Parameters
[in]itemIndexindex of new item.

◆ removeItem

bool BidsViewModel::removeItem ( QModelIndex  itemIndex)
slot

Removes item at index itemIndex

Parameters
[in]itemIndexindex of item to be removed.
Returns
true if succefully removed, false if not.

Definition at line 371 of file bidsviewmodel.cpp.


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