VidMag
Eulerian Video Magnification
vidmag.h
Go to the documentation of this file.
1 #ifndef VIDMAG_H
2 #define VIDMAG_H
3 
4 #include <QtWidgets/QMainWindow>
5 #include "ui_vidmag.h"
6 #include <QFileDialog>
7 #include <QMessageBox>
8 #include <VideoPlayer.h>
9 #include <QTime>
10 #include <VideoManager.hpp>
11 #include <qmenu.h>
12 
13 namespace Ui {
14  class Ui_VidMagClass;
15 }
16 class VidMag : public QMainWindow
17 {
18  Q_OBJECT
19 
20 public:
21  explicit VidMag(QWidget *parent = 0);
22  ~VidMag();
23 
24  private slots:
25  void updatePlayerUI(QImage img); //slot that the video frame signal connects to; displays the video frame in the UI
26 
27  //slots for the interaction with the UI elements
28  void on_button_load_clicked();
29 
30  void on_button_play_clicked();
31 
32  void on_slider_video_sliderPressed();
33  void on_slider_video_sliderReleased();
34  void on_slider_video_sliderMoved(int position);
35 
36  void on_button_process_clicked();
37 
38  void on_button_mask_clicked();
39 
40  void on_button_delete_mask_clicked();
41 
42  void on_button_presets_load_clicked();
43 private:
44  //UI, Player and Manager instances
45  Ui_VidMagClass *ui;
46  VideoPlayer* vidPlr;
47  VideoManager* vidMgr;
48 
49  QString getFormattedTime(int timeInSeconds); //formats secs to (h:)mm:ss
50  bool validateLineEdit(QLineEdit* lineEdit, bool format); //validates line edit text
51 
52  //handlers for mouse events; used for masking
53  void mousePressEvent(QMouseEvent *e);
54  void mouseMoveEvent(QMouseEvent *e);
55  void mouseReleaseEvent(QMouseEvent *e);
56 
57  //transformations to video frame
58  QPoint pointToPixmap(QPoint point);
59  QPoint pixmapTl();
60 
61  //masking values
62  bool selectionStarted;
63  QRect selectionRect;
64  bool masking;
65  QRect pixmap_rect;
66  QRubberBand* selection;
67 };
68 
69 #endif // VIDMAG_H
Definition: vidmag.h:16
Definition: vidmag.h:13
Definition: VideoManager.hpp:41
Definition: VideoPlayer.h:13