22 #include <QMainWindow> 26 #include <QNetworkAccessManager> 27 #include <QScopedPointer> 28 #include <QSharedPointer> 29 #include "mltcontroller.h" 30 #include "mltxmlchecker.h" 32 #define EXIT_RESTART (42) 43 class MeltedPlaylistDock;
44 class MeltedServerDock;
46 class FilterController;
47 class ScopeController;
54 class MainWindow :
public QMainWindow
59 static MainWindow& singleton();
61 void open(Mlt::Producer* producer);
62 bool continueModified();
63 bool continueJobsRunning();
64 QUndoStack* undoStack()
const;
65 void saveXML(
const QString& filename,
bool withRelativePaths =
true);
66 static void changeTheme(
const QString& theme);
67 PlaylistDock* playlistDock()
const {
return m_playlistDock; }
68 FilterController* filterController()
const {
return m_filterController; }
69 HtmlEditor* htmlEditor()
const {
return m_htmlEditor.data(); }
70 Mlt::Playlist* playlist()
const;
71 Mlt::Producer* multitrack()
const;
72 bool isMultitrackValid()
const;
74 void setFullScreen(
bool isFullScreen);
75 QString removeFileScheme(QUrl& url);
76 QString untitledFileName()
const;
77 QString getFileHash(
const QString& path)
const;
78 QString getHash(Mlt::Properties& properties)
const;
79 void setProfile(
const QString& profile_name);
80 QString fileName()
const {
return m_currentFile; }
82 void keyPressEvent(QKeyEvent*);
83 void keyReleaseEvent(QKeyEvent *);
84 void hideSetDataDirectory();
87 void producerOpened();
88 void profileChanged();
89 void openFailed(QString);
90 void aboutToShutDown();
94 bool eventFilter(QObject* target, QEvent* event);
95 void dragEnterEvent(QDragEnterEvent*);
96 void dropEvent(QDropEvent*);
97 void closeEvent(QCloseEvent*);
98 void showEvent(QShowEvent*);
101 void setupSettingsMenu();
102 QAction *addProfile(QActionGroup* actionGroup,
const QString& desc,
const QString& name);
103 void readPlayerSettings();
104 void readWindowSettings();
105 void writeSettings();
106 void configureVideoWidget();
107 void setCurrentFile(
const QString &filename);
108 void changeDeinterlacer(
bool checked,
const char* method);
109 void changeInterpolation(
bool checked,
const char* method);
110 bool checkAutoSave(QString &url);
111 void stepLeftBySeconds(
int sec);
112 bool saveRepairedXmlFile(MltXmlChecker& checker, QString& fileName);
116 QDockWidget* m_propertiesDock;
117 RecentDock* m_recentDock;
118 EncodeDock* m_encodeDock;
119 JobsDock* m_jobsDock;
120 PlaylistDock* m_playlistDock;
121 TimelineDock* m_timelineDock;
122 QString m_currentFile;
123 bool m_isKKeyPressed;
124 QUndoStack* m_undoStack;
125 QDockWidget* m_historyDock;
126 MeltedServerDock* m_meltedServerDock;
127 MeltedPlaylistDock* m_meltedPlaylistDock;
128 QActionGroup* m_profileGroup;
129 QActionGroup* m_externalGroup;
130 QActionGroup* m_keyerGroup;
131 FiltersDock* m_filtersDock;
132 FilterController* m_filterController;
133 ScopeController* m_scopeController;
134 QMenu* m_customProfileMenu;
136 QStringList m_multipleFiles;
137 bool m_isPlaylistLoaded;
138 QActionGroup* m_languagesGroup;
139 QScopedPointer<HtmlEditor> m_htmlEditor;
140 QSharedPointer<AutoSaveFile> m_autosaveFile;
141 QMutex m_autosaveMutex;
142 QTimer m_autosaveTimer;
144 int m_navigationPosition;
145 QScopedPointer<QAction> m_statusBarAction;
146 QNetworkAccessManager m_network;
147 QString m_upgradeUrl;
150 LeapListener m_leapListener;
154 bool isCompatibleWithGpuMode(MltXmlChecker& checker);
155 bool isXmlRepaired(MltXmlChecker& checker, QString& fileName);
156 void updateAutoSave();
157 void open(QString url,
const Mlt::Properties* = 0);
159 void openCut(Mlt::Producer* producer);
161 void closeProducer();
162 void showStatusMessage(QAction* action,
int timeoutSeconds = 5);
163 void showStatusMessage(
const QString& message,
int timeoutSeconds = 5);
164 void seekPlaylist(
int start);
165 void seekTimeline(
int position);
166 QWidget* loadProducerWidget(Mlt::Producer* producer);
167 void onProducerOpened();
168 void onGpuNotSupported();
169 void editHTML(
const QString& fileName);
170 void stepLeftOneFrame();
171 void stepRightOneFrame();
172 void stepLeftOneSecond();
173 void stepRightOneSecond();
174 void setInToCurrent(
bool ripple);
175 void setOutToCurrent(
bool ripple);
176 void onShuttle(
float x);
179 void showUpgradePrompt();
180 void on_actionAbout_Shotcut_triggered();
181 void on_actionOpenOther_triggered();
182 void onProducerChanged();
183 bool on_actionSave_triggered();
184 bool on_actionSave_As_triggered();
185 void onEncodeTriggered(
bool checked =
true);
186 void onCaptureStateChanged(
bool started);
187 void onJobsDockTriggered(
bool);
188 void onRecentDockTriggered(
bool checked =
true);
189 void onPropertiesDockTriggered(
bool checked =
true);
190 void onPlaylistDockTriggered(
bool checked =
true);
191 void onTimelineDockTriggered(
bool checked =
true);
192 void onHistoryDockTriggered(
bool checked =
true);
193 void onFiltersDockTriggered(
bool checked =
true);
194 void onPlaylistCreated();
195 void onPlaylistLoaded();
196 void onPlaylistCleared();
197 void onPlaylistClosed();
198 void onPlaylistModified();
199 void onMultitrackCreated();
200 void onMultitrackClosed();
201 void onMultitrackModified();
202 void onMultitrackDurationChanged();
203 void onCutModified();
204 void onFilterModelChanged();
205 void updateMarkers();
206 void updateThumbnails();
207 void on_actionUndo_triggered();
208 void on_actionRedo_triggered();
209 void on_actionFAQ_triggered();
210 void on_actionForum_triggered();
211 void onMeltedUnitOpened();
212 void onMeltedUnitActivated();
213 void on_actionEnter_Full_Screen_triggered();
214 void on_actionRealtime_triggered(
bool checked);
215 void on_actionProgressive_triggered(
bool checked);
216 void on_actionOneField_triggered(
bool checked);
217 void on_actionLinearBlend_triggered(
bool checked);
218 void on_actionYadifTemporal_triggered(
bool checked);
219 void on_actionYadifSpatial_triggered(
bool checked);
220 void on_actionNearest_triggered(
bool checked);
221 void on_actionBilinear_triggered(
bool checked);
222 void on_actionBicubic_triggered(
bool checked);
223 void on_actionHyper_triggered(
bool checked);
224 void on_actionJack_triggered(
bool checked);
225 void on_actionGPU_triggered(
bool checked);
226 void onExternalTriggered(QAction*);
227 void onKeyerTriggered(QAction*);
228 void onProfileTriggered(QAction*);
229 void onProfileChanged();
230 void on_actionAddCustomProfile_triggered();
231 void processMultipleFiles();
232 void onLanguageTriggered(QAction*);
233 void on_actionSystemTheme_triggered();
234 void on_actionFusionDark_triggered();
235 void on_actionFusionLight_triggered();
236 void on_actionTutorials_triggered();
237 void on_actionRestoreLayout_triggered();
238 void on_actionShowTitleBars_triggered(
bool checked);
239 void on_actionShowToolbar_triggered(
bool checked);
240 void onToolbarVisibilityChanged(
bool visible);
241 void on_menuExternal_aboutToShow();
242 void on_actionUpgrade_triggered();
243 void on_actionOpenXML_triggered();
244 void onAutosaveTimeout();
245 void on_actionGammaSRGB_triggered(
bool checked);
246 void on_actionGammaRec709_triggered(
bool checked);
247 void onFocusChanged(QWidget *old, QWidget * now)
const;
248 void onFocusObjectChanged(QObject *obj)
const;
249 void onFocusWindowChanged(QWindow *window)
const;
250 void onTimelineClipSelected();
251 void onAddAllToTimeline(Mlt::Playlist* playlist);
252 void on_actionScrubAudio_triggered(
bool checked);
254 void onDrawingMethodTriggered(QAction*);
256 void on_actionApplicationLog_triggered();
257 void on_actionClose_triggered();
258 void onPlayerTabIndexChanged(
int index);
259 void onUpgradeCheckFinished(QNetworkReply* reply);
260 void onUpgradeTriggered();
261 void onTimelineSelectionChanged();
262 void on_actionCut_triggered();
263 void on_actionCopy_triggered();
264 void on_actionPaste_triggered();
266 void on_actionExportEDL_triggered();
267 void on_actionExportFrame_triggered();
268 void onGLWidgetImageReady();
269 void on_actionAppDataSet_triggered();
270 void on_actionAppDataShow_triggered();
271 void on_actionNew_triggered();
274 #define MAIN MainWindow::singleton() 276 #endif // MAINWINDOW_H Definition: addencodepresetdialog.h:24