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

Interactive 2-D sensor-layout picker for building, loading and saving channel groups. More...

#include <channelselectionview.h>

Public Types

typedef QSharedPointer< ChannelSelectionView > SPtr
typedef QSharedPointer< const ChannelSelectionView > ConstSPtr
Public Types inherited from DISPLIB::AbstractView
enum  StyleMode { Default , Dark }
enum  GuiMode { Clinical , Research }
enum  ProcessingMode { RealTime , Offline }
typedef QSharedPointer< AbstractView > SPtr
typedef QSharedPointer< const AbstractView > ConstSPtr

Signals

void showSelectedChannelsOnly (QStringList selectedChannels)
void selectionChanged (const QList< QGraphicsItem * > &selectedChannelItems)
void loadedLayoutMap (const QMap< QString, QPointF > &layoutMap)
Signals inherited from DISPLIB::AbstractView
void guiStyleChanged (DISPLIB::AbstractView::StyleMode style)

Public Member Functions

 ChannelSelectionView (const QString &sSettingsPath="", QWidget *parent=0, QSharedPointer< ChannelInfoModel > pChannelInfoModel=QSharedPointer< ChannelInfoModel >(0), Qt::WindowType f=Qt::Widget)
 ~ChannelSelectionView ()
void setCurrentlyMappedFiffChannels (const QStringList &mappedLayoutChNames)
void highlightChannels (QModelIndexList channelIndexList)
void selectChannels (QStringList channelList)
QStringList getSelectedChannels ()
QListWidgetItem * getItemForChName (QListWidget *listWidget, const QString &channelName)
const QMap< QString, QPointF > & getLayoutMap ()
void newFiffFileLoaded (QSharedPointer< FIFFLIB::FiffInfo > &pFiffInfo)
QString getCurrentLayoutFile ()
QString getCurrentGroupFile ()
void setCurrentLayoutFile (QString currentLayoutFile)
void updateBadChannels ()
void updateDataView ()
void saveSettings ()
void loadSettings ()
void updateGuiMode (GuiMode mode)
void updateProcessingMode (ProcessingMode mode)
QWidget * getViewWidget ()
QWidget * getControlWidget ()
bool isSelectionEmpty ()
void clearView ()
Public Member Functions inherited from DISPLIB::AbstractView
 AbstractView (QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
virtual void setGuiMode (GuiMode mode)
virtual void setProcessingMode (ProcessingMode mode)

Additional Inherited Members

Protected Attributes inherited from DISPLIB::AbstractView
bool m_bResearchModeIsActive
bool m_bOfflineModeIsActive
QString m_sSettingsPath

Detailed Description

Interactive 2-D sensor-layout picker for building, loading and saving channel groups.

Drives a SelectionScene of layout dots; lasso / click selection updates the named groups stored in MNE .sel files and emits the resulting visible-channel list to the raw and butterfly viewers.

Definition at line 85 of file channelselectionview.h.

Inheritance diagram for DISPLIB::ChannelSelectionView:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for ChannelSelectionView.

Definition at line 91 of file channelselectionview.h.

◆ SPtr

Shared pointer type for ChannelSelectionView.

Definition at line 90 of file channelselectionview.h.

Constructor & Destructor Documentation

◆ ChannelSelectionView()

ChannelSelectionView::ChannelSelectionView ( const QString & sSettingsPath = "",
QWidget * parent = 0,
QSharedPointer< ChannelInfoModel > pChannelInfoModel = QSharedPointer<ChannelInfoModel>(0),
Qt::WindowType f = Qt::Widget )

Constructs a ChannelSelectionView which is a child of parent.

Parameters
[in]sSettingsPathSettings path under which the widget persists its state (empty = no persistence).
[in]parentpointer to parent widget; If parent is 0, the new ChannelSelectionView becomes a window. If parent is another widget, ChannelSelectionView becomes a child window inside parent. ChannelSelectionView is deleted when its parent is deleted.
[in]pChannelInfoModelpointer to the channel info model.
[in]fQt window flags passed to the QWidget constructor.

Definition at line 69 of file channelselectionview.cpp.

◆ ~ChannelSelectionView()

ChannelSelectionView::~ChannelSelectionView ( )

Destroys the ChannelSelectionView. All ChannelSelectionView's children are deleted first. The application exits if ChannelSelectionView is the main widget.

Definition at line 97 of file channelselectionview.cpp.

Member Function Documentation

◆ clearView()

void ChannelSelectionView::clearView ( )
virtual

Clears the view

Implements DISPLIB::AbstractView.

Definition at line 858 of file channelselectionview.cpp.

◆ getControlWidget()

QWidget * ChannelSelectionView::getControlWidget ( )

Returns pointer to the portion of the channel view with the controls

Returns
pointer to the channelselectionview controls.

Definition at line 844 of file channelselectionview.cpp.

◆ getCurrentGroupFile()

QString ChannelSelectionView::getCurrentGroupFile ( )

Returns the currently loaded group file

Returns
currently loaded selection group file.

Definition at line 315 of file channelselectionview.cpp.

◆ getCurrentLayoutFile()

QString ChannelSelectionView::getCurrentLayoutFile ( )

Returns the currently selected layout file.

Returns
the currently selected layout file.

Definition at line 308 of file channelselectionview.cpp.

◆ getItemForChName()

QListWidgetItem * ChannelSelectionView::getItemForChName ( QListWidget * listWidget,
const QString & channelName )

gets the item corresponding to text in listWidget

Parameters
[in]listWidgetQListWidget which inhibits the needed item.
[in]channelNamethe corresponding channel name.
Returns
Matching list item, or a newly allocated empty item owned by the caller if none matches.

Definition at line 280 of file channelselectionview.cpp.

◆ getLayoutMap()

const QMap< QString, QPointF > & ChannelSelectionView::getLayoutMap ( )

returns the current layout map.

Returns
Map from channel name to its 2-D layout position.

Definition at line 292 of file channelselectionview.cpp.

◆ getSelectedChannels()

QStringList ChannelSelectionView::getSelectedChannels ( )

Current selected channels This function returns the current channel selection

Returns
Names of the user-defined channels, or of the visible group channels if none were user-defined.

Definition at line 258 of file channelselectionview.cpp.

◆ getViewWidget()

QWidget * ChannelSelectionView::getViewWidget ( )

Returns pointer to the portion of the channel view with the graphics view

Returns
pointer to the channelselectionview view.

Definition at line 837 of file channelselectionview.cpp.

◆ highlightChannels()

void ChannelSelectionView::highlightChannels ( QModelIndexList channelIndexList)

Highlight channels This function highlights channels which were selected outside this selection manager (i.e in the DataWindow's Table View)

Parameters
[in]channelIndexListchannels which are be to set as selected.

Definition at line 218 of file channelselectionview.cpp.

◆ isSelectionEmpty()

bool ChannelSelectionView::isSelectionEmpty ( )

Returns whether there is a user selection

Returns
true if there is a user selection, false if not.

Definition at line 851 of file channelselectionview.cpp.

◆ loadedLayoutMap

void DISPLIB::ChannelSelectionView::loadedLayoutMap ( const QMap< QString, QPointF > & layoutMap)
signal

emit this signal whenever a new layout was loaded

Parameters
[in]layoutMapcurrently loaded layout.

◆ loadSettings()

void ChannelSelectionView::loadSettings ( )
virtual

Loads and inits all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 424 of file channelselectionview.cpp.

◆ newFiffFileLoaded()

void ChannelSelectionView::newFiffFileLoaded ( QSharedPointer< FIFFLIB::FiffInfo > & pFiffInfo)

call this whenever a new file was loaded.

Parameters
[in]pFiffInfoMeasurement info of the new file (currently unused; the layout is reloaded).

Definition at line 299 of file channelselectionview.cpp.

◆ saveSettings()

void ChannelSelectionView::saveSettings ( )
virtual

Saves all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 407 of file channelselectionview.cpp.

◆ selectChannels()

void ChannelSelectionView::selectChannels ( QStringList channelList)

Select channels This function selects channels which were selected outside this selection manager (i.e in the DataWindow's Table View)

Parameters
[in]channelListchannels which are be to set as selected.

Definition at line 241 of file channelselectionview.cpp.

◆ selectionChanged

void DISPLIB::ChannelSelectionView::selectionChanged ( const QList< QGraphicsItem * > & selectedChannelItems)
signal

emit this signal whenever the selection in the scene has changed

Parameters
[in]selectedChannelItemscurrently user selected channels.

◆ setCurrentLayoutFile()

void ChannelSelectionView::setCurrentLayoutFile ( QString currentLayoutFile)

Sets the current layout file.

Parameters
[in]currentLayoutFilethe current layout file.

Definition at line 322 of file channelselectionview.cpp.

◆ setCurrentlyMappedFiffChannels()

void ChannelSelectionView::setCurrentlyMappedFiffChannels ( const QStringList & mappedLayoutChNames)

Sets the currently mapped fiff channels. used to create the group All.

Parameters
[in]mappedLayoutChNamesthe currently to layout mapped channels.

Definition at line 187 of file channelselectionview.cpp.

◆ showSelectedChannelsOnly

void DISPLIB::ChannelSelectionView::showSelectedChannelsOnly ( QStringList selectedChannels)
signal

emit this signal whenever the user or group selection has changed

Parameters
[in]selectedChannelscurrently user selected channels or items which are in the visible list widget.

◆ updateBadChannels()

void ChannelSelectionView::updateBadChannels ( )

Update the scene items according to the bad channel list in the fiff info file.

Definition at line 334 of file channelselectionview.cpp.

◆ updateDataView()

void ChannelSelectionView::updateDataView ( )

Updates data view.

Definition at line 362 of file channelselectionview.cpp.

◆ updateGuiMode()

void ChannelSelectionView::updateGuiMode ( GuiMode mode)
virtual

Update the views GUI based on the set GuiMode (Clinical=0, Research=1).

Parameters
[in]modeThe new mode (Clinical=0, Research=1).

Implements DISPLIB::AbstractView.

Definition at line 449 of file channelselectionview.cpp.

◆ updateProcessingMode()

void ChannelSelectionView::updateProcessingMode ( ProcessingMode mode)
virtual

Update the views GUI based on the set ProcessingMode (RealTime=0, Offline=1).

Parameters
[in]modeThe new mode (RealTime=0, Offline=1).

Implements DISPLIB::AbstractView.

Definition at line 461 of file channelselectionview.cpp.


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