MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
channelselectionview.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef CHANNELSELECTIONVIEW_H
38#define CHANNELSELECTIONVIEW_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../disp_global.h"
45#include "abstractview.h"
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QWidget>
52#include <QListWidget>
53#include <QGraphicsItem>
54
55//=============================================================================================================
56// EIGEN INCLUDES
57//=============================================================================================================
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63class QListWidgetItem;
64
65namespace Ui {
66 class ChannelSelectionViewWidget;
67} //This must be defined outside of the DISPLIB namespace
68
69namespace FIFFLIB {
70 class FiffInfo;
71}
72
73//=============================================================================================================
74// DEFINE NAMESPACE DISPLIB
75//=============================================================================================================
76
77namespace DISPLIB
78{
79
80//=============================================================================================================
81// DISPLIB FORWARD DECLARATIONS
82//=============================================================================================================
83
84class ChannelInfoModel;
85class SelectionScene;
86
93{
94 Q_OBJECT
95
96public:
97 typedef QSharedPointer<ChannelSelectionView> SPtr;
98 typedef QSharedPointer<const ChannelSelectionView> ConstSPtr;
100 //=========================================================================================================
107 ChannelSelectionView(const QString& sSettingsPath = "",
108 QWidget *parent = 0,
109 QSharedPointer<ChannelInfoModel> pChannelInfoModel = QSharedPointer<ChannelInfoModel>(0),
110 Qt::WindowType f = Qt::Widget);
111
112 //=========================================================================================================
118
119 //=========================================================================================================
125 void setCurrentlyMappedFiffChannels(const QStringList &mappedLayoutChNames);
126
127 //=========================================================================================================
134 void highlightChannels(QModelIndexList channelIndexList);
135
136 //=========================================================================================================
143 void selectChannels(QStringList channelList);
144
145 //=========================================================================================================
150 QStringList getSelectedChannels();
151
152 //=========================================================================================================
159 QListWidgetItem* getItemForChName(QListWidget *listWidget,
160 const QString& channelName);
161
162 //=========================================================================================================
166 const QMap<QString,QPointF>& getLayoutMap();
167
168 //=========================================================================================================
172 void newFiffFileLoaded(QSharedPointer<FIFFLIB::FiffInfo>& pFiffInfo);
173
174 //=========================================================================================================
180 QString getCurrentLayoutFile();
181
182 //=========================================================================================================
188 QString getCurrentGroupFile();
189
190 //=========================================================================================================
196 void setCurrentLayoutFile(QString currentLayoutFile);
197
198 //=========================================================================================================
202 void updateBadChannels();
203
204 //=========================================================================================================
209 void updateDataView();
210
211 //=========================================================================================================
215 void saveSettings();
216
217 //=========================================================================================================
221 void loadSettings();
222
223 //=========================================================================================================
229 void updateGuiMode(GuiMode mode);
230
231 //=========================================================================================================
237 void updateProcessingMode(ProcessingMode mode);
238
239 //=========================================================================================================
245 QWidget* getViewWidget();
246
247 //=========================================================================================================
253 QWidget* getControlWidget();
254
255 //=========================================================================================================
261 bool isSelectionEmpty();
262
263 //=========================================================================================================
267 void clearView();
268
269private:
270 //=========================================================================================================
275 void initListWidgets();
276
277 //=========================================================================================================
282 void initSelectionSceneView();
283
284 //=========================================================================================================
289 void initComboBoxes();
290
291 //=========================================================================================================
296 void initButtons();
297
298 //=========================================================================================================
303 void initCheckBoxes();
304
305 //=========================================================================================================
311 bool loadLayout(QString path);
312
313 //=========================================================================================================
319 bool loadSelectionGroups(QString path);
320
321 //=========================================================================================================
326 void cleanUpMEGChannels();
327
328 //=========================================================================================================
335 void updateSelectionGroupsList(QListWidgetItem* current,
336 QListWidgetItem* previous);
337
338 //=========================================================================================================
343 void updateSceneItems();
344
345 //=========================================================================================================
350 void updateUserDefinedChannelsList();
351
352 //=========================================================================================================
357 void onBtnLoadUserSelection();
358
359 //=========================================================================================================
364 void onBtnSaveUserSelection();
365
366 //=========================================================================================================
371 void onBtnAddToSelectionGroups();
372
373 //=========================================================================================================
378 void onComboBoxLayoutChanged();
379
380 //=========================================================================================================
385 void resizeEvent(QResizeEvent* event);
386
387 //=========================================================================================================
392 bool eventFilter(QObject *obj, QEvent *event);
393
394 Ui::ChannelSelectionViewWidget* m_pUi;
396 QSharedPointer<ChannelInfoModel> m_pChannelInfoModel;
398 QMap<QString,QPointF> m_layoutMap;
399 QMultiMap<QString,QStringList> m_selectionGroupsMap;
401 SelectionScene* m_pSelectionScene;
403 QStringList m_currentlyLoadedFiffChannels;
405 QString m_sSettingsPath;
407 bool m_bSetup;
408signals:
409 //=========================================================================================================
415 void showSelectedChannelsOnly(QStringList selectedChannels);
416
417 //=========================================================================================================
423 void selectionChanged(const QList<QGraphicsItem*> &selectedChannelItems);
424
425 //=========================================================================================================
431 void loadedLayoutMap(const QMap<QString,QPointF> &layoutMap);
432};
433} // NAMESPACE DISPLIB
434
435#endif // CHANNELSELECTIONVIEW_H
#define DISPSHARED_EXPORT
Definition disp_global.h:55
The AbstractView class provides the base calss for all Disp viewers.
The ChannelSelectionView class provides a channel selection window.
void selectionChanged(const QList< QGraphicsItem * > &selectedChannelItems)
QSharedPointer< ChannelSelectionView > SPtr
void showSelectedChannelsOnly(QStringList selectedChannels)
QSharedPointer< const ChannelSelectionView > ConstSPtr
void loadedLayoutMap(const QMap< QString, QPointF > &layoutMap)
The SelectionScene class provides a reimplemented QGraphicsScene for 2D layout plotting.
AbstractView class declaration.