-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.h
101 lines (90 loc) · 2.68 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
/*
* File: MainWindow.h
* Author: rukshan
*
* Created on August 29, 2013, 1:08 PM
*/
#ifndef _MAINWINDOW_H
#define _MAINWINDOW_H
#include "ui_MainWindow.h"
#include "subtitleSave.h"
#include "Observable.h"
#include "player.h"
#include "header/tgs.h"
#include <vector>
#include <srtFormat.h>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QThread>
#include "qcustomplot.h"
#include "header/MyItem.h"
#include "header/SubtitleRead.h"
#include "header/PlaySubtitle.h"
#include <QQueue>
class MainWindow : public QMainWindow, public Observable {
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
private:
Ui::MainWindow widget;
void paintEvent(QPaintEvent*);
void drawRuler();
void drawGraph();
// void addToGraph();
private slots:
void updateInterface();
void on_horizontalScrollBar_sliderMoved(int position);
void on_srt_clicked();
void on_play_clicked();
void on_pauseBtn_clicked();
void on_mute_clicked();
void on_stop_clicked();
void on_volumeSlider_sliderMoved(int position);
void on_graphicViewSlider_sliderMoved(int position);
void on_subTimeStartCmd_clicked();
void on_subTimeStopCmd_clicked();
void on_add_row_after_clicked();
void on_add_row_before_clicked();
void on_remove_row_clicked();
void on_clearTable_clicked();
void on_actionSave_As_2_triggered();
void on_actionSubtitle_file_triggered();
void on_actionMedia_file_triggered();
void on_tableWidget_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
void on_textEdit_textChanged();
void timesChanged(QTime t);
public slots:
void setTable();
public:
void addToQueue(int a, int b);
void update();
void setSubtitleSave(subtitleSave *s);
Ui::MainWindow getGraphicView();
void setPlayer(player *p);
TGS* getTgs();
TGS* getTimeCursorTgs();
void setSampleList(short int *s, int frame, int rate/*QQueue<int> L, QQueue<int> R*/);
void setSubtitle(vector<srtFormat> vv);
void setPlayBtnText(string msg);
int getVolumeLevel();
void setVolumeLevel(int val);
void addToGraph();
void plotGraph();
vector<srtFormat> getCurrentSubData();
MyItem* getMyItem();
void changeTime(int n);
void addRow(bool isUp);
void removeRow();
void ffmpegGraphPlot(QQueue<int> LL, QQueue<int> RR);
void increaseSubTime(int i);
void decreaseSubTime(int i);
void setSubReader(SubtitleRead *read);
void selectRow(int i);
PlaySubtitle* getPLaySubtitle();
protected:
void dragEnterEvent(QDragEnterEvent *e);
void dropEvent(QDropEvent *e);
void run();
};
#endif /* _MAINWINDOW_H */