v2.0.0
Loading...
Searching...
No Matches
filterdesignview.h
Go to the documentation of this file.
1//=============================================================================================================
35
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;
93
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 //=========================================================================================================
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 //=========================================================================================================
222
223protected:
224 //=========================================================================================================
230 void updateGuiMode(GuiMode mode);
231
232 //=========================================================================================================
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 //=========================================================================================================
289
290 //=========================================================================================================
296 void onSpinBoxFilterChannelType(const QString &channelType);
297
298 //=========================================================================================================
303
304 //=========================================================================================================
309
310 //=========================================================================================================
314 void onBtnLoadFilter();
315
316 //=========================================================================================================
323
324 Ui::FilterDesignViewWidget* m_pUi;
325
326 QPointer<FilterPlotScene> m_pFilterPlotScene;
327
329
331
333 double m_dSFreq;
334
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...
Declaration of the AbstractView Class.
disp library export/import macros.
#define DISPSHARED_EXPORT
Definition disp_global.h:51
2-D display widgets and visualisation helpers (charts, topography, colour maps).
AbstractView(QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void setMaxAllowedFilterTaps(int iMaxNumberFilterTaps)
void changeStateSpinBoxes(int currentIndex)
void filterChanged(const RTPROCESSINGLIB::FilterKernel &activeFilter)
void updateFilterFrom(double dFrom)
void updateGuiMode(GuiMode mode)
void setSamplingRate(double dSamplingRate)
void updateFilterTo(double dTo)
QPointer< FilterPlotScene > m_pFilterPlotScene
QSharedPointer< const FilterDesignView > ConstSPtr
void updateGuiFromFilter(const RTPROCESSINGLIB::FilterKernel &filter)
void resizeEvent(QResizeEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
void guiStyleChanged(DISPLIB::AbstractView::StyleMode style)
QSharedPointer< FilterDesignView > SPtr
RTPROCESSINGLIB::FilterKernel getCurrentFilter()
void setChannelType(const QString &sType)
Ui::FilterDesignViewWidget * m_pUi
void updateProcessingMode(ProcessingMode mode)
void onSpinBoxFilterChannelType(const QString &channelType)
void filterChannelTypeChanged(const QString &channelType)
RTPROCESSINGLIB::FilterKernel m_filterKernel
FilterDesignView(const QString &sSettingsPath, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
The FilterPlotScene class provides the scene where a filter response can be plotted.
The FilterKernel class provides methods to create/design a FIR filter kernel.