MNE-CPP  beta 1.0
rawsettings.h
Go to the documentation of this file.
1 //=============================================================================================================
43 #ifndef RAWSETTINGS_H
44 #define RAWSETTINGS_H
45 
46 //*************************************************************************************************************
47 //=============================================================================================================
48 // INCLUDES
49 //=============================================================================================================
50 
51 #include "info.h"
52 #include "types.h"
53 
54 
55 //*************************************************************************************************************
56 //=============================================================================================================
57 // Qt INCLUDES
58 //=============================================================================================================
59 
60 #include <QObject>
61 #include <QSettings>
62 #include <QSize>
63 #include <QColor>
64 #include <QPoint>
65 #include <QStringList>
66 
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // CONSTANTS
71 //=============================================================================================================
72 
73 //MainWindow
74 #define MAINWINDOW_WINDOW_SIZE_W 1200 //width of MainWindow
75 #define MAINWINDOW_WINDOW_SIZE_H 800 //width of MainWindow
76 #define MAINWINDOW_WINDOW_POSITION_X 50 //initial window position x
77 #define MAINWINDOW_WINDOW_POSITION_Y 50 //initial window position y
78 
79 //RawModel
80 #define MODEL_WINDOW_SIZE 4016 //this value+MODEL_NUM_FILTER_TAPS must be a multiple integer of 2^x (e.g. 4016 or 8112 for 80 filter taps), length of data window to preload [in samples]
81 #define MODEL_RELOAD_POS 2000 //Distance that the current window needs to be off the ends of m_data[i] [in samples]
82 #define MODEL_MAX_WINDOWS 3 //number of windows that are at maximum remained in m_data
83 #define MODEL_NUM_FILTER_TAPS 80 //number of filter taps, required to take into account because of FFT convolution (zero padding)
84 #define MODEL_MAX_NUM_FILTER_TAPS 0 //number of maximal filter taps
85 
86 //RawDelegate
87 //Look
88 #define DELEGATE_PLOT_HEIGHT 40 //height of a single plot (row)
89 #define DELEGATE_DX 1 //each DX pixel a sample is plot -> plot resolution
90 #define DELEGATE_NHLINES 6 //number of horizontal lines within a single plot (row)
91 
92 //maximum values for different channels types according to FiffChInfo
93 #define DELEGATE_MAX_MEG_GRAD 1e-10 // kind=FIFFV_MEG_CH && unit=FIFF_UNIT_T_M
94 #define DELEGATE_MAX_MEG_MAG 1e-11 // kind=FIFFV_MEG_CH && unit=FIFF_UNIT_T
95 #define DELEGATE_MAX_EEG 1e-4 // kind=FIFFV_EEG_CH
96 #define DELEGATE_MAX_EOG 1e-3 // kind=FIFFV_EOG_CH
97 #define DELEGATE_MAX_STIM 5 // kind=FIFFV_STIM_CH
98 
99 //Define Event design parameters
100 //Event marker width
101 #define EVENT_MARKER_WIDTH 3 // in pixels
102 
103 //Event marker opacity
104 #define EVENT_MARKER_OPACITY 110 // opacity of the markers and backgorunds in the table columns. Range: 0...255
105 
106 //Data marker
107 #define DATA_MARKER_WIDTH 3 // in pixels
108 #define DATA_MARKER_OPACITY 200 // opacity of the data marker and backgorunds in the table columns. Range: 0...255
109 
110 //*************************************************************************************************************
111 //=============================================================================================================
112 // DEFINE NAMESPACE MNEBrowseRawQt
113 //=============================================================================================================
114 
115 namespace MNEBrowseRawQt
116 {
117 
118 //=============================================================================================================
122 class RawSettings : public QObject
123 {
124  Q_OBJECT
125 
126 public:
127  RawSettings(QObject *parent = 0);
128 
129  ~RawSettings();
130 
131  QColor m_event_color_default, m_event_color_1, m_event_color_2, m_event_color_3, m_event_color_4, m_event_color_5,
132  m_event_color_32, m_event_color_998, m_event_color_999, m_data_marker_color;
133 
134  int m_mainwindow_size_w, m_mainwindow_size_h, m_mainwindow_position_x, m_mainwindow_position_y;
135 
136  //=========================================================================================================
140  void write();
141 
142 private:
143  QSettings m_qSettings;
145  //=========================================================================================================
149  void init();
150 };
151 
152 } //NAMESPACE
153 
154 #endif // RAWSETTINGS_H
Contains general application specific types.