MNE-CPP  beta 1.0
selectionmanagerwindow.h
1 //=============================================================================================================
37 #ifndef SELECTIONMANAGERWINDOW_H
38 #define SELECTIONMANAGERWINDOW_H
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "ui_selectionmanagerwindow.h"
46 #include "utils/layoutloader.h" //MNE-CPP utils
47 #include "utils/selectionloader.h" //MNE-CPP utils
48 #include "utils/layoutmaker.h" //MNE-CPP utils
49 #include "../Utils/selectionscene.h" //MNE Browse Raw QT utils
50 #include "fiff/fiff.h"
51 #include "../Models/chinfomodel.h"
52 
53 
54 //*************************************************************************************************************
55 //=============================================================================================================
56 // QT INCLUDES
57 //=============================================================================================================
58 
59 #include <QDockWidget>
60 #include <QMutableStringListIterator>
61 
62 
63 //*************************************************************************************************************
64 //=============================================================================================================
65 // USED NAMESPACES
66 //=============================================================================================================
67 
68 using namespace FIFFLIB;
69 using namespace UTILSLIB;
70 
71 
72 //*************************************************************************************************************
73 //=============================================================================================================
74 // DEFINE NAMESPACE MNEBrowseRawQt
75 //=============================================================================================================
76 
77 namespace MNEBrowseRawQt
78 {
79 
80 
81 //*************************************************************************************************************
82 //=============================================================================================================
83 // DEFINE FORWARD DECLARATIONS
84 //=============================================================================================================
85 
86 
92 class SelectionManagerWindow : public QDockWidget
93 {
94  Q_OBJECT
95 
96 public:
97  //=========================================================================================================
104  SelectionManagerWindow(QWidget *parent = 0, ChInfoModel *pChInfoModel = 0);
105 
106  //=========================================================================================================
112 
113  //=========================================================================================================
119  void setCurrentlyMappedFiffChannels(const QStringList &mappedLayoutChNames);
120 
121  //=========================================================================================================
128  void highlightChannels(QModelIndexList channelIndexList);
129 
130  //=========================================================================================================
137  void selectChannels(QStringList channelList);
138 
139  //=========================================================================================================
144  QStringList getSelectedChannels();
145 
146  //=========================================================================================================
153  QListWidgetItem* getItemForChName(QListWidget *listWidget, QString channelName);
154 
155  //=========================================================================================================
159  const QMap<QString,QPointF>& getLayoutMap();
160 
161  //=========================================================================================================
165  void newFiffFileLoaded();
166 
167 signals:
168  //=========================================================================================================
174  void showSelectedChannelsOnly(QStringList selectedChannels);
175 
176  //=========================================================================================================
182  void selectionChanged(const QList<QGraphicsItem*> &selectedChannelItems);
183 
184  //=========================================================================================================
190  void loadedLayoutMap(const QMap<QString,QPointF> &layoutMap);
191 
192 private:
193  //=========================================================================================================
198  void initListWidgets();
199 
200  //=========================================================================================================
205  void initSelectionSceneView();
206 
207  //=========================================================================================================
212  void initComboBoxes();
213 
214  //=========================================================================================================
220  bool loadLayout(QString path);
221 
222  //=========================================================================================================
228  bool loadSelectionGroups(QString path);
229 
230  //=========================================================================================================
235  void cleanUpMEGChannels();
236 
237  //=========================================================================================================
244  void updateSelectionGroupsList(QListWidgetItem* current, QListWidgetItem* previous);
245 
246  //=========================================================================================================
251  void updateSceneItems();
252 
253  //=========================================================================================================
258  void updateUserDefinedChannelsList();
259 
260  //=========================================================================================================
265  void updateDataView();
266 
267  //=========================================================================================================
272  void resizeEvent(QResizeEvent* event);
273 
274  //=========================================================================================================
279  bool eventFilter(QObject *obj, QEvent *event);
280 
283  ChInfoModel* m_pChInfoModel;
285  QMap<QString,QPointF> m_layoutMap;
286  QMap<QString,QStringList> m_selectionGroupsMap;
288  SelectionScene* m_pSelectionScene;
290  QStringList m_currentlyLoadedFiffChannels;
291 };
292 
293 } // NAMESPACE MNEBrowseRawQt
294 
295 #endif // SELECTIONMANAGERWINDOW_H
LayoutLoader class declaration.
The SelectionManagerWindow class provides a channel selection window.
SelectionLoader class declaration.
The SelectionScene class provides a reimplemented QGraphicsScene for 2D layout plotting.
Definition: fiff.h:98
LayoutLoader class declaration.
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...