File indexing completed on 2024-04-28 08:45:05

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