-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
132 lines (101 loc) · 2.62 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define WINDOW_MARGIN 5
#include <QMainWindow>
#include <QDebug>
#include <QWidget>
#include "TitleBar.h"
#include "PlayerWidget.h"
#include "PreviewsWidget.h"
#include "MarkersWidget.h"
#include "CompareMarkersDialog.h"
namespace Ui {
class MainWindow;
}
/*!
* @brief MainWindow of the application
*
* MainWindow of the application
*/
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
// Mouse Events
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseMove(QPoint newPos, QPoint oldPos);
TitleBar* titleBar();
protected:
PlayerWidget *_playerWidg;
PreviewsWidget *_prevWidg;
ImagesBuffer *_bmng;
MarkersWidget *_markersWidg;
CompareMarkersDialog *_dial;
TitleBar *titlebar;
void changeEvent(QEvent *e);
void resizeEvent(QResizeEvent *e);
private:
Ui::MainWindow *ui;
bool mMaxNormal;
int _currMarkerRow;
int _currMarkerCol;
QPixmap playIcon;
QPixmap pauseIcon;
QPixmap startMarkerIcon;
QPixmap endStartMarkerIcon;
// Title bar
QPoint mClickedPos;
bool mMousePressed;
bool left;
bool right;
bool bottom;
// Slider constant
int sliderPageStep;
int sliderMaxVal;
// Utility
void checkMarkersFileNotSaved();
void changeMarkersFileUI(const bool state);
void initializeIcons();
void showInfo();
public slots:
void updateSlider();
void updateFrame(QPixmap p);
void updateTime(qint64 time); //ms
void updateProgressText(QString m);
void changePlayPause(bool playState);
void endOfStream();
void jumpToFrame(const qint64 num);
void changeStartEndBtn(const bool markerStarted);
private slots:
void showAbout();
void showManual();
// Video
void on_nextFrameBtn_clicked();
void on_prevFrameBtn_clicked();
void on_seekFrameBtn_clicked();
void on_playPauseBtn_clicked();
void on_stopBtn_clicked();
// Menu
void on_actionLoad_video_triggered();
void on_actionQuit_triggered();
void on_actionCompare_triggered();
// Slider
void on_videoSlider_actionTriggered(int action);
void on_videoSlider_sliderReleased();
// Splitters
void on_splitter_splitterMoved(int pos, int index);
void on_splitter_2_splitterMoved(int pos, int index);
// Markers
void on_startMarkerBtn_clicked();
void on_endMarkerBtn_clicked();
void on_markersSaveBtn_clicked();
void on_markersLoadBtn_clicked();
void on_markersNewBtn_clicked();
void on_markersTableWidget_customContextMenuRequested(const QPoint &pos);
void on_markersTableWidget_cellChanged(int row, int column);
void on_markersTableWidget_itemSelectionChanged();
void on_infoBtn_clicked();
};
#endif // MAINWINDOW_H