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 class FilterDesignViewWidget;
56}
57
58//=============================================================================================================
59// DEFINE NAMESPACE DISPLIB
60//=============================================================================================================
61
62namespace DISPLIB
63{
64
65//=============================================================================================================
66// DISPLIB FORWARD DECLARATIONS
67//=============================================================================================================
68
69class FilterPlotScene;
70
71//=============================================================================================================
82{
83 Q_OBJECT
84
85public:
86 typedef QSharedPointer<FilterDesignView> SPtr;
87 typedef QSharedPointer<const FilterDesignView> ConstSPtr;
88
89 //=========================================================================================================
97 FilterDesignView(const QString& sSettingsPath,
98 QWidget *parent = 0,
99 Qt::WindowFlags f = Qt::Widget);
100
101 //=========================================================================================================
107
108 //=========================================================================================================
114 void setMaxAllowedFilterTaps(int iMaxNumberFilterTaps);
115
116 //=========================================================================================================
122 int getFilterTaps();
123
124 //=========================================================================================================
130 void setSamplingRate(double dSamplingRate);
131
132 //=========================================================================================================
138 void setFrom(double dFrom);
139
140 //=========================================================================================================
146 void setTo(double dTo);
147
148 //=========================================================================================================
154 double getFrom();
155
156 //=========================================================================================================
162 double getTo();
163
164 //=========================================================================================================
171
172 //=========================================================================================================
178 QString getChannelType();
179
180 //=========================================================================================================
186 void setChannelType(const QString& sType);
187
188 //=========================================================================================================
192 void saveSettings();
193
194 //=========================================================================================================
198 void loadSettings();
199
200 //=========================================================================================================
204 void clearView();
205
206 //=========================================================================================================
210 void updateFilterPlot();
211
212 //=========================================================================================================
217
218protected:
219 //=========================================================================================================
225 void updateGuiMode(GuiMode mode);
226
227 //=========================================================================================================
234
235 //=========================================================================================================
239 void initSpinBoxes();
240
241 //=========================================================================================================
245 void initButtons();
246
247 //=========================================================================================================
251 void initComboBoxes();
252
253 //=========================================================================================================
257 void initFilterPlot();
258
259 //=========================================================================================================
263 void resizeEvent(QResizeEvent * event);
264
265 //=========================================================================================================
269 virtual void keyPressEvent(QKeyEvent * event);
270
271 //=========================================================================================================
277 void changeStateSpinBoxes(int currentIndex);
278
279 //=========================================================================================================
284
285 //=========================================================================================================
291 void onSpinBoxFilterChannelType(const QString &channelType);
292
293 //=========================================================================================================
298
299 //=========================================================================================================
304
305 //=========================================================================================================
309 void onBtnLoadFilter();
310
311 //=========================================================================================================
318
319 Ui::FilterDesignViewWidget* m_pUi;
320
321 QPointer<FilterPlotScene> m_pFilterPlotScene;
322
324
326
328 double m_dSFreq;
329
330signals:
331 //=========================================================================================================
337 void filterChanged(const UTILSLIB::FilterKernel& activeFilter);
338
339 //=========================================================================================================
345 void filterChannelTypeChanged(const QString& channelType);
346
347 //=========================================================================================================
353 void updateFilterFrom(double dFrom);
354
355 //=========================================================================================================
361 void updateFilterTo(double dTo);
362};
363} // NAMESPACE DISPLIB
364
365#endif // FILTERDESIGNVIEW_H
Common base widget for every dockable Quick-Control settings panel in DISPLIB.
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
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.