File indexing completed on 2022-10-04 15:37:24

0001 /*
0002     SPDX-FileCopyrightText: 2007 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003 
0004 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QComboBox>
0010 #ifndef NODBUS
0011 #include <QDBusAbstractAdaptor>
0012 #endif
0013 #include <QDockWidget>
0014 #include <QEvent>
0015 #include <QImage>
0016 #include <QMap>
0017 #include <QShortcut>
0018 #include <QString>
0019 #include <QUndoView>
0020 
0021 #include <kxmlgui_version.h>
0022 #include <KActionCategory>
0023 #include <KColorSchemeManager>
0024 #include <KSelectAction>
0025 #include <KXmlGuiWindow>
0026 #include <kautosavefile.h>
0027 #include <utility>
0028 #include <mlt++/Mlt.h>
0029 
0030 #include "bin/bin.h"
0031 #include "definitions.h"
0032 #include "utils/gentime.h"
0033 #include "kdenlive_debug.h"
0034 #include "kdenlivecore_export.h"
0035 #include "statusbarmessagelabel.h"
0036 #include "pythoninterfaces/otioconvertions.h"
0037 
0038 class AssetPanel;
0039 class AudioGraphSpectrum;
0040 class EffectBasket;
0041 class EffectListWidget;
0042 class TransitionListWidget;
0043 class KIconLoader;
0044 class KdenliveDoc;
0045 class Monitor;
0046 class Render;
0047 class RenderWidget;
0048 class TimelineTabs;
0049 class TimelineWidget;
0050 class TimelineContainer;
0051 class Transition;
0052 class KDualAction;
0053 
0054 class MltErrorEvent : public QEvent
0055 {
0056 public:
0057     explicit MltErrorEvent(QString message)
0058         : QEvent(QEvent::User)
0059         , m_message(std::move(message))
0060     {
0061     }
0062 
0063     QString message() const { return m_message; }
0064 
0065 private:
0066     QString m_message;
0067 };
0068 
0069 class /*KDENLIVECORE_EXPORT*/ MainWindow : public KXmlGuiWindow
0070 {
0071     Q_OBJECT
0072 
0073 public:
0074     explicit MainWindow(QWidget *parent = nullptr);
0075     /** @brief Initialises the main window.
0076      * @param MltPath (optional) path to MLT environment
0077      * @param Url (optional) file to open
0078      * @param clipsToLoad (optional) a comma separated list of clips to import in project
0079      *
0080      * If Url is present, it will be opened, otherwise, if openlastproject is
0081      * set, latest project will be opened. If no file is open after trying this,
0082      * a default new file will be created. */
0083     void init(const QString &mltPath);
0084     ~MainWindow() override;
0085 
0086     /** @brief Cache for luma files thumbnails. */
0087     static QMap<QString, QImage> m_lumacache;
0088     static QMap<QString, QStringList> m_lumaFiles;
0089 
0090     /** @brief Adds an action to the action collection and stores the name. */
0091     void addAction(const QString &name, QAction *action, const QKeySequence &shortcut = QKeySequence(), KActionCategory *category = nullptr);
0092     /** @brief Same as above, but takes a string for category to populate it with kdenliveCategoryMap */
0093     void addAction(const QString &name, QAction *action, const QKeySequence &shortcut, const QString &category);
0094     /** @brief Adds an action to the action collection and stores the name. */
0095     QAction *addAction(const QString &name, const QString &text, const QObject *receiver, const char *member, const QIcon &icon = QIcon(),
0096                        const QKeySequence &shortcut = QKeySequence(), KActionCategory *category = nullptr);
0097     /** @brief Same as above, but takes a string for category to populate it with kdenliveCategoryMap */
0098     QAction *addAction(const QString &name, const QString &text, const QObject *receiver, const char *member, const QIcon &icon,
0099                        const QKeySequence &shortcut, const QString &category);
0100 
0101     void processRestoreState(const QByteArray &state);
0102 
0103     /**
0104      * @brief Adds a new dock widget to this window.
0105      * @param title title of the dock widget
0106      * @param objectName objectName of the dock widget (required for storing layouts)
0107      * @param widget widget to use in the dock
0108      * @param area area to which the dock should be added to
0109      * @param shortcut default shortcut to raise the dock
0110      * @returns the created dock widget
0111      */
0112     QDockWidget *addDock(const QString &title, const QString &objectName, QWidget *widget, Qt::DockWidgetArea area = Qt::TopDockWidgetArea);
0113 
0114     QUndoGroup *m_commandStack;
0115     QUndoView *m_undoView;
0116     /** @brief holds info about whether movit is available on this system */
0117     bool m_gpuAllowed;
0118     int m_exitCode{EXIT_SUCCESS};
0119     QMap<QString, KActionCategory *> kdenliveCategoryMap;
0120     QList<QAction *> getExtraActions(const QString &name);
0121     /** @brief Returns true if docked widget is tabbed with another widget from its object name */
0122     bool isTabbedWith(QDockWidget *widget, const QString &otherWidget);
0123     
0124     /** @brief Returns true if mixer widget is tabbed */
0125     bool isMixedTabbed() const;
0126 
0127     /** @brief Returns a ptr to the main timeline widget of the project */
0128     TimelineWidget *getMainTimeline() const;
0129 
0130     /** @brief Returns a pointer to the current timeline */
0131     TimelineWidget *getCurrentTimeline() const;
0132 
0133     /** @brief Returns true if a timeline widget is available */
0134     bool hasTimeline() const;
0135     
0136     /** @brief Returns true if the timeline widget is visible */
0137     bool timelineVisible() const;
0138     
0139     /** @brief Raise (show) the clip or project monitor */
0140     void raiseMonitor(bool clipMonitor);
0141 
0142     /** @brief Raise (show) the project bin*/
0143     void raiseBin();
0144     /** @brief Add a bin widget*/
0145     void addBin(Bin *bin, const QString &binName = QString());
0146     /** @brief Get the main (first) bin*/
0147     Bin *getBin();
0148     /** @brief Get the active (focused) bin or first one if none is active*/
0149     Bin *activeBin();
0150     /** @brief Ensure all bin widgets are tabbed together*/
0151     void tabifyBins();
0152     int binCount() const;
0153 
0154     /** @brief Hide subtitle track */
0155     void resetSubtitles();
0156     
0157     /** @brief Restart the application and delete config files if clean is true */
0158     void cleanRestart(bool clean);
0159 
0160     /** @brief Show current tool key combination in status bar */
0161     void showToolMessage();
0162     /** @brief Show the widget's default key binding message */
0163     void setWidgetKeyBinding(const QString &text = QString());
0164     /** @brief Show a key binding in status bar */
0165     void showKeyBinding(const QString &text = QString());
0166 
0167     /** @brief Instantiates a "Get Hot New Stuff" dialog.
0168      * @param configFile configuration file for KNewStuff
0169      * @return number of installed items */
0170     int getNewStuff(const QString &configFile);
0171 
0172     /** @brief Check if the maximum cached data size is not exceeded. */
0173     void checkMaxCacheSize();
0174 
0175 protected:
0176     /** @brief Closes the window.
0177      * @return false if the user presses "Cancel" on a confirmation dialog or
0178      *     the operation requested (starting waiting jobs or saving file) fails,
0179      *     true otherwise */
0180     bool queryClose() override;
0181     void closeEvent(QCloseEvent *) override;
0182     bool eventFilter(QObject *object, QEvent *event) override;
0183 
0184     /** @brief Reports a message in the status bar when an error occurs. */
0185     void customEvent(QEvent *e) override;
0186 
0187     /** @brief Stops the active monitor when the window gets hidden. */
0188     void hideEvent(QHideEvent *e) override;
0189 
0190     /** @brief Saves the file and the window properties when saving the session. */
0191     void saveProperties(KConfigGroup &config) override;
0192 
0193     void saveNewToolbarConfig() override;
0194 
0195 private:
0196     /** @brief Sets up all the actions and attaches them to the collection. */
0197     void setupActions();
0198     /** @brief Rebuild the dock menu according to existing dock widgets. */
0199     void updateDockMenu();
0200 
0201     OtioConvertions m_otioConvertions;
0202     KColorSchemeManager *m_colorschemes;
0203 
0204     QDockWidget *m_projectBinDock;
0205     QDockWidget *m_effectListDock;
0206     QDockWidget *m_compositionListDock;
0207     TransitionListWidget *m_compositionList;
0208     EffectListWidget *m_effectList2;
0209 
0210     AssetPanel *m_assetPanel{nullptr};
0211     QDockWidget *m_effectStackDock;
0212 
0213     QDockWidget *m_clipMonitorDock;
0214     Monitor *m_clipMonitor{nullptr};
0215 
0216     QDockWidget *m_projectMonitorDock;
0217     Monitor *m_projectMonitor{nullptr};
0218 
0219     AudioGraphSpectrum *m_audioSpectrum;
0220 
0221     QDockWidget *m_undoViewDock;
0222     QDockWidget *m_mixerDock;
0223     QDockWidget *m_onlineResourcesDock;
0224 
0225     KSelectAction *m_timeFormatButton;
0226     QAction *m_compositeAction;
0227 
0228     TimelineTabs *m_timelineTabs{nullptr};
0229     QVector <Bin*>m_binWidgets;
0230 
0231     /** This list holds all the scopes used in Kdenlive, allowing to manage some global settings */
0232     QList<QDockWidget *> m_gfxScopesList;
0233 
0234     KActionCategory *m_effectActions;
0235     KActionCategory *m_transitionActions;
0236     QMenu *m_effectsMenu;
0237     QMenu *m_transitionsMenu;
0238     QMenu *m_timelineContextMenu;
0239     QList<QAction *> m_timelineClipActions;
0240     KDualAction *m_useTimelineZone;
0241 
0242     /** Action names that can be used in the slotDoAction() slot, with their i18n() names */
0243     QStringList m_actionNames;
0244 
0245     /** @brief Shortcut to remove the focus from any element.
0246      *
0247      * It allows one to get out of e.g. text input fields and to press another
0248      * shortcut. */
0249     QShortcut *m_shortcutRemoveFocus;
0250 
0251     RenderWidget *m_renderWidget{nullptr};
0252     StatusBarMessageLabel *m_messageLabel{nullptr};
0253     QList<QAction *> m_transitions;
0254     QAction *m_buttonAudioThumbs;
0255     QAction *m_buttonVideoThumbs;
0256     QAction *m_buttonShowMarkers;
0257     QAction *m_buttonFitZoom;
0258     QAction *m_buttonTimelineTags;
0259     QAction *m_normalEditTool;
0260     QAction *m_overwriteEditTool;
0261     QAction *m_insertEditTool;
0262     QAction *m_buttonSelectTool;
0263     QAction *m_buttonRazorTool;
0264     QAction *m_buttonSpacerTool;
0265     QAction *m_buttonRippleTool;
0266     QAction *m_buttonRollTool;
0267     QAction *m_buttonSlipTool;
0268     QAction *m_buttonSlideTool;
0269     QAction *m_buttonMulticamTool;
0270     QAction *m_buttonSnap;
0271     QAction *m_saveAction;
0272     QSlider *m_zoomSlider;
0273     QAction *m_zoomIn;
0274     QAction *m_zoomOut;
0275     QAction *m_loopZone;
0276     QAction *m_playZone;
0277     QAction *m_loopClip;
0278     QAction *m_proxyClip;
0279     QAction *m_buttonSubtitleEditTool;
0280     QString m_theme;
0281     KIconLoader *m_iconLoader;
0282     KToolBar *m_timelineToolBar;
0283     TimelineContainer *m_timelineToolBarContainer;
0284     QLabel *m_trimLabel;
0285     QActionGroup *m_scaleGroup;
0286     ToolType::ProjectTool m_activeTool;
0287     /** @brief Store latest mouse position in timeline. */
0288     int m_mousePosition;
0289 
0290     /** @brief initialize startup values, return true if first run. */
0291     bool readOptions();
0292     void saveOptions();
0293 
0294     void loadGenerators();
0295     QStringList m_pluginFileNames;
0296     QByteArray m_timelineState;
0297     void buildDynamicActions();
0298     void loadClipActions();
0299 
0300     QTime m_timer;
0301     KXMLGUIClient *m_extraFactory;
0302     bool m_themeInitialized{false};
0303     bool m_isDarkTheme{false};
0304     EffectBasket *m_effectBasket;
0305     /** @brief Update widget style. */
0306     void doChangeStyle();
0307 
0308 public slots:
0309     void slotReloadEffects(const QStringList &paths);
0310     Q_SCRIPTABLE void setRenderingProgress(const QString &url, int progress, int frame);
0311     Q_SCRIPTABLE void setRenderingFinished(const QString &url, int status, const QString &error);
0312     Q_SCRIPTABLE void addProjectClip(const QString &url, const QString & folder = QStringLiteral("-1"));
0313     Q_SCRIPTABLE void addTimelineClip(const QString &url);
0314     Q_SCRIPTABLE void addEffect(const QString &effectId);
0315     Q_SCRIPTABLE void scriptRender(const QString &url);
0316 #ifndef NODBUS
0317     Q_NOREPLY void exitApp();
0318 #endif
0319 
0320     void slotSwitchVideoThumbs();
0321     void slotSwitchAudioThumbs();
0322 
0323     void slotPreferences(int page = -1, int option = -1);
0324     void connectDocument();
0325     /** @brief Reload project profile in config dialog if changed. */
0326     void slotRefreshProfiles();
0327 #if KXMLGUI_VERSION < QT_VERSION_CHECK(5,91,0)
0328     void configureToolbars() override;
0329 #endif
0330     /** @brief Decreases the timeline zoom level by 1. */
0331     void slotZoomIn(bool zoomOnMouse = false);
0332     /** @brief Increases the timeline zoom level by 1. */
0333     void slotZoomOut(bool zoomOnMouse = false);
0334     /** @brief Enable or disable the use of timeline zone for edits. */
0335     void slotSwitchTimelineZone(bool toggled);
0336     /** @brief Open the online services search dialog. */
0337     void slotDownloadResources();
0338     void slotEditSubtitle(const QMap<QString, QString> &subProperties = {});
0339     void slotTranscode(const QStringList &urls = QStringList());
0340     /** @brief Open the transcode to edit friendly format dialog. */
0341     void slotFriendlyTranscode(const QString &binId, bool checkProfile);
0342     /** @brief Add subtitle clip to timeline */
0343     void slotAddSubtitle(const QString &text = QString());
0344     /** @brief Ensure subtitle track is displayed */
0345     void showSubtitleTrack();
0346     /** @brief The path of the current document changed (save as), update render settings */
0347     void updateProjectPath(const QString &path);
0348     /** @brief Update compositing action to display current project setting. */
0349     void slotUpdateCompositeAction(bool enable);
0350     /** @brief Update duration of projet in timeline toolbar. */
0351     void slotUpdateProjectDuration(int pos);
0352     /** @brief Remove all unused clips from the project. */
0353     void slotCleanProject();
0354 
0355 private slots:
0356     /** @brief Shows the shortcut dialog. */
0357     void slotEditKeys();
0358     void loadDockActions();
0359     /** @brief Reflects setting changes to the GUI. */
0360     void updateConfiguration();
0361     void slotConnectMonitors();
0362     void slotUpdateMousePosition(int pos, int duration = -1);
0363     void slotEditProjectSettings();
0364     void slotSwitchMarkersComments();
0365     void slotSwitchSnap();
0366     void slotShowTimelineTags();
0367     void slotRenderProject();
0368     void slotStopRenderProject();
0369     void slotFullScreen();
0370     /** @brief if modified is true adds "modified" to the caption and enables the save button.
0371      * (triggered by KdenliveDoc::setModified()) */
0372     void slotUpdateDocumentState(bool modified);
0373 
0374     /** @brief Sets the timeline zoom slider to @param value.
0375      *
0376      * Also disables zoomIn and zoomOut actions if they cannot be used at the moment. */
0377     void slotSetZoom(int value, bool zoomOnMouse = false);
0378     /** @brief Makes the timeline zoom level fit the timeline content. */
0379     void slotFitZoom();
0380     /** @brief Updates the zoom slider tooltip to fit @param zoomlevel. */
0381     void slotUpdateZoomSliderToolTip(int zoomlevel);
0382     /** @brief Timeline was zoom, update slider to reflect that */
0383     void updateZoomSlider(int value);
0384 
0385     /** @brief Displays the zoom slider tooltip.
0386      * @param zoomlevel (optional) The zoom level to show in the tooltip.
0387      *
0388      * Adopted from Dolphin (src/statusbar/dolphinstatusbar.cpp) */
0389     void slotShowZoomSliderToolTip(int zoomlevel = -1);
0390     /** @brief Deletes item in timeline, project tree or effect stack depending on focus. */
0391     void slotDeleteItem();
0392     void slotAddClipMarker();
0393     void slotDeleteClipMarker(bool allowGuideDeletion = false);
0394     void slotDeleteAllClipMarkers();
0395     void slotEditClipMarker();
0396 
0397     /** @brief Adds marker or guide at the current position without showing the marker dialog.
0398      *
0399      * Adds a marker if clip monitor is active, otherwise a guide.
0400      * The comment is set to the current position (therefore not dialog).
0401      * This can be useful to mark something during playback. */
0402     void slotAddMarkerGuideQuickly();
0403     void slotCutTimelineClip();
0404     void slotCutTimelineAllClips();
0405     void slotInsertClipOverwrite();
0406     void slotInsertClipInsert();
0407     void slotExtractZone();
0408     void slotLiftZone();
0409     void slotPreviewRender();
0410     void slotStopPreviewRender();
0411     void slotDefinePreviewRender();
0412     void slotRemovePreviewRender();
0413     void slotClearPreviewRender(bool resetZones = true);
0414     void slotSelectTimelineClip();
0415     void slotSelectTimelineTransition();
0416     void slotDeselectTimelineClip();
0417     void slotDeselectTimelineTransition();
0418     void slotSelectAddTimelineClip();
0419     void slotSelectAddTimelineTransition();
0420     void slotAddEffect(QAction *result);
0421     void slotAddTransition(QAction *result);
0422     void slotAddProjectClip(const QUrl &url, const QString &folderInfo);
0423     void slotAddTextNote(const QString &text);
0424     void slotAddProjectClipList(const QList<QUrl> &urls);
0425     void slotChangeTool(QAction *action);
0426     void slotChangeEdit(QAction *action);
0427     void slotSetTool(ToolType::ProjectTool tool);
0428     void slotSnapForward();
0429     void slotSnapRewind();
0430     void slotGuideForward();
0431     void slotGuideRewind();
0432     void slotClipStart();
0433     void slotClipEnd();
0434     void slotSelectClipInTimeline();
0435     void slotClipInTimeline(const QString &clipId, const QList<int> &ids);
0436 
0437     void slotInsertSpace();
0438     void slotRemoveSpace();
0439     void slotRemoveAllSpace();
0440     void slotAddGuide();
0441     void slotEditGuide();
0442     void slotExportGuides();
0443     void slotLockGuides(bool lock);
0444     void slotDeleteGuide();
0445     void slotDeleteAllGuides();
0446 
0447     void slotCopy();
0448     void slotPaste();
0449     void slotPasteEffects();
0450     void slotResizeItemStart();
0451     void slotResizeItemEnd();
0452     void configureNotifications();
0453     void slotSeparateAudioChannel();
0454     /** @brief Normalize audio channels before displaying them */
0455     void slotNormalizeAudioChannel();
0456     void slotInsertTrack();
0457     void slotDeleteTrack();
0458     /** @brief Show context menu to switch current track target audio stream. */
0459     void slotSwitchTrackAudioStream();
0460     void slotShowTrackRec(bool checked);
0461     /** @brief Select all clips in active track. */
0462     void slotSelectTrack();
0463     /** @brief Select all clips in timeline. */
0464     void slotSelectAllTracks();
0465     void slotUnselectAllTracks();
0466 #if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 98, 0)
0467     void slotGetNewKeyboardStuff(QComboBox *schemesList);
0468 #endif
0469     void slotAutoTransition();
0470     void slotRunWizard();
0471     void slotGroupClips();
0472     void slotUnGroupClips();
0473     void slotEditItemDuration();
0474     void slotClipInProjectTree();
0475     // void slotClipToProjectTree();
0476     void slotSplitAV();
0477     void slotSwitchClip();
0478     void slotSetAudioAlignReference();
0479     void slotAlignAudio();
0480     void slotUpdateTimelineView(QAction *action);
0481     void slotShowTimeline(bool show);
0482     void slotTranscodeClip();
0483     /** @brief Archive project: creates a copy of the project file with all clips in a new folder. */
0484     void slotArchiveProject();
0485     void slotSetDocumentRenderProfile(const QMap<QString, QString> &props);
0486 
0487     /** @brief Switches between displaying frames or timecode.
0488      * @param ix 0 = display timecode, 1 = display frames. */
0489     void slotUpdateTimecodeFormat(int ix);
0490 
0491     /** @brief Removes the focus of anything. */
0492     void slotRemoveFocus();
0493     void slotShutdown();
0494 
0495     void slotSwitchMonitors();
0496     void slotSwitchMonitorOverlay(QAction *);
0497     void slotSwitchDropFrames(bool drop);
0498     void slotSetMonitorGamma(int gamma);
0499     void slotCheckRenderStatus();
0500     void slotInsertZoneToTree();
0501     /** @brief Focus the timecode widget of current monitor. */
0502     void slotFocusTimecode();
0503 
0504     /** @brief The monitor informs that it needs (or not) to have frames sent by the renderer. */
0505     void slotMonitorRequestRenderFrame(bool request);
0506     /** @brief Update project because the use of proxy clips was enabled / disabled. */
0507     void slotUpdateProxySettings();
0508     /** @brief Disable proxies for this project. */
0509     void slotDisableProxies();
0510 
0511     /** @brief Process keyframe data sent from a clip to effect / transition stack. */
0512     void slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString &keyframes);
0513     /** @brief Move playhead to mouse cursor position if defined key is pressed */
0514     void slotAlignPlayheadToMousePos();
0515 
0516     void slotThemeChanged(const QString &name);
0517     /** @brief Close Kdenlive and try to restart it */
0518     void slotRestart(bool clean = false);
0519     void triggerKey(QKeyEvent *ev);
0520     /** @brief Update monitor overlay actions on monitor switch */
0521     void slotUpdateMonitorOverlays(int id, int code);
0522     /** @brief Update widget style */
0523     void slotChangeStyle(QAction *a);
0524     /** @brief Create temporary top track to preview an effect */
0525     void createSplitOverlay(std::shared_ptr<Mlt::Filter> filter);
0526     void removeSplitOverlay();
0527     /** @brief Create a generator's setup dialog */
0528     void buildGenerator(QAction *action);
0529     void slotCheckTabPosition();
0530     /** @brief Toggle automatic timeline preview on/off */
0531     void slotToggleAutoPreview(bool enable);
0532 #if KXMLGUI_VERSION < QT_VERSION_CHECK(5,91,0)
0533     /** @brief Rebuild/reload timeline toolbar. */
0534     void rebuildTimlineToolBar();
0535 #endif
0536     void showTimelineToolbarMenu(const QPoint &pos);
0537     /** @brief Open Cached Data management dialog. */
0538     void slotManageCache();
0539     void showMenuBar(bool show);
0540     /** @brief Change forced icon theme setting (asks for app restart). */
0541     void forceIconSet(bool force);
0542     /** @brief Toggle current project's compositing mode. */
0543     void slotUpdateCompositing(bool checked);
0544     /** @brief Set timeline toolbar icon size. */
0545     void setTimelineToolbarIconSize(QAction *a);
0546     void slotEditItemSpeed();
0547     void slotRemapItemTime();
0548     /** @brief Request adjust of timeline track height */
0549     void resetTimelineTracks();
0550     /** @brief Set keyboard grabbing on current timeline item */
0551     void slotGrabItem();
0552     /** @brief Collapse or expand current item (depending on focused widget: effet, track)*/
0553     void slotCollapse();
0554     /** @brief Save currently selected timeline clip as bin subclip*/
0555     void slotExtractClip();
0556     /** @brief Save currently selected timeline clip as bin subclip*/
0557     void slotSaveZoneToBin();
0558     /** @brief Expand current timeline clip (recover clips and tracks from an MLT playlist) */
0559     void slotExpandClip();
0560     /** @brief Focus and activate an audio track from a shortcut sequence */
0561     void slotActivateAudioTrackSequence();
0562     /** @brief Focus and activate a video track from a shortcut sequence */
0563     void slotActivateVideoTrackSequence();
0564     /** @brief Select target for current track */
0565     void slotActivateTarget();
0566     /** @brief Enable/disable subtitle track */
0567     void slotDisableSubtitle();
0568     /** @brief Lock / unlock subtitle track */
0569     void slotLockSubtitle();
0570     /** @brief Import a subtitle file */
0571     void slotImportSubtitle();
0572     /** @brief Export a subtitle file */
0573     void slotExportSubtitle();
0574     /** @brief Start a speech recognition on timeline zone */
0575     void slotSpeechRecognition();
0576     /** @brief Copy debug information like lib versions, gpu mode state,... to clipboard */
0577     void slotCopyDebugInfo();
0578     void slotRemoveBinDock(const QString &name);
0579 
0580 signals:
0581     Q_SCRIPTABLE void abortRenderJob(const QString &url);
0582     void configurationChanged();
0583     void GUISetupDone();
0584     void setPreviewProgress(int);
0585     void setRenderProgress(int);
0586     void displayMessage(const QString &, MessageType, int);
0587     void displaySelectionMessage(const QString &);
0588     void displayProgressMessage(const QString &, MessageType, int);
0589     /** @brief Project profile changed, update render widget accordingly. */
0590     void updateRenderWidgetProfile();
0591     /** @brief Clear asset view if itemId is displayed. */
0592     void clearAssetPanel(int itemId = -1);
0593     void assetPanelWarning(const QString service, const QString id, const QString message);
0594     void adjustAssetPanelRange(int itemId, int in, int out);
0595     /** @brief Enable or disable the undo stack. For example undo/redo should not be enabled when dragging a clip in timeline or we risk corruption. */
0596     void enableUndo(bool enable);
0597     bool focusTimeline(bool focus, bool highlight);
0598     void removeBinDock(const QString &name);
0599 };