-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_window.h
159 lines (105 loc) · 3.4 KB
/
main_window.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
148
149
150
151
152
153
154
155
156
157
158
159
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <ui_main_window.h>
#include <vector>
class SettingsManager;
class VapourSynthPluginsManager;
class VSScriptLibrary;
class PreviewDialog;
class SettingsDialog;
class ScriptBenchmarkDialog;
class EncodeDialog;
class TemplatesDialog;
class JobServerWatcherSocket;
class QTimer;
class LocalSocketIpcClient;
class LocalSocketIpcServer;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
virtual ~MainWindow();
void show();
public slots:
void slotWriteLogMessage(int a_messageType, const QString & a_message);
void slotWriteLogMessage(const QString & a_message,
const QString & a_style = LOG_STYLE_DEFAULT);
void slotInsertTextIntoScriptAtNewLine(const QString & a_text);
void slotInsertTextIntoScriptAtCursor(const QString & a_text);
protected:
void closeEvent(QCloseEvent * a_pEvent) override;
void moveEvent(QMoveEvent * a_pEvent) override;
void resizeEvent(QResizeEvent * a_pEvent) override;
void changeEvent(QEvent * a_pEvent) override;
private slots:
void slotNewScript();
bool slotSaveScript();
bool slotSaveScriptAs();
bool slotOpenScript();
void slotTemplates();
void slotPreview();
void slotCheckScript();
void slotBenchmark();
void slotEncode();
void slotEnqueueEncodeJob();
void slotJobs();
void slotAbout();
void slotChangeWindowTitle();
void slotEditorTextChanged();
void slotOpenRecentScriptActionTriggered();
void slotSettingsChanged();
void slotScriptFileDropped(const QString & a_filePath, bool * a_pHandled);
void slotSaveGeometry();
void ipcCallMethod(const QString& typ, const QString& value, const QString &optionString);
void ipcMessageReceived(const QString& message);
private:
void createActionsAndMenus();
void fillRecentScriptsMenu();
bool saveScriptToFile(const QString& a_filePath);
bool loadScriptFromFile(const QString& a_filePath);
bool safeToCloseFile();
void setCurrentScriptFilePath(const QString & a_filePath);
void loadStartUpScript();
void loadFonts();
void destroyOrphanQObjects();
void saveGeometryDelayed();
void reloadTexts();
bool hybridCustom(const QStringList& arguments);
bool checkHybridScript();
Ui::MainWindow m_ui;
SettingsManager * m_pSettingsManager;
VapourSynthPluginsManager * m_pVapourSynthPluginsManager;
VSScriptLibrary * m_pVSScriptLibrary;
QAction * m_pActionNewScript;
QAction * m_pActionOpenScript;
QAction * m_pActionSaveScript;
QAction * m_pActionSaveScriptAs;
QAction * m_pActionTemplates;
QAction * m_pActionSettings;
QAction * m_pActionPreview;
QAction * m_pActionCheckScript;
QAction * m_pActionBenchmark;
QAction * m_pActionEncode;
QAction * m_pActionEnqueueEncodeJob;
QAction * m_pActionJobs;
QAction * m_pActionExit;
QAction * m_pActionAbout;
std::vector<QAction *> m_settableActionsList;
QMenu * m_pMenuRecentScripts;
PreviewDialog * m_pPreviewDialog;
SettingsDialog * m_pSettingsDialog;
ScriptBenchmarkDialog * m_pBenchmarkDialog;
EncodeDialog * m_pEncodeDialog;
TemplatesDialog * m_pTemplatesDialog;
QString m_scriptFilePath;
QString m_lastSavedText;
std::vector<QObject **> m_orphanQObjects;
JobServerWatcherSocket * m_pJobServerWatcherSocket;
QTimer * m_pGeometrySaveTimer;
QByteArray m_windowGeometry;
LocalSocketIpcClient* m_ipcClient;
LocalSocketIpcServer* m_ipcServer;
bool m_hideMainWindow;
};
#endif // MAINWINDOW_H