MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DISPLIB::FilterDesignView Class Reference

The FilterDesignView class provides the a manager for temporal filtering. More...

#include <filterdesignview.h>

Public Types

typedef QSharedPointer< FilterDesignViewSPtr
 
typedef QSharedPointer< const FilterDesignViewConstSPtr
 
- Public Types inherited from DISPLIB::AbstractView
enum  StyleMode { Default, Dark }
 
enum  GuiMode { Clinical, Research }
 
enum  ProcessingMode { RealTime, Offline }
 
typedef QSharedPointer< AbstractViewSPtr
 
typedef QSharedPointer< const AbstractViewConstSPtr
 

Signals

void filterChanged (const RTPROCESSINGLIB::FilterKernel &activeFilter)
 
void filterChannelTypeChanged (const QString &channelType)
 
void updateFilterFrom (double dFrom)
 
void updateFilterTo (double dTo)
 
- Signals inherited from DISPLIB::AbstractView
void guiStyleChanged (DISPLIB::AbstractView::StyleMode style)
 

Public Member Functions

 FilterDesignView (const QString &sSettingsPath, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 
 ~FilterDesignView ()
 
void setMaxAllowedFilterTaps (int iMaxNumberFilterTaps)
 
int getFilterTaps ()
 
void setSamplingRate (double dSamplingRate)
 
void setFrom (double dFrom)
 
void setTo (double dTo)
 
double getFrom ()
 
double getTo ()
 
RTPROCESSINGLIB::FilterKernel getCurrentFilter ()
 
QString getChannelType ()
 
void setChannelType (const QString &sType)
 
void saveSettings ()
 
void loadSettings ()
 
void clearView ()
 
void updateFilterPlot ()
 
void guiStyleChanged (DISPLIB::AbstractView::StyleMode style)
 
- Public Member Functions inherited from DISPLIB::AbstractView
 AbstractView (QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 
virtual void setGuiMode (GuiMode mode)
 
virtual void setProcessingMode (ProcessingMode mode)
 

Protected Member Functions

void updateGuiMode (GuiMode mode)
 
void updateProcessingMode (ProcessingMode mode)
 
void initSpinBoxes ()
 
void initButtons ()
 
void initComboBoxes ()
 
void initFilterPlot ()
 
void resizeEvent (QResizeEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
void changeStateSpinBoxes (int currentIndex)
 
void filterParametersChanged ()
 
void onSpinBoxFilterChannelType (const QString &channelType)
 
void onBtnExportFilterPlot ()
 
void onBtnExportFilterCoefficients ()
 
void onBtnLoadFilter ()
 
void updateGuiFromFilter (const RTPROCESSINGLIB::FilterKernel &filter)
 

Protected Attributes

Ui::FilterDesignViewWidget * m_pUi
 
QPointer< FilterPlotScenem_pFilterPlotScene
 
RTPROCESSINGLIB::FilterKernel m_filterKernel
 
QString m_sSettingsPath
 
int m_iFilterTaps
 
double m_dSFreq
 
- Protected Attributes inherited from DISPLIB::AbstractView
bool m_bResearchModeIsActive
 
bool m_bOfflineModeIsActive
 
QString m_sSettingsPath
 

Detailed Description

The FilterDesignView class provides the a manager for temporal filtering.

DECLARE CLASS FilterDesignView

Definition at line 86 of file filterdesignview.h.

Inheritance diagram for DISPLIB::FilterDesignView:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for FilterDesignView.

Definition at line 92 of file filterdesignview.h.

◆ SPtr

Shared pointer type for FilterDesignView.

Definition at line 91 of file filterdesignview.h.

Constructor & Destructor Documentation

◆ FilterDesignView()

FilterDesignView::FilterDesignView ( const QString &  sSettingsPath,
QWidget *  parent = 0,
Qt::WindowFlags  f = Qt::Widget 
)

Constructs a FilterDesignView dialog which is a child of parent.

Parameters
[in]parentpointer to parent widget; If parent is 0, the new FilterDesignView becomes a window. If parent is another widget, FilterDesignView becomes a child window inside parent. FilterDesignView is deleted when its parent is deleted.

Definition at line 83 of file filterdesignview.cpp.

◆ ~FilterDesignView()

FilterDesignView::~FilterDesignView ( )

Destroys the FilterDesignView. All FilterDesignView's children are deleted first. The application exits if FilterDesignView is the main widget.

Definition at line 105 of file filterdesignview.cpp.

Member Function Documentation

◆ changeStateSpinBoxes()

void FilterDesignView::changeStateSpinBoxes ( int  currentIndex)
protected

This function gets called whenever the combo box is altered by the user via the gui.

Parameters
[in]currentIndexholds the current index of the combo box.

Definition at line 382 of file filterdesignview.cpp.

◆ clearView()

void FilterDesignView::clearView ( )
virtual

Clears the view

Implements DISPLIB::AbstractView.

Definition at line 555 of file filterdesignview.cpp.

◆ filterChanged

void DISPLIB::FilterDesignView::filterChanged ( const RTPROCESSINGLIB::FilterKernel activeFilter)
signal

Emitted when the filter changes.

Parameters
[in]activeFilterThe currently active filters.

◆ filterChannelTypeChanged

void DISPLIB::FilterDesignView::filterChannelTypeChanged ( const QString &  channelType)
signal

Emitted when the filter channel type changed.

Parameters
[in]channelTypeThe channel type on which the filter should be performed on.

◆ filterParametersChanged()

void FilterDesignView::filterParametersChanged ( )
protected

This function gets called whenever the filter parameters are altered by the user via the gui.

Definition at line 406 of file filterdesignview.cpp.

◆ getChannelType()

QString FilterDesignView::getChannelType ( )

Returns the current channel type which is to be filtered.

Returns
returns the channel type.

Definition at line 188 of file filterdesignview.cpp.

◆ getCurrentFilter()

FilterKernel FilterDesignView::getCurrentFilter ( )

Returns the current filter.

Returns
returns the current filter.

Definition at line 181 of file filterdesignview.cpp.

◆ getFilterTaps()

int FilterDesignView::getFilterTaps ( )

Returns the currently set number of filter taps.

Returns
returns the currently set number of filter taps.

Definition at line 129 of file filterdesignview.cpp.

◆ getFrom()

double FilterDesignView::getFrom ( )

Get filter 'From' value

Returns
filter 'From' value.

Definition at line 562 of file filterdesignview.cpp.

◆ getTo()

double FilterDesignView::getTo ( )

Get filter 'To' value

Returns
filter 'To' value.

Definition at line 569 of file filterdesignview.cpp.

◆ guiStyleChanged()

void FilterDesignView::guiStyleChanged ( DISPLIB::AbstractView::StyleMode  style)

Process the event of style mode change in an upper class.

Definition at line 588 of file filterdesignview.cpp.

◆ initButtons()

void FilterDesignView::initButtons ( )
protected

inits all buttons.

Definition at line 296 of file filterdesignview.cpp.

◆ initComboBoxes()

void FilterDesignView::initComboBoxes ( )
protected

inits the QComboBoxes.

Definition at line 310 of file filterdesignview.cpp.

◆ initFilterPlot()

void FilterDesignView::initFilterPlot ( )
protected

inits the filter plot.

Definition at line 335 of file filterdesignview.cpp.

◆ initSpinBoxes()

void FilterDesignView::initSpinBoxes ( )
protected

inits all spin boxes.

Definition at line 274 of file filterdesignview.cpp.

◆ keyPressEvent()

void FilterDesignView::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

keyPressEvent reimplemented virtual function to handle key events

Definition at line 356 of file filterdesignview.cpp.

◆ loadSettings()

void FilterDesignView::loadSettings ( )
virtual

Loads and inits all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 222 of file filterdesignview.cpp.

◆ onBtnExportFilterCoefficients()

void FilterDesignView::onBtnExportFilterCoefficients ( )
protected

This function exports the filter coefficients to a txt file.

Definition at line 507 of file filterdesignview.cpp.

◆ onBtnExportFilterPlot()

void FilterDesignView::onBtnExportFilterPlot ( )
protected

Saves an svg graphic of the scene if wanted by the user.

Definition at line 470 of file filterdesignview.cpp.

◆ onBtnLoadFilter()

void FilterDesignView::onBtnLoadFilter ( )
protected

This function loads a filter from a txt file.

Definition at line 528 of file filterdesignview.cpp.

◆ onSpinBoxFilterChannelType()

void FilterDesignView::onSpinBoxFilterChannelType ( const QString &  channelType)
protected

This function applies the user defined filter to all channels.

Parameters
[in]channelTypeholds the current text of the connected spin box.

Definition at line 463 of file filterdesignview.cpp.

◆ resizeEvent()

void FilterDesignView::resizeEvent ( QResizeEvent *  event)
protected

resizeEvent reimplemented virtual function to handle resize events of the filter window

Definition at line 348 of file filterdesignview.cpp.

◆ saveSettings()

void FilterDesignView::saveSettings ( )
virtual

Saves all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 203 of file filterdesignview.cpp.

◆ setChannelType()

void FilterDesignView::setChannelType ( const QString &  sType)

Sets the current channel type which is to be filtered.

Parameters
[in]sTypeThe new channel type to be filtered.

Definition at line 195 of file filterdesignview.cpp.

◆ setFrom()

void FilterDesignView::setFrom ( double  dFrom)

Sets filter 'From' value

Parameters
[in]dFromset filter 'From' value.

Definition at line 165 of file filterdesignview.cpp.

◆ setMaxAllowedFilterTaps()

void FilterDesignView::setMaxAllowedFilterTaps ( int  iMaxNumberFilterTaps)

Sets the max number of allowed filter taps.

Parameters
[in]iMaxNumberFilterTapsnumber of max allowed filter taps.

Definition at line 114 of file filterdesignview.cpp.

◆ setSamplingRate()

void FilterDesignView::setSamplingRate ( double  dSamplingRate)

Sets the new samplingRate.

Parameters
[in]dSamplingRatethe new sampling rate.

Definition at line 136 of file filterdesignview.cpp.

◆ setTo()

void FilterDesignView::setTo ( double  dTo)

Sets filter 'To' value

Parameters
[in]dToset filter 'To' value.

Definition at line 173 of file filterdesignview.cpp.

◆ updateFilterFrom

void DISPLIB::FilterDesignView::updateFilterFrom ( double  dFrom)
signal

Update to simple filter control 'From'

Parameters
[in]dFromchange in filter 'From' value.

◆ updateFilterPlot()

void FilterDesignView::updateFilterPlot ( )

updates the filter plot scene with the newly generated filter

Definition at line 369 of file filterdesignview.cpp.

◆ updateFilterTo

void DISPLIB::FilterDesignView::updateFilterTo ( double  dTo)
signal

Update to simple filter control 'To'

Parameters
[in]dTochange in filter 'To' value.

◆ updateGuiFromFilter()

void FilterDesignView::updateGuiFromFilter ( const RTPROCESSINGLIB::FilterKernel filter)
protected

Update Gui and filter based on an input filter parameters

Parameters
[in]filterfilter which parameters will be used to update gui and stored filter.

Definition at line 576 of file filterdesignview.cpp.

◆ updateGuiMode()

void FilterDesignView::updateGuiMode ( GuiMode  mode)
protectedvirtual

Update the views GUI based on the set GuiMode (Clinical=0, Research=1).

Parameters
[in]modeThe new mode (Clinical=0, Research=1).

Implements DISPLIB::AbstractView.

Definition at line 250 of file filterdesignview.cpp.

◆ updateProcessingMode()

void FilterDesignView::updateProcessingMode ( ProcessingMode  mode)
protectedvirtual

Update the views GUI based on the set ProcessingMode (RealTime=0, Offline=1).

Parameters
[in]modeThe new mode (RealTime=0, Offline=1).

Implements DISPLIB::AbstractView.

Definition at line 262 of file filterdesignview.cpp.

Member Data Documentation

◆ m_dSFreq

double DISPLIB::FilterDesignView::m_dSFreq
protected

The current sampling frequency.

Definition at line 333 of file filterdesignview.h.

◆ m_filterKernel

RTPROCESSINGLIB::FilterKernel DISPLIB::FilterDesignView::m_filterKernel
protected

The current filter operator.

Definition at line 328 of file filterdesignview.h.

◆ m_iFilterTaps

int DISPLIB::FilterDesignView::m_iFilterTaps
protected

The current number of filter taps.

Definition at line 332 of file filterdesignview.h.

◆ m_pFilterPlotScene

QPointer<FilterPlotScene> DISPLIB::FilterDesignView::m_pFilterPlotScene
protected

Pointer to the QGraphicsScene which holds the filter plotting.

Definition at line 326 of file filterdesignview.h.

◆ m_pUi

Ui::FilterDesignViewWidget* DISPLIB::FilterDesignView::m_pUi
protected

Pointer to the qt designer generated ui class.

Definition at line 324 of file filterdesignview.h.

◆ m_sSettingsPath

QString DISPLIB::FilterDesignView::m_sSettingsPath
protected

The settings path to store the GUI settings to.

Definition at line 330 of file filterdesignview.h.


The documentation for this class was generated from the following files: