File indexing completed on 2022-11-29 19:13:42

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     /** @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     /** @brief Decreases the timeline zoom level by 1. */
0328     void slotZoomIn(bool zoomOnMouse = false);
0329     /** @brief Increases the timeline zoom level by 1. */
0330     void slotZoomOut(bool zoomOnMouse = false);
0331     /** @brief Enable or disable the use of timeline zone for edits. */
0332     void slotSwitchTimelineZone(bool toggled);
0333     /** @brief Open the online services search dialog. */
0334     void slotDownloadResources();
0335     void slotEditSubtitle(const QMap<QString, QString> &subProperties = {});
0336     void slotTranscode(const QStringList &urls = QStringList());
0337     /** @brief Open the transcode to edit friendly format dialog. */
0338     void slotFriendlyTranscode(const QString &binId, bool checkProfile);
0339     /** @brief Add subtitle clip to timeline */
0340     void slotAddSubtitle(const QString &text = QString());
0341     /** @brief Ensure subtitle track is displayed */
0342     void showSubtitleTrack();
0343     /** @brief The path of the current document changed (save as), update render settings */
0344     void updateProjectPath(const QString &path);
0345     /** @brief Update compositing action to display current project setting. */
0346     void slotUpdateCompositeAction(bool enable);
0347     /** @brief Update duration of projet in timeline toolbar. */
0348     void slotUpdateProjectDuration(int pos);
0349     /** @brief Remove all unused clips from the project. */
0350     void slotCleanProject();
0351     void slotEditProjectSettings(int ix = 0);
0352 
0353 private slots:
0354     /** @brief Shows the shortcut dialog. */
0355     void slotEditKeys();
0356     void loadDockActions();
0357     /** @brief Reflects setting changes to the GUI. */
0358     void updateConfiguration();
0359     void slotConnectMonitors();
0360     void slotUpdateMousePosition(int pos, int duration = -1);
0361     void slotSwitchMarkersComments();
0362     void slotSwitchSnap();
0363     void slotShowTimelineTags();
0364     void slotRenderProject();
0365     void slotStopRenderProject();
0366     void slotFullScreen();
0367     /** @brief if modified is true adds "modified" to the caption and enables the save button.
0368      * (triggered by KdenliveDoc::setModified()) */
0369     void slotUpdateDocumentState(bool modified);
0370 
0371     /** @brief Sets the timeline zoom slider to @param value.
0372      *
0373      * Also disables zoomIn and zoomOut actions if they cannot be used at the moment. */
0374     void slotSetZoom(int value, bool zoomOnMouse = false);
0375     /** @brief Makes the timeline zoom level fit the timeline content. */
0376     void slotFitZoom();
0377     /** @brief Updates the zoom slider tooltip to fit @param zoomlevel. */
0378     void slotUpdateZoomSliderToolTip(int zoomlevel);
0379     /** @brief Timeline was zoom, update slider to reflect that */
0380     void updateZoomSlider(int value);
0381 
0382     /** @brief Displays the zoom slider tooltip.
0383      * @param zoomlevel (optional) The zoom level to show in the tooltip.
0384      *
0385      * Adopted from Dolphin (src/statusbar/dolphinstatusbar.cpp) */
0386     void slotShowZoomSliderToolTip(int zoomlevel = -1);
0387     /** @brief Deletes item in timeline, project tree or effect stack depending on focus. */
0388     void slotDeleteItem();
0389     void slotAddClipMarker();
0390     void slotDeleteClipMarker(bool allowGuideDeletion = false);
0391     void slotDeleteAllClipMarkers();
0392     void slotEditClipMarker();
0393 
0394     /** @brief Adds marker or guide at the current position without showing the marker dialog.
0395      *
0396      * Adds a marker if clip monitor is active, otherwise a guide.
0397      * The comment is set to the current position (therefore not dialog).
0398      * This can be useful to mark something during playback. */
0399     void slotAddMarkerGuideQuickly();
0400     void slotCutTimelineClip();
0401     void slotCutTimelineAllClips();
0402     void slotInsertClipOverwrite();
0403     void slotInsertClipInsert();
0404     void slotExtractZone();
0405     void slotLiftZone();
0406     void slotPreviewRender();
0407     void slotStopPreviewRender();
0408     void slotDefinePreviewRender();
0409     void slotRemovePreviewRender();
0410     void slotClearPreviewRender(bool resetZones = true);
0411     void slotSelectTimelineClip();
0412     void slotSelectTimelineTransition();
0413     void slotDeselectTimelineClip();
0414     void slotDeselectTimelineTransition();
0415     void slotSelectAddTimelineClip();
0416     void slotSelectAddTimelineTransition();
0417     void slotAddEffect(QAction *result);
0418     void slotAddTransition(QAction *result);
0419     void slotAddProjectClip(const QUrl &url, const QString &folderInfo);
0420     void slotAddTextNote(const QString &text);
0421     void slotAddProjectClipList(const QList<QUrl> &urls);
0422     void slotChangeTool(QAction *action);
0423     void slotChangeEdit(QAction *action);
0424     void slotSetTool(ToolType::ProjectTool tool);
0425     void slotSnapForward();
0426     void slotSnapRewind();
0427     void slotGuideForward();
0428     void slotGuideRewind();
0429     void slotClipStart();
0430     void slotClipEnd();
0431     void slotSelectClipInTimeline();
0432     void slotClipInTimeline(const QString &clipId, const QList<int> &ids);
0433 
0434     void slotInsertSpace();
0435     void slotRemoveSpace();
0436     void slotRemoveSpaceInAllTracks();
0437     void slotRemoveAllSpacesInTrack();
0438     void slotRemoveAllClipsInTrack();
0439     void slotAddGuide();
0440     void slotEditGuide();
0441     void slotExportGuides();
0442     void slotLockGuides(bool lock);
0443     void slotDeleteGuide();
0444     void slotDeleteAllGuides();
0445 
0446     void slotCopy();
0447     void slotPaste();
0448     void slotPasteEffects();
0449     void slotResizeItemStart();
0450     void slotResizeItemEnd();
0451     void configureNotifications();
0452     void slotSeparateAudioChannel();
0453     /** @brief Normalize audio channels before displaying them */
0454     void slotNormalizeAudioChannel();
0455     void slotInsertTrack();
0456     void slotDeleteTrack();
0457     /** @brief Show context menu to switch current track target audio stream. */
0458     void slotSwitchTrackAudioStream();
0459     void slotShowTrackRec(bool checked);
0460     /** @brief Select all clips in active track. */
0461     void slotSelectTrack();
0462     /** @brief Select all clips in timeline. */
0463     void slotSelectAllTracks();
0464     void slotUnselectAllTracks();
0465 #if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 98, 0)
0466     void slotGetNewKeyboardStuff(QComboBox *schemesList);
0467 #endif
0468     void slotAutoTransition();
0469     void slotRunWizard();
0470     void slotGroupClips();
0471     void slotUnGroupClips();
0472     void slotEditItemDuration();
0473     void slotClipInProjectTree();
0474     // void slotClipToProjectTree();
0475     void slotSplitAV();
0476     void slotSwitchClip();
0477     void slotSetAudioAlignReference();
0478     void slotAlignAudio();
0479     void slotUpdateTimelineView(QAction *action);
0480     void slotShowTimeline(bool show);
0481     void slotTranscodeClip();
0482     /** @brief Archive project: creates a copy of the project file with all clips in a new folder. */
0483     void slotArchiveProject();
0484     void slotSetDocumentRenderProfile(const QMap<QString, QString> &props);
0485 
0486     /** @brief Switches between displaying frames or timecode.
0487      * @param ix 0 = display timecode, 1 = display frames. */
0488     void slotUpdateTimecodeFormat(int ix);
0489 
0490     /** @brief Removes the focus of anything. */
0491     void slotRemoveFocus();
0492     void slotShutdown();
0493 
0494     void slotSwitchMonitors();
0495     void slotSwitchMonitorOverlay(QAction *);
0496     void slotSwitchDropFrames(bool drop);
0497     void slotSetMonitorGamma(int gamma);
0498     void slotCheckRenderStatus();
0499     void slotInsertZoneToTree();
0500     /** @brief Focus the timecode widget of current monitor. */
0501     void slotFocusTimecode();
0502 
0503     /** @brief The monitor informs that it needs (or not) to have frames sent by the renderer. */
0504     void slotMonitorRequestRenderFrame(bool request);
0505     /** @brief Update project because the use of proxy clips was enabled / disabled. */
0506     void slotUpdateProxySettings();
0507     /** @brief Disable proxies for this project. */
0508     void slotDisableProxies();
0509 
0510     /** @brief Process keyframe data sent from a clip to effect / transition stack. */
0511     void slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString &keyframes);
0512     /** @brief Move playhead to mouse cursor position if defined key is pressed */
0513     void slotAlignPlayheadToMousePos();
0514 
0515     void slotThemeChanged(const QString &name);
0516     /** @brief Close Kdenlive and try to restart it */
0517     void slotRestart(bool clean = false);
0518     void triggerKey(QKeyEvent *ev);
0519     /** @brief Update monitor overlay actions on monitor switch */
0520     void slotUpdateMonitorOverlays(int id, int code);
0521     /** @brief Update widget style */
0522     void slotChangeStyle(QAction *a);
0523     /** @brief Create temporary top track to preview an effect */
0524     void createSplitOverlay(std::shared_ptr<Mlt::Filter> filter);
0525     void removeSplitOverlay();
0526     /** @brief Create a generator's setup dialog */
0527     void buildGenerator(QAction *action);
0528     void slotCheckTabPosition();
0529     /** @brief Toggle automatic timeline preview on/off */
0530     void slotToggleAutoPreview(bool enable);
0531     void showTimelineToolbarMenu(const QPoint &pos);
0532     /** @brief Open Cached Data management dialog. */
0533     void slotManageCache();
0534     void showMenuBar(bool show);
0535     /** @brief Change forced icon theme setting (asks for app restart). */
0536     void forceIconSet(bool force);
0537     /** @brief Toggle current project's compositing mode. */
0538     void slotUpdateCompositing(bool checked);
0539     /** @brief Set timeline toolbar icon size. */
0540     void setTimelineToolbarIconSize(QAction *a);
0541     void slotEditItemSpeed();
0542     void slotRemapItemTime();
0543     /** @brief Request adjust of timeline track height */
0544     void resetTimelineTracks();
0545     /** @brief Set keyboard grabbing on current timeline item */
0546     void slotGrabItem();
0547     /** @brief Collapse or expand current item (depending on focused widget: effet, track)*/
0548     void slotCollapse();
0549     /** @brief Save currently selected timeline clip as bin subclip*/
0550     void slotExtractClip();
0551     /** @brief Save currently selected timeline clip as bin subclip*/
0552     void slotSaveZoneToBin();
0553     /** @brief Expand current timeline clip (recover clips and tracks from an MLT playlist) */
0554     void slotExpandClip();
0555     /** @brief Focus and activate an audio track from a shortcut sequence */
0556     void slotActivateAudioTrackSequence();
0557     /** @brief Focus and activate a video track from a shortcut sequence */
0558     void slotActivateVideoTrackSequence();
0559     /** @brief Select target for current track */
0560     void slotActivateTarget();
0561     /** @brief Enable/disable subtitle track */
0562     void slotDisableSubtitle();
0563     /** @brief Lock / unlock subtitle track */
0564     void slotLockSubtitle();
0565     /** @brief Import a subtitle file */
0566     void slotImportSubtitle();
0567     /** @brief Export a subtitle file */
0568     void slotExportSubtitle();
0569     /** @brief Start a speech recognition on timeline zone */
0570     void slotSpeechRecognition();
0571     /** @brief Copy debug information like lib versions, gpu mode state,... to clipboard */
0572     void slotCopyDebugInfo();
0573     void slotRemoveBinDock(const QString &name);
0574     /** @brief Focus the guides list search line */
0575     void slotSearchGuide();
0576 
0577 signals:
0578     Q_SCRIPTABLE void abortRenderJob(const QString &url);
0579     void configurationChanged();
0580     void GUISetupDone();
0581     void setPreviewProgress(int);
0582     void setRenderProgress(int);
0583     void displayMessage(const QString &, MessageType, int);
0584     void displaySelectionMessage(const QString &);
0585     void displayProgressMessage(const QString &, MessageType, int);
0586     /** @brief Project profile changed, update render widget accordingly. */
0587     void updateRenderWidgetProfile();
0588     /** @brief Clear asset view if itemId is displayed. */
0589     void clearAssetPanel(int itemId = -1);
0590     void assetPanelWarning(const QString service, const QString id, const QString message);
0591     void adjustAssetPanelRange(int itemId, int in, int out);
0592     /** @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. */
0593     void enableUndo(bool enable);
0594     bool focusTimeline(bool focus, bool highlight);
0595     void removeBinDock(const QString &name);
0596 };