v2.0.0
Loading...
Searching...
No Matches
filterdesignview.h
Go to the documentation of this file.
1//=============================================================================================================
25
26#ifndef FILTERDESIGNVIEW_H
27#define FILTERDESIGNVIEW_H
28
29//=============================================================================================================
30// INCLUDES
31//=============================================================================================================
32
33#include "../disp_global.h"
34#include "abstractview.h"
35
36#include <dsp/filterkernel.h>
37
38//=============================================================================================================
39// QT INCLUDES
40//=============================================================================================================
41
42#include <QPointer>
43
44//=============================================================================================================
45// EIGEN INCLUDES
46//=============================================================================================================
47
48//=============================================================================================================
49// FORWARD DECLARATIONS
50//=============================================================================================================
51
52class QCheckBox;
53
54namespace Ui
55{
56class FilterDesignViewWidget;
57}
58
59//=============================================================================================================
60// DEFINE NAMESPACE DISPLIB
61//=============================================================================================================
62
63namespace DISPLIB
64{
65
66//=============================================================================================================
67// DISPLIB FORWARD DECLARATIONS
68//=============================================================================================================
69
70class FilterPlotScene;
71
72//=============================================================================================================
83{
84 Q_OBJECT
85
86public:
87 typedef QSharedPointer<FilterDesignView> SPtr;
88 typedef QSharedPointer<const FilterDesignView> ConstSPtr;
89
90 //=========================================================================================================
100 FilterDesignView(const QString& sSettingsPath,
101 QWidget* parent = 0,
102 Qt::WindowFlags f = Qt::Widget);
103
104 //=========================================================================================================
110
111 //=========================================================================================================
117 void setMaxAllowedFilterTaps(int iMaxNumberFilterTaps);
118
119 //=========================================================================================================
125 int getFilterTaps();
126
127 //=========================================================================================================
133 void setSamplingRate(double dSamplingRate);
134
135 //=========================================================================================================
141 void setFrom(double dFrom);
142
143 //=========================================================================================================
149 void setTo(double dTo);
150
151 //=========================================================================================================
157 double getFrom();
158
159 //=========================================================================================================
165 double getTo();
166
167 //=========================================================================================================
174
175 //=========================================================================================================
181 QString getChannelType();
182
183 //=========================================================================================================
189 void setChannelType(const QString& sType);
190
191 //=========================================================================================================
195 void saveSettings();
196
197 //=========================================================================================================
201 void loadSettings();
202
203 //=========================================================================================================
207 void clearView();
208
209 //=========================================================================================================
213 void updateFilterPlot();
214
215 //=========================================================================================================
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 //=========================================================================================================
270 void resizeEvent(QResizeEvent* event);
271
272 //=========================================================================================================
278 virtual void keyPressEvent(QKeyEvent* event);
279
280 //=========================================================================================================
286 void changeStateSpinBoxes(int currentIndex);
287
288 //=========================================================================================================
293
294 //=========================================================================================================
300 void onSpinBoxFilterChannelType(const QString& channelType);
301
302 //=========================================================================================================
307
308 //=========================================================================================================
313
314 //=========================================================================================================
318 void onBtnLoadFilter();
319
320 //=========================================================================================================
327
328 Ui::FilterDesignViewWidget* m_pUi;
329
330 QPointer<FilterPlotScene> m_pFilterPlotScene;
331
333
335
337 double m_dSFreq;
338
339signals:
340 //=========================================================================================================
346 void filterChanged(const UTILSLIB::FilterKernel& activeFilter);
347
348 //=========================================================================================================
354 void filterChannelTypeChanged(const QString& channelType);
355
356 //=========================================================================================================
362 void updateFilterFrom(double dFrom);
363
364 //=========================================================================================================
370 void updateFilterTo(double dTo);
371};
372} // NAMESPACE DISPLIB
373
374#endif // FILTERDESIGNVIEW_H
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
Common base widget for every dockable Quick-Control settings panel in DISPLIB.
Linear-phase FIR filter kernel with overlap-add FFT convolution back-end.
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 updateFilterFrom(double dFrom)
void updateGuiMode(GuiMode mode)
void setSamplingRate(double dSamplingRate)
void updateFilterTo(double dTo)
QPointer< FilterPlotScene > m_pFilterPlotScene
QSharedPointer< const FilterDesignView > ConstSPtr
void resizeEvent(QResizeEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
UTILSLIB::FilterKernel m_filterKernel
void guiStyleChanged(DISPLIB::AbstractView::StyleMode style)
QSharedPointer< FilterDesignView > SPtr
UTILSLIB::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)
void updateGuiFromFilter(const UTILSLIB::FilterKernel &filter)
FilterDesignView(const QString &sSettingsPath, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void filterChanged(const UTILSLIB::FilterKernel &activeFilter)
QGraphicsScene rendering the magnitude (and optional phase) response of a designed FIR / IIR filter.
The FilterKernel class provides methods to create/design a FIR filter kernel.