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