21#include <framework/mlt_types.h>
23#include <QKeySequence>
30class ShotcutSettings :
public QObject
33 Q_PROPERTY(
bool timelineDragScrub READ timelineDragScrub WRITE setTimelineDragScrub NOTIFY
34 timelineDragScrubChanged)
35 Q_PROPERTY(
bool timelineShowWaveforms READ timelineShowWaveforms WRITE setTimelineShowWaveforms
36 NOTIFY timelineShowWaveformsChanged)
37 Q_PROPERTY(
bool timelineShowThumbnails READ timelineShowThumbnails WRITE setTimelineShowThumbnails
38 NOTIFY timelineShowThumbnailsChanged)
39 Q_PROPERTY(
bool timelineRipple READ timelineRipple WRITE setTimelineRipple NOTIFY
40 timelineRippleChanged)
41 Q_PROPERTY(
bool timelineRippleAllTracks READ timelineRippleAllTracks WRITE
42 setTimelineRippleAllTracks NOTIFY timelineRippleAllTracksChanged)
43 Q_PROPERTY(
bool timelineRippleMarkers READ timelineRippleMarkers WRITE setTimelineRippleMarkers
44 NOTIFY timelineRippleMarkersChanged)
45 Q_PROPERTY(
bool timelineSnap READ timelineSnap WRITE setTimelineSnap NOTIFY timelineSnapChanged)
46 Q_PROPERTY(
bool timelineScrollZoom READ timelineScrollZoom WRITE setTimelineScrollZoom NOTIFY
47 timelineScrollZoomChanged)
48 Q_PROPERTY(
bool timelineFramebufferWaveform READ timelineFramebufferWaveform WRITE
49 setTimelineFramebufferWaveform NOTIFY timelineFramebufferWaveformChanged)
50 Q_PROPERTY(QString openPath READ openPath WRITE setOpenPath NOTIFY openPathChanged)
51 Q_PROPERTY(QString savePath READ savePath WRITE setSavePath NOTIFY savePathChanged)
52 Q_PROPERTY(QString playlistThumbnails READ playlistThumbnails WRITE setPlaylistThumbnails NOTIFY
53 playlistThumbnailsChanged)
54 Q_PROPERTY(QString viewMode READ viewMode WRITE setViewMode NOTIFY viewModeChanged)
55 Q_PROPERTY(
int playerAudioChannels READ playerAudioChannels NOTIFY playerAudioChannelsChanged)
56 Q_PROPERTY(
bool playerGPU READ playerGPU NOTIFY playerGpuChanged)
57 Q_PROPERTY(
double audioInDuration READ audioInDuration WRITE setAudioInDuration NOTIFY
58 audioInDurationChanged)
59 Q_PROPERTY(
double audioOutDuration READ audioOutDuration WRITE setAudioOutDuration NOTIFY
60 audioOutDurationChanged)
61 Q_PROPERTY(
double videoInDuration READ videoInDuration WRITE setVideoInDuration NOTIFY
62 videoInDurationChanged)
63 Q_PROPERTY(
double videoOutDuration READ videoOutDuration WRITE setVideoOutDuration NOTIFY
64 videoOutDurationChanged)
65 Q_PROPERTY(
bool smallIcons READ smallIcons WRITE setSmallIcons NOTIFY smallIconsChanged)
66 Q_PROPERTY(
bool askOutputFilter READ askOutputFilter WRITE setAskOutputFilter NOTIFY
67 askOutputFilterChanged)
68 Q_PROPERTY(QString appDataLocation READ appDataLocation CONSTANT)
69 Q_PROPERTY(TimelineScrolling timelineScrolling READ timelineScrolling WRITE setTimelineScrolling
70 NOTIFY timelineScrollingChanged)
71 Q_ENUMS(TimelineScrolling)
72 Q_PROPERTY(
bool timelineRectangleSelect READ timelineRectangleSelect WRITE
73 setTimelineRectangleSelect NOTIFY timelineRectangleSelectChanged)
74 Q_PROPERTY(
bool keyframesDragScrub READ keyframesDragScrub WRITE setKeyframesDragScrub
75 NOTIFY keyframesDragScrubChanged)
78 static const qsizetype MaxPath {32767};
79 enum TimelineScrolling {
86 static ShotcutSettings &singleton();
90 QString language()
const;
91 void setLanguage(
const QString &);
92 double imageDuration()
const;
93 void setImageDuration(
double);
94 QString openPath()
const;
95 void setOpenPath(
const QString &);
96 QString savePath()
const;
97 void setSavePath(
const QString &);
98 QStringList recent()
const;
99 void setRecent(
const QStringList &);
100 QStringList projects();
101 void setProjects(
const QStringList &);
102 QString theme()
const;
103 void setTheme(
const QString &);
104 QThread::Priority jobPriority()
const;
105 void setJobPriority(
const QString &);
106 bool showTitleBars()
const;
107 void setShowTitleBars(
bool);
108 bool showToolBar()
const;
109 void setShowToolBar(
bool);
110 bool textUnderIcons()
const;
111 void setTextUnderIcons(
bool);
112 bool smallIcons()
const;
113 void setSmallIcons(
bool);
114 QByteArray windowGeometry()
const;
115 void setWindowGeometry(
const QByteArray &);
116 QByteArray windowGeometryDefault()
const;
117 void setWindowGeometryDefault(
const QByteArray &);
118 QByteArray windowState()
const;
119 void setWindowState(
const QByteArray &);
120 QByteArray windowStateDefault()
const;
121 void setWindowStateDefault(
const QByteArray &);
122 QString viewMode()
const;
123 void setViewMode(
const QString &viewMode);
124 QString exportFrameSuffix()
const;
125 void setExportFrameSuffix(
const QString &suffix);
126 bool convertAdvanced()
const;
127 void setConvertAdvanced(
bool);
130 QString encodePath()
const;
131 void setEncodePath(
const QString &);
132 bool encodeFreeSpaceCheck()
const;
133 void setEncodeFreeSpaceCheck(
bool);
134 bool encodeUseHardware()
const;
135 void setEncodeUseHardware(
bool);
136 QStringList encodeHardware()
const;
137 void setEncodeHardware(
const QStringList &);
138 bool encodeAdvanced()
const;
139 void setEncodeAdvanced(
bool);
140 bool showConvertClipDialog()
const;
141 void setShowConvertClipDialog(
bool);
142 bool encodeParallelProcessing()
const;
143 void setEncodeParallelProcessing(
bool);
146 int playerAudioChannels()
const;
147 void setPlayerAudioChannels(
int);
148 QString playerDeinterlacer()
const;
149 void setPlayerDeinterlacer(
const QString &);
150 QString playerExternal()
const;
151 void setPlayerExternal(
const QString &);
152 bool playerGPU()
const;
153 void setPlayerGPU(
bool);
154 bool playerWarnGPU()
const;
155 QString playerInterpolation()
const;
156 void setPlayerInterpolation(
const QString &);
157 bool playerJACK()
const;
158 void setPlayerJACK(
bool);
159 int playerKeyerMode()
const;
160 void setPlayerKeyerMode(
int);
161 bool playerMuted()
const;
162 void setPlayerMuted(
bool);
163 QString playerProfile()
const;
164 void setPlayerProfile(
const QString &);
165 bool playerProgressive()
const;
166 void setPlayerProgressive(
bool);
167 bool playerRealtime()
const;
168 void setPlayerRealtime(
bool);
169 bool playerScrubAudio()
const;
170 void setPlayerScrubAudio(
bool);
171 int playerVolume()
const;
172 void setPlayerVolume(
int);
173 float playerZoom()
const;
174 void setPlayerZoom(
float);
175 int playerPreviewScale()
const;
176 void setPlayerPreviewScale(
int);
177 int playerVideoDelayMs()
const;
178 void setPlayerVideoDelayMs(
int);
179 double playerJumpSeconds()
const;
180 void setPlayerJumpSeconds(
double);
181 QString playerAudioDriver()
const;
182 void setPlayerAudioDriver(
const QString &s);
185 QString playlistThumbnails()
const;
186 void setPlaylistThumbnails(
const QString &);
187 bool playlistAutoplay()
const;
188 void setPlaylistAutoplay(
bool);
189 bool playlistShowColumn(
const QString &);
190 void setPlaylistShowColumn(
const QString &,
bool);
193 bool timelineDragScrub()
const;
194 void setTimelineDragScrub(
bool);
195 bool timelineShowWaveforms()
const;
196 void setTimelineShowWaveforms(
bool);
197 bool timelineShowThumbnails()
const;
198 void setTimelineShowThumbnails(
bool);
199 bool timelineRipple()
const;
200 void setTimelineRipple(
bool);
201 bool timelineRippleAllTracks()
const;
202 void setTimelineRippleAllTracks(
bool);
203 bool timelineRippleMarkers()
const;
204 void setTimelineRippleMarkers(
bool);
205 bool timelineSnap()
const;
206 void setTimelineSnap(
bool);
207 int timelineTrackHeight()
const;
208 void setTimelineTrackHeight(
int);
209 bool timelineScrollZoom()
const;
210 void setTimelineScrollZoom(
bool);
211 bool timelineFramebufferWaveform()
const;
212 void setTimelineFramebufferWaveform(
bool);
213 int audioReferenceTrack()
const;
214 void setAudioReferenceTrack(
int);
215 double audioReferenceSpeedRange()
const;
216 void setAudioReferenceSpeedRange(
double);
217 bool timelinePreviewTransition()
const;
218 void setTimelinePreviewTransition(
bool);
219 void setTimelineScrolling(TimelineScrolling value);
220 TimelineScrolling timelineScrolling()
const;
221 bool timelineAutoAddTracks()
const;
222 void setTimelineAutoAddTracks(
bool);
223 bool timelineRectangleSelect()
const;
224 void setTimelineRectangleSelect(
bool);
227 QString filterFavorite(
const QString &filterName);
228 void setFilterFavorite(
const QString &filterName,
const QString &value);
229 double audioInDuration()
const;
230 void setAudioInDuration(
double);
231 double audioOutDuration()
const;
232 void setAudioOutDuration(
double);
233 double videoInDuration()
const;
234 void setVideoInDuration(
double);
235 double videoOutDuration()
const;
236 void setVideoOutDuration(
double);
237 bool askOutputFilter()
const;
238 void setAskOutputFilter(
bool);
241 bool loudnessScopeShowMeter(
const QString &meter)
const;
242 void setLoudnessScopeShowMeter(
const QString &meter,
bool b);
245 void setMarkerColor(
const QColor &color);
246 QColor markerColor()
const;
247 void setMarkersShowColumn(
const QString &column,
bool b);
248 bool markersShowColumn(
const QString &column)
const;
249 void setMarkerSort(
int column, Qt::SortOrder order);
250 int getMarkerSortColumn();
251 Qt::SortOrder getMarkerSortOrder();
254 int drawMethod()
const;
255 void setDrawMethod(
int);
256 bool noUpgrade()
const;
257 void setNoUpgrade(
bool value);
258 bool checkUpgradeAutomatic();
259 void setCheckUpgradeAutomatic(
bool b);
260 bool askUpgradeAutomatic();
261 void setAskUpgradeAutomatic(
bool b);
262 bool askChangeVideoMode();
263 void setAskChangeVideoMode(
bool b);
266 QString appDataLocation()
const;
267 static void setAppDataForSession(
const QString &location);
268 void setAppDataLocally(
const QString &location);
271 QStringList layouts()
const;
272 bool setLayout(
const QString &name,
const QByteArray &geometry,
const QByteArray &state);
273 QByteArray layoutGeometry(
const QString &name);
274 QByteArray layoutState(
const QString &name);
275 bool removeLayout(
const QString &name);
276 int layoutMode()
const;
277 void setLayoutMode(
int mode = 0);
280 bool clearRecent()
const;
281 void setClearRecent(
bool);
282 QString projectsFolder()
const;
283 void setProjectsFolder(
const QString &path);
284 QString audioInput()
const;
285 void setAudioInput(
const QString &name);
286 QString videoInput()
const;
287 void setVideoInput(
const QString &name);
288 QString glaxnimatePath()
const;
289 void setGlaxnimatePath(
const QString &path);
290 bool exportRangeMarkers()
const;
291 void setExportRangeMarkers(
bool);
292 int undoLimit()
const;
293 bool warnLowMemory()
const;
294 int backupPeriod()
const;
295 void setBackupPeriod(
int i);
296 mlt_time_format timeFormat()
const;
297 void setTimeFormat(
int format);
300 bool proxyEnabled()
const;
301 void setProxyEnabled(
bool);
302 QString proxyFolder()
const;
303 void setProxyFolder(
const QString &path);
304 bool proxyUseProjectFolder()
const;
305 void setProxyUseProjectFolder(
bool);
306 bool proxyUseHardware()
const;
307 void setProxyUseHardware(
bool);
310 void clearShortcuts(
const QString &name);
311 void setShortcuts(
const QString &name,
const QList<QKeySequence> &shortcuts);
312 QList<QKeySequence> shortcuts(
const QString &name);
315 double slideshowClipDuration(
double defaultClipDuration)
const;
316 void setSlideshowClipDuration(
double clipDuration);
317 int slideshowAspectConversion(
int defaultAspectConversion)
const;
318 void setSlideshowAspectConversion(
int aspectConversion);
319 int slideshowZoomPercent(
int defaultZoomPercent)
const;
320 void setSlideshowZoomPercent(
int zoomPercent);
321 double slideshowTransitionDuration(
double defaultTransitionDuration)
const;
322 void setSlideshowTransitionDuration(
double transitionDuration);
323 int slideshowTransitionStyle(
int defaultTransitionStyle)
const;
324 void setSlideshowTransitionStyle(
int transitionStyle);
325 int slideshowTransitionSoftness(
int defaultTransitionSoftness)
const;
326 void setSlideshowTransitionSoftness(
int transitionSoftness);
329 bool keyframesDragScrub()
const;
330 void setKeyframesDragScrub(
bool);
333 void setSubtitlesShowColumn(
const QString &column,
bool b);
334 bool subtitlesShowColumn(
const QString &column)
const;
335 void setSubtitlesTrackTimeline(
bool b);
336 bool subtitlesTrackTimeline()
const;
337 void setSubtitlesShowPrevNext(
bool b);
338 bool subtitlesShowPrevNext()
const;
339 void setWhisperExe(
const QString &path);
340 QString whisperExe();
341 void setWhisperModel(
const QString &path);
342 QString whisperModel();
345 void setNotesZoom(
int zoom);
346 int notesZoom()
const;
352 void openPathChanged();
353 void savePathChanged();
354 void timelineDragScrubChanged();
355 void timelineShowWaveformsChanged();
356 void timelineShowThumbnailsChanged();
357 void timelineRippleChanged();
358 void timelineRippleAllTracksChanged();
359 void timelineRippleMarkersChanged();
360 void timelineSnapChanged();
361 void timelineScrollZoomChanged();
362 void timelineFramebufferWaveformChanged();
363 void playerAudioChannelsChanged(
int);
364 void playerGpuChanged();
365 void audioInDurationChanged();
366 void audioOutDurationChanged();
367 void videoInDurationChanged();
368 void videoOutDurationChanged();
369 void playlistThumbnailsChanged();
370 void viewModeChanged();
371 void smallIconsChanged();
372 void askOutputFilterChanged();
373 void timelineScrollingChanged();
374 void timelineAutoAddTracksChanged();
375 void timelineRectangleSelectChanged();
376 void timeFormatChanged();
377 void keyframesDragScrubChanged();
380 explicit ShotcutSettings();
381 explicit ShotcutSettings(
const QString &appDataLocation);
382 void migrateRecent();
383 void migrateLayout();
386 QString m_appDataLocation;
390#define Settings ShotcutSettings::singleton()