BioSignalPi  v2
hrvwidget.h
Go to the documentation of this file.
1 /*
2  * hrvwidget.h
3  *
4  * Created on: Nov 2, 2015
5  * Author: martin
6  */
7 
8 #ifndef HRVWidget_H_
9 #define HRVWidget_H_
10 
11 #include <QWidget>
12 #include <QListWidget>
13 
14 #include <qwt_plot_curve.h>
15 #include <qwt_plot.h>
16 
17 #include "hrvanalysis.h"
18 #include "HRV/rtwtypes.h"
19 #include "HRV/timeDomainHRV.h"
20 #include "HRV/rt_nonfinite.h"
21 #include "HRV/timeDomainHRV_types.h"
22 #include "HRV/freqDomainHRV_types.h"
23 
24 class Plot;
25 class QLabel;
26 class QProgressBar;
27 class SliderWidget;
28 class QComboBox;
29 class QPushButton;
30 class QTextBrowser;
31 
32 
33 
48 class HrvWidget : public QWidget
49 {
50  Q_OBJECT
51 
52 public:
53  HrvWidget(QWidget * = NULL);
54 
55 
56 private:
57  void setupComponents();
58  void setupActions();
59  void setupLayout();
60 
66  void performHRV(QString fileName);
67  void printHRV(const struct0_T *);
68  void printHRV(const structFreq_T *);
69  void psdPlot(const structFreq_T *);
70  void saveFreqHrv(const structFreq_T *);
71 
72  QListWidget *ecgFilesWidget;
73 
74  QVector<Plot *> d_plots;
75  QVector<QVector<QPointF> > ecgVals;
76  QLabel *tlbl;
77  QProgressBar *progBar;
78  SliderWidget *startingPointSlider;
79  QComboBox *timeframeComboBox;
80  QTimer *playTimer;
81 
82  int recordingTime;
83  int nFrames;
84  int currentFrame;
85  double freq[102], psd[102];
86 
87  QPushButton *getFilesButton;
88  QPushButton *resetPlotButton;
89  QTextBrowser *headerTextArea;
90 
91  QTextBrowser *mainTextArea;
92  QwtPlot *lombPlot;
93  QwtPlotCurve *myCurve;
94 
95 
96 
97 private slots:
98  void fileFinished();
102  void getEcgFileList();
108  void fileSelected(QListWidgetItem*);
109  void clearPlot();
118  void performHRV(QVector<double> ibiData, QVector<double> timeData);
119 
120 
121 };
122 
123 
124 
125 #endif /* HRVWidget_H_ */
Extension of QwtPlot used for plotting data.
Definition: plot.h:14
Collection of functions used to interact with the Matlab Coder generated HRV-functions.
Widget responsible for the graphical interface of the HRV Analysis.
Definition: hrvwidget.h:48
HrvWidget(QWidget *=NULL)
Definition: hrvwidget.cpp:22
Class used by PlottingWidget to enable a slider for the different signals plotted.
Definition: sliderwidget.h:14