Warning, file /multimedia/kdenlive/src/mainwindow.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 <KActionCategory>
0022 #include <KAutoSaveFile>
0023 #include <KColorSchemeManager>
0024 #include <KSelectAction>
0025 #include <KXmlGuiWindow>
0026 #include <knewstuff_version.h>
0027 #include <kxmlgui_version.h>
0028 #include <mlt++/Mlt.h>
0029 #include <utility>
0030 
0031 #include "bin/bin.h"
0032 #include "definitions.h"
0033 #include "utils/gentime.h"
0034 #include "kdenlive_debug.h"
0035 #include "kdenlivecore_export.h"
0036 #include "statusbarmessagelabel.h"
0037 #include "pythoninterfaces/otioconvertions.h"
0038 
0039 class AssetPanel;
0040 class AudioGraphSpectrum;
0041 class EffectBasket;
0042 class EffectListWidget;
0043 class TransitionListWidget;
0044 class KIconLoader;
0045 class KdenliveDoc;
0046 class Monitor;
0047 class Render;
0048 class RenderWidget;
0049 class TimelineTabs;
0050 class TimelineWidget;
0051 class TimelineContainer;
0052 class Transition;
0053 class KDualAction;
0054 
0055 class MltErrorEvent : public QEvent
0056 {
0057 public:
0058     explicit MltErrorEvent(QString message)
0059         : QEvent(QEvent::User)
0060         , m_message(std::move(message))
0061     {
0062     }
0063 
0064     QString message() const { return m_message; }
0065 
0066 private:
0067     QString m_message;
0068 };
0069 
0070 class /*KDENLIVECORE_EXPORT*/ MainWindow : public KXmlGuiWindow
0071 {
0072     Q_OBJECT
0073 
0074 public:
0075     explicit MainWindow(QWidget *parent = nullptr);
0076     /** @brief Initialises the main window.
0077      * @param MltPath (optional) path to MLT environment
0078      * @param Url (optional) file to open
0079      * @param clipsToLoad (optional) a comma separated list of clips to import in project
0080      *
0081      * If Url is present, it will be opened, otherwise, if openlastproject is
0082      * set, latest project will be opened. If no file is open after trying this,
0083      * a default new file will be created. */
0084     void init(const QString &mltPath);
0085     ~MainWindow() override;
0086 
0087     /** @brief Cache for luma files thumbnails. */
0088     static QMap<QString, QImage> m_lumacache;
0089     static QMap<QString, QStringList> m_lumaFiles;
0090 
0091     /** @brief Adds an action to the action collection and stores the name. */
0092     void addAction(const QString &name, QAction *action, const QKeySequence &shortcut = QKeySequence(), KActionCategory *category = nullptr);
0093     /** @brief Same as above, but takes a string for category to populate it with kdenliveCategoryMap */
0094     void addAction(const QString &name, QAction *action, const QKeySequence &shortcut, const QString &category);
0095     /** @brief Adds an action to the action collection and stores the name. */
0096     QAction *addAction(const QString &name, const QString &text, const QObject *receiver, const char *member, const QIcon &icon = QIcon(),
0097                        const QKeySequence &shortcut = QKeySequence(), KActionCategory *category = nullptr);
0098     /** @brief Same as above, but takes a string for category to populate it with kdenliveCategoryMap */
0099     QAction *addAction(const QString &name, const QString &text, const QObject *receiver, const char *member, const QIcon &icon,
0100                        const QKeySequence &shortcut, const QString &category);
0101 
0102     void processRestoreState(const QByteArray &state);
0103 
0104     /**
0105      * @brief Adds a new dock widget to this window.
0106      * @param title title of the dock widget
0107      * @param objectName objectName of the dock widget (required for storing layouts)
0108      * @param widget widget to use in the dock
0109      * @param area area to which the dock should be added to
0110      * @param shortcut default shortcut to raise the dock
0111      * @returns the created dock widget
0112      */
0113     QDockWidget *addDock(const QString &title, const QString &objectName, QWidget *widget, Qt::DockWidgetArea area = Qt::TopDockWidgetArea);
0114 
0115     QUndoGroup *m_commandStack;
0116     QUndoView *m_undoView;
0117     /** @brief holds info about whether movit is available on this system */
0118     bool m_gpuAllowed;
0119     int m_exitCode{EXIT_SUCCESS};
0120     QMap<QString, KActionCategory *> kdenliveCategoryMap;
0121     QList<QAction *> getExtraActions(const QString &name);
0122     /** @brief Returns true if docked widget is tabbed with another widget from its object name */
0123     bool isTabbedWith(QDockWidget *widget, const QString &otherWidget);
0124     
0125     /** @brief Returns true if mixer widget is tabbed */
0126     bool isMixedTabbed() const;
0127 
0128     /** @brief Returns a pointer to the current timeline */
0129     TimelineWidget *getCurrentTimeline() const;
0130 
0131     /** @brief Returns true if a timeline widget is available */
0132     bool hasTimeline() const;
0133     
0134     /** @brief Returns true if the timeline widget is visible */
0135     bool timelineVisible() const;
0136     
0137     /** @brief Raise (show) the clip or project monitor */
0138     void raiseMonitor(bool clipMonitor);
0139 
0140     /** @brief Raise (show) the project bin*/
0141     void raiseBin();
0142     /** @brief Add a bin widget*/
0143     void addBin(Bin *bin, const QString &binName = QString());
0144     /** @brief Get the main (first) bin*/
0145     Bin *getBin();
0146     /** @brief Get the active (focused) bin or first one if none is active*/
0147     Bin *activeBin();
0148     /** @brief Ensure all bin widgets are tabbed together*/
0149     void tabifyBins();
0150     int binCount() const;
0151 
0152     /** @brief Hide subtitle track */
0153     void resetSubtitles();
0154     
0155     /** @brief Restart the application and delete config files if clean is true */
0156     void cleanRestart(bool clean);
0157 
0158     /** @brief Show current tool key combination in status bar */
0159     void showToolMessage();
0160     /** @brief Show the widget's default key binding message */
0161     void setWidgetKeyBinding(const QString &text = QString());
0162     /** @brief Show a key binding in status bar */
0163     void showKeyBinding(const QString &text = QString());
0164 
0165 #if KNEWSTUFF_VERSION < QT_VERSION_CHECK(5, 98, 0)
0166     /** @brief Instantiates a "Get Hot New Stuff" dialog.
0167      * @param configFile configuration file for KNewStuff
0168      * @return number of installed items */
0169     int getNewStuff(const QString &configFile);
0170 #endif
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     KHamburgerMenu *m_hamburgerMenu;
0291 
0292     /** @brief initialize startup values, return true if first run. */
0293     bool readOptions();
0294     void saveOptions();
0295 
0296     void loadGenerators();
0297     QStringList m_pluginFileNames;
0298     QByteArray m_timelineState;
0299     void buildDynamicActions();
0300     void loadClipActions();
0301 
0302     QTime m_timer;
0303     KXMLGUIClient *m_extraFactory;
0304     bool m_themeInitialized{false};
0305     bool m_isDarkTheme{false};
0306     EffectBasket *m_effectBasket;
0307     /** @brief Update widget style. */
0308     void doChangeStyle();
0309 
0310 public slots:
0311     void slotReloadEffects(const QStringList &paths);
0312     Q_SCRIPTABLE void setRenderingProgress(const QString &url, int progress, int frame);
0313     Q_SCRIPTABLE void setRenderingFinished(const QString &url, int status, const QString &error);
0314     Q_SCRIPTABLE void addProjectClip(const QString &url, const QString & folder = QStringLiteral("-1"));
0315     Q_SCRIPTABLE void addTimelineClip(const QString &url);
0316     Q_SCRIPTABLE void addEffect(const QString &effectId);
0317     Q_SCRIPTABLE void scriptRender(const QString &url);
0318 #ifndef NODBUS
0319     Q_NOREPLY void exitApp();
0320 #endif
0321 
0322     void slotSwitchVideoThumbs();
0323     void slotSwitchAudioThumbs();
0324 
0325     void slotPreferences(int page = -1, int option = -1);
0326     void connectDocument();
0327     /** @brief Reload project profile in config dialog if changed. */
0328     void slotRefreshProfiles();
0329     /** @brief Decreases the timeline zoom level by 1. */
0330     void slotZoomIn(bool zoomOnMouse = false);
0331     /** @brief Increases the timeline zoom level by 1. */
0332     void slotZoomOut(bool zoomOnMouse = false);
0333     /** @brief Enable or disable the use of timeline zone for edits. */
0334     void slotSwitchTimelineZone(bool toggled);
0335     /** @brief Open the online services search dialog. */
0336     void slotDownloadResources();
0337     void slotEditSubtitle(const QMap<QString, QString> &subProperties = {});
0338     void slotTranscode(const QStringList &urls = QStringList());
0339     /** @brief Open the transcode to edit friendly format dialog. */
0340     void slotFriendlyTranscode(const QString &binId, bool checkProfile);
0341     /** @brief Add subtitle clip to timeline */
0342     void slotAddSubtitle(const QString &text = QString());
0343     /** @brief Ensure subtitle track is displayed */
0344     void showSubtitleTrack();
0345     /** @brief The path of the current document changed (save as), update render settings */
0346     void updateProjectPath(const QString &path);
0347     /** @brief Update compositing action to display current project setting. */
0348     void slotUpdateCompositeAction(bool enable);
0349     /** @brief Update duration of projet in timeline toolbar. */
0350     void slotUpdateProjectDuration(int pos);
0351     /** @brief Remove all unused clips from the project. */
0352     void slotCleanProject();
0353     void slotEditProjectSettings(int ix = 0);
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 slotSwitchMarkersComments();
0364     void slotSwitchSnap();
0365     void slotShowTimelineTags();
0366     void slotRenderProject();
0367     void slotStopRenderProject();
0368     void slotFullScreen();
0369     /** @brief if modified is true adds "modified" to the caption and enables the save button.
0370      * (triggered by KdenliveDoc::setModified()) */
0371     void slotUpdateDocumentState(bool modified);
0372 
0373     /** @brief Sets the timeline zoom slider to @param value.
0374      *
0375      * Also disables zoomIn and zoomOut actions if they cannot be used at the moment. */
0376     void slotSetZoom(int value, bool zoomOnMouse = false);
0377     /** @brief Makes the timeline zoom level fit the timeline content. */
0378     void slotFitZoom();
0379     /** @brief Updates the zoom slider tooltip to fit @param zoomlevel. */
0380     void slotUpdateZoomSliderToolTip(int zoomlevel);
0381     /** @brief Timeline was zoom, update slider to reflect that */
0382     void updateZoomSlider(int value);
0383 
0384     /** @brief Displays the zoom slider tooltip.
0385      * @param zoomlevel (optional) The zoom level to show in the tooltip.
0386      *
0387      * Adopted from Dolphin (src/statusbar/dolphinstatusbar.cpp) */
0388     void slotShowZoomSliderToolTip(int zoomlevel = -1);
0389     /** @brief Deletes item in timeline, project tree or effect stack depending on focus. */
0390     void slotDeleteItem();
0391     void slotAddClipMarker();
0392     void slotDeleteClipMarker(bool allowGuideDeletion = false);
0393     void slotDeleteAllClipMarkers();
0394     void slotEditClipMarker();
0395 
0396     /** @brief Adds marker or guide at the current position without showing the marker dialog.
0397      *
0398      * Adds a marker if clip monitor is active, otherwise a guide.
0399      * The comment is set to the current position (therefore not dialog).
0400      * This can be useful to mark something during playback. */
0401     void slotAddMarkerGuideQuickly();
0402     void slotCutTimelineClip();
0403     void slotCutTimelineAllClips();
0404     void slotInsertClipOverwrite();
0405     void slotInsertClipInsert();
0406     void slotExtractZone();
0407     void slotLiftZone();
0408     void slotPreviewRender();
0409     void slotStopPreviewRender();
0410     void slotDefinePreviewRender();
0411     void slotRemovePreviewRender();
0412     void slotClearPreviewRender(bool resetZones = true);
0413     void slotSelectTimelineClip();
0414     void slotSelectTimelineTransition();
0415     void slotDeselectTimelineClip();
0416     void slotDeselectTimelineTransition();
0417     void slotSelectAddTimelineClip();
0418     void slotSelectAddTimelineTransition();
0419     void slotAddEffect(QAction *result);
0420     void slotAddTransition(QAction *result);
0421     void slotAddProjectClip(const QUrl &url, const QString &folderInfo);
0422     void slotAddTextNote(const QString &text);
0423     void slotAddProjectClipList(const QList<QUrl> &urls);
0424     void slotChangeTool(QAction *action);
0425     void slotChangeEdit(QAction *action);
0426     void slotSetTool(ToolType::ProjectTool tool);
0427     void slotSnapForward();
0428     void slotSnapRewind();
0429     void slotGuideForward();
0430     void slotGuideRewind();
0431     void slotClipStart();
0432     void slotClipEnd();
0433     void slotSelectClipInTimeline();
0434     void slotClipInTimeline(const QString &clipId, const QList<int> &ids);
0435 
0436     void slotInsertSpace();
0437     void slotRemoveSpace();
0438     void slotRemoveSpaceInAllTracks();
0439     void slotRemoveAllSpacesInTrack();
0440     void slotRemoveAllClipsInTrack();
0441     void slotAddGuide();
0442     void slotEditGuide();
0443     void slotExportGuides();
0444     void slotLockGuides(bool lock);
0445     void slotDeleteGuide();
0446     void slotDeleteAllGuides();
0447 
0448     void slotCopy();
0449     void slotPaste();
0450     void slotPasteEffects();
0451     void slotResizeItemStart();
0452     void slotResizeItemEnd();
0453     void configureNotifications();
0454     void slotSeparateAudioChannel();
0455     /** @brief Normalize audio channels before displaying them */
0456     void slotNormalizeAudioChannel();
0457     void slotInsertTrack();
0458     void slotDeleteTrack();
0459     /** @brief Show context menu to switch current track target audio stream. */
0460     void slotSwitchTrackAudioStream();
0461     void slotShowTrackRec(bool checked);
0462     /** @brief Select all clips in active track. */
0463     void slotSelectTrack();
0464     /** @brief Select all clips in timeline. */
0465     void slotSelectAllTracks();
0466     void slotUnselectAllTracks();
0467 #if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 98, 0)
0468     void slotGetNewKeyboardStuff(QComboBox *schemesList);
0469 #endif
0470     void slotAutoTransition();
0471     void slotRunWizard();
0472     void slotGroupClips();
0473     void slotUnGroupClips();
0474     void slotEditItemDuration();
0475     void slotClipInProjectTree();
0476     // void slotClipToProjectTree();
0477     void slotSplitAV();
0478     void slotSwitchClip();
0479     void slotSetAudioAlignReference();
0480     void slotAlignAudio();
0481     void slotUpdateTimelineView(QAction *action);
0482     void slotShowTimeline(bool show);
0483     void slotTranscodeClip();
0484     /** @brief Archive project: creates a copy of the project file with all clips in a new folder. */
0485     void slotArchiveProject();
0486     void slotSetDocumentRenderProfile(const QMap<QString, QString> &props);
0487 
0488     /** @brief Switches between displaying frames or timecode.
0489      * @param ix 0 = display timecode, 1 = display frames. */
0490     void slotUpdateTimecodeFormat(int ix);
0491 
0492     /** @brief Removes the focus of anything. */
0493     void slotRemoveFocus();
0494     void slotShutdown();
0495 
0496     void slotSwitchMonitors();
0497     void slotSwitchMonitorOverlay(QAction *);
0498     void slotSwitchDropFrames(bool drop);
0499     void slotSetMonitorGamma(int gamma);
0500     void slotCheckRenderStatus();
0501     void slotInsertZoneToTree();
0502     /** @brief Focus the timecode widget of current monitor. */
0503     void slotFocusTimecode();
0504 
0505     /** @brief The monitor informs that it needs (or not) to have frames sent by the renderer. */
0506     void slotMonitorRequestRenderFrame(bool request);
0507     /** @brief Update project because the use of proxy clips was enabled / disabled. */
0508     void slotUpdateProxySettings();
0509     /** @brief Disable proxies for this project. */
0510     void slotDisableProxies();
0511 
0512     /** @brief Process keyframe data sent from a clip to effect / transition stack. */
0513     void slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString &keyframes);
0514     /** @brief Move playhead to mouse cursor position if defined key is pressed */
0515     void slotAlignPlayheadToMousePos();
0516 
0517     void slotThemeChanged(const QString &name);
0518     /** @brief Close Kdenlive and try to restart it */
0519     void slotRestart(bool clean = false);
0520     void triggerKey(QKeyEvent *ev);
0521     /** @brief Update monitor overlay actions on monitor switch */
0522     void slotUpdateMonitorOverlays(int id, int code);
0523     /** @brief Update widget style */
0524     void slotChangeStyle(QAction *a);
0525     /** @brief Create temporary top track to preview an effect */
0526     void createSplitOverlay(std::shared_ptr<Mlt::Filter> filter);
0527     void removeSplitOverlay();
0528     /** @brief Create a generator's setup dialog */
0529     void buildGenerator(QAction *action);
0530     void slotCheckTabPosition();
0531     /** @brief Toggle automatic timeline preview on/off */
0532     void slotToggleAutoPreview(bool enable);
0533     void showTimelineToolbarMenu(const QPoint &pos);
0534     /** @brief Open Cached Data management dialog. */
0535     void slotManageCache();
0536     void showMenuBar(bool show);
0537     /** @brief Change forced icon theme setting (asks for app restart). */
0538     void forceIconSet(bool force);
0539     /** @brief Toggle current project's compositing mode. */
0540     void slotUpdateCompositing(bool checked);
0541     /** @brief Set timeline toolbar icon size. */
0542     void setTimelineToolbarIconSize(QAction *a);
0543     void slotEditItemSpeed();
0544     void slotRemapItemTime();
0545     /** @brief Request adjust of timeline track height */
0546     void resetTimelineTracks();
0547     /** @brief Set keyboard grabbing on current timeline item */
0548     void slotGrabItem();
0549     /** @brief Collapse or expand current item (depending on focused widget: effet, track)*/
0550     void slotCollapse();
0551     /** @brief Save currently selected timeline clip as bin subclip*/
0552     void slotExtractClip();
0553     /** @brief Save currently selected timeline clip as bin subclip*/
0554     void slotSaveZoneToBin();
0555     /** @brief Expand current timeline clip (recover clips and tracks from an MLT playlist) */
0556     void slotExpandClip();
0557     /** @brief Focus and activate an audio track from a shortcut sequence */
0558     void slotActivateAudioTrackSequence();
0559     /** @brief Focus and activate a video track from a shortcut sequence */
0560     void slotActivateVideoTrackSequence();
0561     /** @brief Select target for current track */
0562     void slotActivateTarget();
0563     /** @brief Enable/disable subtitle track */
0564     void slotDisableSubtitle();
0565     /** @brief Lock / unlock subtitle track */
0566     void slotLockSubtitle();
0567     /** @brief Import a subtitle file */
0568     void slotImportSubtitle();
0569     /** @brief Export a subtitle file */
0570     void slotExportSubtitle();
0571     /** @brief Start a speech recognition on timeline zone */
0572     void slotSpeechRecognition();
0573     /** @brief Copy debug information like lib versions, gpu mode state,... to clipboard */
0574     void slotCopyDebugInfo();
0575     void slotRemoveBinDock(const QString &name);
0576     /** @brief Focus the guides list search line */
0577     void slotSearchGuide();
0578 
0579 signals:
0580     Q_SCRIPTABLE void abortRenderJob(const QString &url);
0581     void configurationChanged();
0582     void GUISetupDone();
0583     void setPreviewProgress(int);
0584     void setRenderProgress(int);
0585     void displayMessage(const QString &, MessageType, int);
0586     void displaySelectionMessage(const QString &);
0587     void displayProgressMessage(const QString &, MessageType, int);
0588     /** @brief Project profile changed, update render widget accordingly. */
0589     void updateRenderWidgetProfile();
0590     /** @brief Clear asset view if itemId is displayed. */
0591     void clearAssetPanel(int itemId = -1);
0592     void assetPanelWarning(const QString service, const QString id, const QString message);
0593     void adjustAssetPanelRange(int itemId, int in, int out);
0594     /** @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. */
0595     void enableUndo(bool enable);
0596     bool focusTimeline(bool focus, bool highlight);
0597     void removeBinDock(const QString &name);
0598 };