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)
76 static const qsizetype MaxPath {32767};
77 enum TimelineScrolling {
84 static ShotcutSettings &singleton();
88 QString language()
const;
89 void setLanguage(
const QString &);
90 double imageDuration()
const;
91 void setImageDuration(
double);
92 QString openPath()
const;
93 void setOpenPath(
const QString &);
94 QString savePath()
const;
95 void setSavePath(
const QString &);
96 QStringList recent()
const;
97 void setRecent(
const QStringList &);
98 QString theme()
const;
99 void setTheme(
const QString &);
100 QThread::Priority jobPriority()
const;
101 void setJobPriority(
const QString &);
102 bool showTitleBars()
const;
103 void setShowTitleBars(
bool);
104 bool showToolBar()
const;
105 void setShowToolBar(
bool);
106 bool textUnderIcons()
const;
107 void setTextUnderIcons(
bool);
108 bool smallIcons()
const;
109 void setSmallIcons(
bool);
110 QByteArray windowGeometry()
const;
111 void setWindowGeometry(
const QByteArray &);
112 QByteArray windowGeometryDefault()
const;
113 void setWindowGeometryDefault(
const QByteArray &);
114 QByteArray windowState()
const;
115 void setWindowState(
const QByteArray &);
116 QByteArray windowStateDefault()
const;
117 void setWindowStateDefault(
const QByteArray &);
118 QString viewMode()
const;
119 void setViewMode(
const QString &viewMode);
120 QString exportFrameSuffix()
const;
121 void setExportFrameSuffix(
const QString &suffix);
122 bool convertAdvanced()
const;
123 void setConvertAdvanced(
bool);
126 QString encodePath()
const;
127 void setEncodePath(
const QString &);
128 bool encodeFreeSpaceCheck()
const;
129 void setEncodeFreeSpaceCheck(
bool);
130 bool encodeUseHardware()
const;
131 void setEncodeUseHardware(
bool);
132 QStringList encodeHardware()
const;
133 void setEncodeHardware(
const QStringList &);
134 bool encodeAdvanced()
const;
135 void setEncodeAdvanced(
bool);
136 bool showConvertClipDialog()
const;
137 void setShowConvertClipDialog(
bool);
138 bool encodeParallelProcessing()
const;
139 void setEncodeParallelProcessing(
bool);
142 int playerAudioChannels()
const;
143 void setPlayerAudioChannels(
int);
144 QString playerDeinterlacer()
const;
145 void setPlayerDeinterlacer(
const QString &);
146 QString playerExternal()
const;
147 void setPlayerExternal(
const QString &);
148 bool playerGPU()
const;
149 void setPlayerGPU(
bool);
150 bool playerWarnGPU()
const;
151 QString playerInterpolation()
const;
152 void setPlayerInterpolation(
const QString &);
153 bool playerJACK()
const;
154 void setPlayerJACK(
bool);
155 int playerKeyerMode()
const;
156 void setPlayerKeyerMode(
int);
157 bool playerMuted()
const;
158 void setPlayerMuted(
bool);
159 QString playerProfile()
const;
160 void setPlayerProfile(
const QString &);
161 bool playerProgressive()
const;
162 void setPlayerProgressive(
bool);
163 bool playerRealtime()
const;
164 void setPlayerRealtime(
bool);
165 bool playerScrubAudio()
const;
166 void setPlayerScrubAudio(
bool);
167 int playerVolume()
const;
168 void setPlayerVolume(
int);
169 float playerZoom()
const;
170 void setPlayerZoom(
float);
171 int playerPreviewScale()
const;
172 void setPlayerPreviewScale(
int);
173 int playerVideoDelayMs()
const;
174 void setPlayerVideoDelayMs(
int);
175 double playerJumpSeconds()
const;
176 void setPlayerJumpSeconds(
double);
177 QString playerAudioDriver()
const;
178 void setPlayerAudioDriver(
const QString &s);
181 QString playlistThumbnails()
const;
182 void setPlaylistThumbnails(
const QString &);
183 bool playlistAutoplay()
const;
184 void setPlaylistAutoplay(
bool);
185 bool playlistShowColumn(
const QString &);
186 void setPlaylistShowColumn(
const QString &,
bool);
189 bool timelineDragScrub()
const;
190 void setTimelineDragScrub(
bool);
191 bool timelineShowWaveforms()
const;
192 void setTimelineShowWaveforms(
bool);
193 bool timelineShowThumbnails()
const;
194 void setTimelineShowThumbnails(
bool);
195 bool timelineRipple()
const;
196 void setTimelineRipple(
bool);
197 bool timelineRippleAllTracks()
const;
198 void setTimelineRippleAllTracks(
bool);
199 bool timelineRippleMarkers()
const;
200 void setTimelineRippleMarkers(
bool);
201 bool timelineSnap()
const;
202 void setTimelineSnap(
bool);
203 int timelineTrackHeight()
const;
204 void setTimelineTrackHeight(
int);
205 bool timelineScrollZoom()
const;
206 void setTimelineScrollZoom(
bool);
207 bool timelineFramebufferWaveform()
const;
208 void setTimelineFramebufferWaveform(
bool);
209 int audioReferenceTrack()
const;
210 void setAudioReferenceTrack(
int);
211 double audioReferenceSpeedRange()
const;
212 void setAudioReferenceSpeedRange(
double);
213 bool timelinePreviewTransition()
const;
214 void setTimelinePreviewTransition(
bool);
215 void setTimelineScrolling(TimelineScrolling value);
216 TimelineScrolling timelineScrolling()
const;
217 bool timelineAutoAddTracks()
const;
218 void setTimelineAutoAddTracks(
bool);
219 bool timelineRectangleSelect()
const;
220 void setTimelineRectangleSelect(
bool);
223 QString filterFavorite(
const QString &filterName);
224 void setFilterFavorite(
const QString &filterName,
const QString &value);
225 double audioInDuration()
const;
226 void setAudioInDuration(
double);
227 double audioOutDuration()
const;
228 void setAudioOutDuration(
double);
229 double videoInDuration()
const;
230 void setVideoInDuration(
double);
231 double videoOutDuration()
const;
232 void setVideoOutDuration(
double);
233 bool askOutputFilter()
const;
234 void setAskOutputFilter(
bool);
237 bool loudnessScopeShowMeter(
const QString &meter)
const;
238 void setLoudnessScopeShowMeter(
const QString &meter,
bool b);
241 void setMarkerColor(
const QColor &color);
242 QColor markerColor()
const;
243 void setMarkersShowColumn(
const QString &column,
bool b);
244 bool markersShowColumn(
const QString &column)
const;
245 void setMarkerSort(
int column, Qt::SortOrder order);
246 int getMarkerSortColumn();
247 Qt::SortOrder getMarkerSortOrder();
250 int drawMethod()
const;
251 void setDrawMethod(
int);
252 bool noUpgrade()
const;
253 void setNoUpgrade(
bool value);
254 bool checkUpgradeAutomatic();
255 void setCheckUpgradeAutomatic(
bool b);
256 bool askUpgradeAutomatic();
257 void setAskUpgradeAutomatic(
bool b);
260 QString appDataLocation()
const;
261 static void setAppDataForSession(
const QString &location);
262 void setAppDataLocally(
const QString &location);
265 QStringList layouts()
const;
266 bool setLayout(
const QString &name,
const QByteArray &geometry,
const QByteArray &state);
267 QByteArray layoutGeometry(
const QString &name);
268 QByteArray layoutState(
const QString &name);
269 bool removeLayout(
const QString &name);
270 int layoutMode()
const;
271 void setLayoutMode(
int mode = 0);
274 bool clearRecent()
const;
275 void setClearRecent(
bool);
276 QString projectsFolder()
const;
277 void setProjectsFolder(
const QString &path);
278 QString audioInput()
const;
279 void setAudioInput(
const QString &name);
280 QString videoInput()
const;
281 void setVideoInput(
const QString &name);
282 QString glaxnimatePath()
const;
283 void setGlaxnimatePath(
const QString &path);
284 bool exportRangeMarkers()
const;
285 void setExportRangeMarkers(
bool);
286 int undoLimit()
const;
287 bool warnLowMemory()
const;
288 int backupPeriod()
const;
289 void setBackupPeriod(
int i);
290 mlt_time_format timeFormat()
const;
291 void setTimeFormat(
int format);
294 bool proxyEnabled()
const;
295 void setProxyEnabled(
bool);
296 QString proxyFolder()
const;
297 void setProxyFolder(
const QString &path);
298 bool proxyUseProjectFolder()
const;
299 void setProxyUseProjectFolder(
bool);
300 bool proxyUseHardware()
const;
301 void setProxyUseHardware(
bool);
304 void clearShortcuts(
const QString &name);
305 void setShortcuts(
const QString &name,
const QList<QKeySequence> &shortcuts);
306 QList<QKeySequence> shortcuts(
const QString &name);
309 double slideshowClipDuration(
double defaultClipDuration)
const;
310 void setSlideshowClipDuration(
double clipDuration);
311 int slideshowAspectConversion(
int defaultAspectConversion)
const;
312 void setSlideshowAspectConversion(
int aspectConversion);
313 int slideshowZoomPercent(
int defaultZoomPercent)
const;
314 void setSlideshowZoomPercent(
int zoomPercent);
315 double slideshowTransitionDuration(
double defaultTransitionDuration)
const;
316 void setSlideshowTransitionDuration(
double transitionDuration);
317 int slideshowTransitionStyle(
int defaultTransitionStyle)
const;
318 void setSlideshowTransitionStyle(
int transitionStyle);
319 int slideshowTransitionSoftness(
int defaultTransitionSoftness)
const;
320 void setSlideshowTransitionSoftness(
int transitionSoftness);
326 void openPathChanged();
327 void savePathChanged();
328 void timelineDragScrubChanged();
329 void timelineShowWaveformsChanged();
330 void timelineShowThumbnailsChanged();
331 void timelineRippleChanged();
332 void timelineRippleAllTracksChanged();
333 void timelineRippleMarkersChanged();
334 void timelineSnapChanged();
335 void timelineScrollZoomChanged();
336 void timelineFramebufferWaveformChanged();
337 void playerAudioChannelsChanged(
int);
338 void playerGpuChanged();
339 void audioInDurationChanged();
340 void audioOutDurationChanged();
341 void videoInDurationChanged();
342 void videoOutDurationChanged();
343 void playlistThumbnailsChanged();
344 void viewModeChanged();
345 void smallIconsChanged();
346 void askOutputFilterChanged();
347 void timelineScrollingChanged();
348 void timelineAutoAddTracksChanged();
349 void timelineRectangleSelectChanged();
350 void timeFormatChanged();
353 explicit ShotcutSettings();
354 explicit ShotcutSettings(
const QString &appDataLocation);
355 void migrateRecent();
356 void migrateLayout();
359 QString m_appDataLocation;
363#define Settings ShotcutSettings::singleton()