BioSignalPi  v2
plottingwidget.h
Go to the documentation of this file.
1 /*
2  * plottingwidget.h
3  *
4  * Created on: Nov 2, 2015
5  * Author: martin
6  */
7 
8 #ifndef PLOTTINGWIDGET_H_
9 #define PLOTTINGWIDGET_H_
10 
11 #include <QWidget>
12 #include <QListWidget>
13 
14 
15 
16 class Plot;
17 class QLabel;
18 class QProgressBar;
19 class SliderWidget;
20 class QComboBox;
21 class QPushButton;
22 class QTextEdit;
30 class PlottingWidget : public QWidget
31 {
32  Q_OBJECT
33 
34 public:
35  PlottingWidget(QWidget * = NULL);
36 
37 protected:
45  void wheelEvent( QWheelEvent * event );
46 
47 private:
51  void setupComponents();
55  void setupActions();
59  void setupLayout();
60 
61  QListWidget *ecgFilesWidget;
62  //Plot *d_plot;
63  QVector<Plot *> d_plots;
64  QVector<QVector<QPointF> > ecgVals;
65  QLabel *tlbl;
66  QProgressBar *progBar;
67  SliderWidget *startingPointSlider;
68  QComboBox *timeframeComboBox;
69  QTimer *playTimer;
70 
71  int recordingTime;
72  int nFrames;
73  int currentFrame;
74 
75  QAction *playAction;
76  QAction *pauseAction;
77  QAction *nextAction;
78  QAction *prevAction;
79 
80  QPushButton *getFilesButton;
81  QPushButton *resetPlotButton;
82  QTextEdit *headerTextArea;
83 
84 private slots:
88  void prev();
92  void play();
96  void pause();
100  void next();
105  void getEcgFileList();
109  void fileSelected(QListWidgetItem*);
113  void plotVector();
118  void initEcg(QVector<QVector<QPointF> > fileData);
122  void clearPlot();
126  void updatePlot(int);
130  void windowSizeChanged(int);
131 };
132 
133 
134 
135 #endif /* PLOTTINGWIDGET_H_ */
PlottingWidget(QWidget *=NULL)
void wheelEvent(QWheelEvent *event)
Handles the events triggered by moving the scroll button Catches the event when the mouse is in the w...
Extension of QwtPlot used for plotting data.
Definition: plot.h:14
Class used by PlottingWidget to enable a slider for the different signals plotted.
Definition: sliderwidget.h:14
Widget that can read ECG information from file and plots the data.