MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mainwindow.h
1 //=============================================================================================================
66 #ifndef MAINWINDOW_H
67 #define MAINWINDOW_H
68 
69 //*************************************************************************************************************
70 //=============================================================================================================
71 // INCLUDES
72 //=============================================================================================================
73 
74 #include "rawmodel.h"
75 #include "rawdelegate.h"
76 
77 #include "info.h"
78 #include "types.h"
79 #include "rawsettings.h"
80 
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // Qt INCLUDES
85 //=============================================================================================================
86 
87 #include <QApplication>
88 #include <QDebug>
89 #include <QSettings>
90 #include <QMainWindow>
91 #include <QWidget>
92 
93 #include <QFileDialog>
94 #include <QFile>
95 #include <QMenu>
96 #include <QMenuBar>
97 #include <QAction>
98 #include <QSignalMapper>
99 
100 #include <QTableView>
101 #include <QHeaderView>
102 #include <QVBoxLayout>
103 #include <QGroupBox>
104 #include <QScrollArea>
105 #include <QScrollBar>
106 #include <QScroller>
107 
108 #include <QDockWidget>
109 #include <QTextBrowser>
110 
111 #include <QDebug>
112 #include <QPainter>
113 
114 #include <QMessageBox>
115 
116 
117 //*************************************************************************************************************
118 //=============================================================================================================
119 // MNE INCLUDES
120 //=============================================================================================================
121 
122 #include <fiff/fiff.h>
123 #include <mne/mne.h>
124 #include <utils/parksmcclellan.h>
125 
126 
127 //*************************************************************************************************************
128 //=============================================================================================================
129 // Eigen INCLUDES
130 //=============================================================================================================
131 
132 #include <Eigen/Core>
133 #include <Eigen/SparseCore>
134 
135 
136 //*************************************************************************************************************
137 //=============================================================================================================
138 // USED NAMESPACES
139 //=============================================================================================================
140 
141 using namespace Eigen;
142 
143 
144 //*************************************************************************************************************
145 //=============================================================================================================
146 // DEFINE NAMESPACE MNEBrowseRawQt
147 //=============================================================================================================
148 
149 namespace MNEBrowseRawQt
150 {
151 
152 //=============================================================================================================
156 class MainWindow : public QMainWindow
157 {
158  Q_OBJECT
159 
160 public:
161  MainWindow(QWidget *parent = 0);
162  ~MainWindow();
163 
164  //=========================================================================================================
172  void writeToLog(const QString& logMsg, LogKind lgknd, LogLevel lglvl);
173 
174 public slots:
175 
176  //=========================================================================================================
181  void customContextMenuRequested(QPoint pos);
182 
183  //=========================================================================================================
188  void setScrollBarPosition(int pos);
189 
190 private slots:
191  //=========================================================================================================
195  void openFile();
196 
197  //=========================================================================================================
201  void writeFile();
202 
203  //=========================================================================================================
207  void about();
208 
209 signals:
210  void testSignal();
211 
212 private:
213  //=========================================================================================================
217  void setupModel();
218 
219  //=========================================================================================================
223  void setupDelegate();
224 
225  //=========================================================================================================
229  void setupView();
230 
231  //=========================================================================================================
235  void setupLayout();
236 
237  //=========================================================================================================
241  void setupViewSettings();
242 
243  //=========================================================================================================
247  void createMenus();
248 
249  //=========================================================================================================
253  void createLogDockWindow();
254 
255  //=========================================================================================================
261  void setLogLevel(LogLevel lvl);
262 
263  //=========================================================================================================
267  void setWindow();
268 
269  //=========================================================================================================
273  void setWindowStatus();
274 
275  QFile m_qFileRaw;
276  QSignalMapper* m_qSignalMapper;
278  //modelview framework
279  RawModel *m_pRawModel;
280  QTableView *m_pTableView;
281  RawDelegate *m_pRawDelegate;
283  //application settings
284  QSettings m_qSettings;
285  RawSettings m_rawSettings;
286 
287  //Log
288  QDockWidget* m_pDockWidget_Log;
289  QTextBrowser* m_pTextBrowser_Log;
290  LogLevel m_eLogLevelCurrent;
292 };
293 
294 } //NAMESPACE
295 
296 #endif // MAINWINDOW_H
Contains general application specific types.
In this RawSettings class all mne_browse_raw_qt settings are managed. In order to store settings from...
MNE class declaration, which provides static wrapper functions to stay consistent with mne matlab too...
This class represents the model of the model/view framework of mne_browse_raw_qt application. It is derived from QAbstractTableModel so the virtual functions rowCount(),columnCount() and data() needed to be reimplemented. The delegate requests the data for any individual table cell by invoking data(QModelIndex index, int role) and a certain role. DisplayRole is the standard role for requesting the plain data. Other roles such as BackgroundRole are requested to fill a cell with a certain background color with respect to the individual index. For further information see [1].
This class represents the delegate of the model/view framework of mne_browse_raw_qt application...
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...