-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
147 lines (131 loc) · 3.64 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QBasicTimer>
#include <QProcess>
#include "cxprogressdlg.h"
#include "cxgraphicsview.h"
#include "cxgraphicsscene.h"
#include "cxmarkpanel.h"
#include "ui_mainwindow.h"
#include <QMediaPlayer>
#include "cxtextpopupdlg.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void onClose() ;
void onScreenClicked() ;
void onAddText() ;
void onPaint( int role ) ;
void onAddTextItem(int) ;
void onAddImage() ;
void onShowLogoWidget() ;
void onAddLogo() ;
void onAddLogo(QListWidgetItem* item) ;
void onAddTopLeftLogo() ;
void onAddTopRightLogo() ;
void onAddBottomLeftLogo() ;
void onAddBottomRightLogo() ;
void onFade() ;
void onMark() ;
void onAddVideo() ;
void onAddContentScene() ;
void onCurrentItemChanged(CxLayerItem* item) ;
void onMaximize() ;
void onPreview() ;
void onRecord() ;
void onRangePreview( int msec ) ;
void onThemeChanged( int ) ;
void onVideoCurTimeChanged(int) ;// milisec
void onGraphicsItemAdded(CxGraphicsItem* item) ;
void onAudioStateChanged(QMediaPlayer::State state) ;
void onExpandTrimmer(bool on) ;
void onItemModeChanged( int id ) ;
void onCxItemSelectionChanged() ;
void onDeleteCxItem() ;
void onRemoveAllItems() ;
void copyToGlobal() ;
void onProcessStandardOutput() ;
void onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) ;
void onChangeSceneColor() ;
void onCreateNewVideo() ;
void onEditVideo() ;
void onFreezeVideo() ;
void onCreateSingleImageVideo() ;
void onSingleVideoAudioSelect() ;
void onSingleVideoImageSelect() ;
void onSingleVideoMp4Select() ;
void onSingleVideoCreate() ;
void onHideCategory() ;
void onShowCategory() ;
void onAddIntroVideo() ;
void onRemoveIntroVideo() ;
void onInsertIntroItem(QListWidgetItem* item) ;
void onLogoSave() ;
void onShowEditVideoWidget() ;
protected:
void showEvent(QShowEvent *event) ;
void resizeEvent(QResizeEvent* event) ;
void mousePressEvent(QMouseEvent* event) ;
void mouseMoveEvent(QMouseEvent* event) ;
void mouseReleaseEvent(QMouseEvent *event) ;
void mouseDoubleClickEvent(QMouseEvent *event) ;
void timerEvent(QTimerEvent* event) ;
void closeEvent(QCloseEvent* event) ;
private:
void initUI() ;
void initVar() ;
void initConnection() ;
void finalizeRecording() ;
void cancelRecording() ;
void stopPlayingAudio() ;
void startPlaying( bool on ) ;
void maximize() ;
void normalize() ;
void saveCurrentPosition() ;
void refitTrimmerRect() ;
void setVisibleItemMode( bool on, int id = -1 ) ;
void setButtonTransparent( QToolButton* btn ) ;
void createSceneConnection( CxGraphicsScene* sc ) ;
void addLogo( int dir ) ;
void releaseRecordinig() ;
Ui::MainWindow *ui;
CxMarkPanel* m_markPanel ;
QRect m_oriRect;
QPoint m_oriPnt ;
bool m_isPressing ;
QString m_tmpRecordingPath ;
QString m_savePath ;
QBasicTimer m_timer ;
QTime m_playStartTime ;
CxLayer* m_sceneList ;
CxGraphicsView* m_view ;
CxVideoPanel* m_videoPanel ;
CxItemLayer* m_itemList ;
CxTrimmerPanel* m_trimmer ;
VideoWriter m_recorder ;
int m_state ;
QMediaPlayer* m_audioTrack ;
QTime m_sceneStartTime ;
QProcess* m_process ;
bool m_isMaximized ;
QPoint lastGlobalPosition ;
QSize lastSize ;
int m_addAudioDuration ;
QString m_addAudioFileName ;
QString m_singleVideoAudioPath, m_singleVideoImagePath, m_singleVideoMp4Path ;
CxCustomButton* m_fullScreenBtn ;
CxCustomButton* m_showCategoryBtn ;
CxCustomButton* m_playBtn ;
CxProgressDlg* m_progressBar ;
QLabel* m_lockScreen ;
int m_tmp ;
};
#endif // MAINWINDOW_H