Application-wide utilities, accessed via the application context property. More...
| Import Statement: | import org.shotcut.qml |
application is set as a context property on every Shotcut QML view. It cannot be instantiated from QML — use the global application identifier directly:
application.showStatusMessage("Ready") var t = application.clockFromFrames(150) var c = application.contrastingColor("red")
OS : string |
The operating system name: "Windows", "Linux", or "macOS".
devicePixelRatio : real |
The display device pixel ratio (e.g. 2.0 on HiDPI screens).
dialogModality : Qt::WindowModality |
The modality to use for dialogs launched from QML.
hasFiltersOnClipboard : bool |
Whether the clipboard currently contains copied filters. Notifies filtersCopied.
mainWinRect : rect |
The geometry of the main application window.
maxTextureSize : int |
The maximum supported GPU texture dimension in pixels.
mousePos : point |
The current global cursor screen coordinates.
toolTipBaseColor : color |
The background color of tooltips, derived from the current palette. Notifies paletteChanged.
toolTipTextColor : color |
The text color of tooltips, derived from the current palette. Notifies paletteChanged.
wipes : list<string> |
The list of available wipe transition file names.
filtersCopied() |
Emitted when filters are copied to the clipboard.
Note: The corresponding handler is onFiltersCopied.
filtersPasted() |
Emitted when filters are pasted from the clipboard.
Note: The corresponding handler is onFiltersPasted.
paletteChanged() |
Emitted when the application color palette changes (e.g. dark/light mode switch).
Note: The corresponding handler is onPaletteChanged.
string actionFirstShortcut(string actionName) |
Returns the first keyboard shortcut string for the action identified by actionName, or an empty string if none is assigned.
bool addWipe(string filePath) |
Adds a custom wipe transition image at filePath to the wipes list. Returns true on success.
int audioChannels() |
Returns the number of audio channels in the current project.
string clockFromFrames(int frames) |
Converts a frame number frames to a clock string (HH:MM:SS.mmm or HH:MM:SS:FF) at the current profile fps.
bool confirmOutputFilter() |
Prompts the user to confirm applying a filter to the timeline output. Returns true if the user confirms.
color contrastingColor(string color) |
Returns black or white, whichever contrasts better against color.
copyAllFilters() |
Copies all filters on the currently selected clip to the clipboard.
copyCurrentFilter() |
Copies the currently selected filter to the clipboard.
copyEnabledFilters() |
Copies only the checked (enabled) filters to the clipboard.
string getNextProjectFile(string filename) |
Returns a versioned file path for saving a new project-related file named filename (e.g. project-001.txt) next to the current project file.
bool intersects(rect a, rect b) |
Returns true if rectangle a intersects rectangle b.
bool isProjectFolder() |
Returns true if the current project is saved inside a project folder.
showAddOnFiltersDialog() |
Opens the Add-On Filters catalog dialog.
showStatusMessage(string message, int timeoutSeconds = 15) |
Displays message in the main window status bar for timeoutSeconds seconds.
string timeFromFrames(int frames) |
Converts a frame number frames to an MLT timecode string.