MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
filterdesignview.h
Go to the documentation of this file.
1//=============================================================================================================
36#ifndef FILTERDESIGNVIEW_H
37#define FILTERDESIGNVIEW_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "../disp_global.h"
44#include "abstractview.h"
45
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QPointer>
53
54//=============================================================================================================
55// EIGEN INCLUDES
56//=============================================================================================================
57
58//=============================================================================================================
59// FORWARD DECLARATIONS
60//=============================================================================================================
61
62class QCheckBox;
63
64namespace Ui {
65 class FilterDesignViewWidget;
66}
67
68//=============================================================================================================
69// DEFINE NAMESPACE DISPLIB
70//=============================================================================================================
71
72namespace DISPLIB
73{
74
75//=============================================================================================================
76// DISPLIB FORWARD DECLARATIONS
77//=============================================================================================================
78
79class FilterPlotScene;
80
87{
88 Q_OBJECT
89
90public:
91 typedef QSharedPointer<FilterDesignView> SPtr;
92 typedef QSharedPointer<const FilterDesignView> ConstSPtr;
94 //=========================================================================================================
102 FilterDesignView(const QString& sSettingsPath,
103 QWidget *parent = 0,
104 Qt::WindowFlags f = Qt::Widget);
105
106 //=========================================================================================================
112
113 //=========================================================================================================
119 void setMaxAllowedFilterTaps(int iMaxNumberFilterTaps);
120
121 //=========================================================================================================
127 int getFilterTaps();
128
129 //=========================================================================================================
135 void setSamplingRate(double dSamplingRate);
136
137 //=========================================================================================================
143 void setFrom(double dFrom);
144
145 //=========================================================================================================
151 void setTo(double dTo);
152
153 //=========================================================================================================
159 double getFrom();
160
161 //=========================================================================================================
167 double getTo();
168
169 //=========================================================================================================
175 RTPROCESSINGLIB::FilterKernel getCurrentFilter();
176
177 //=========================================================================================================
183 QString getChannelType();
184
185 //=========================================================================================================
191 void setChannelType(const QString& sType);
192
193 //=========================================================================================================
197 void saveSettings();
198
199 //=========================================================================================================
203 void loadSettings();
204
205 //=========================================================================================================
209 void clearView();
210
211 //=========================================================================================================
215 void updateFilterPlot();
216
217 //=========================================================================================================
221 void guiStyleChanged(DISPLIB::AbstractView::StyleMode style);
222
223protected:
224 //=========================================================================================================
230 void updateGuiMode(GuiMode mode);
231
232 //=========================================================================================================
238 void updateProcessingMode(ProcessingMode mode);
239
240 //=========================================================================================================
244 void initSpinBoxes();
245
246 //=========================================================================================================
250 void initButtons();
251
252 //=========================================================================================================
256 void initComboBoxes();
257
258 //=========================================================================================================
262 void initFilterPlot();
263
264 //=========================================================================================================
268 void resizeEvent(QResizeEvent * event);
269
270 //=========================================================================================================
274 virtual void keyPressEvent(QKeyEvent * event);
275
276 //=========================================================================================================
282 void changeStateSpinBoxes(int currentIndex);
283
284 //=========================================================================================================
288 void filterParametersChanged();
289
290 //=========================================================================================================
296 void onSpinBoxFilterChannelType(const QString &channelType);
297
298 //=========================================================================================================
302 void onBtnExportFilterPlot();
303
304 //=========================================================================================================
308 void onBtnExportFilterCoefficients();
309
310 //=========================================================================================================
314 void onBtnLoadFilter();
315
316 //=========================================================================================================
322 void updateGuiFromFilter(const RTPROCESSINGLIB::FilterKernel& filter);
323
324 Ui::FilterDesignViewWidget* m_pUi;
326 QPointer<FilterPlotScene> m_pFilterPlotScene;
333 double m_dSFreq;
335signals:
336 //=========================================================================================================
343
344 //=========================================================================================================
350 void filterChannelTypeChanged(const QString& channelType);
351
352 //=========================================================================================================
358 void updateFilterFrom(double dFrom);
359
360 //=========================================================================================================
366 void updateFilterTo(double dTo);
367};
368} // NAMESPACE DISPLIB
369
370#endif // FILTERDESIGNVIEW_H
The FilterKernel class represents a filter object that generates the FIR filter coefficients using Pa...
#define DISPSHARED_EXPORT
Definition disp_global.h:55
The AbstractView class provides the base calss for all Disp viewers.
The FilterDesignView class provides the a manager for temporal filtering.
void filterChanged(const RTPROCESSINGLIB::FilterKernel &activeFilter)
void updateFilterFrom(double dFrom)
void updateFilterTo(double dTo)
QPointer< FilterPlotScene > m_pFilterPlotScene
QSharedPointer< const FilterDesignView > ConstSPtr
QSharedPointer< FilterDesignView > SPtr
Ui::FilterDesignViewWidget * m_pUi
void filterChannelTypeChanged(const QString &channelType)
RTPROCESSINGLIB::FilterKernel m_filterKernel
The FilterKernel class provides methods to create/design a FIR filter kernel.
AbstractView class declaration.