Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleConfig.cpp
Show First 20 Lines • Show All 352 Lines • ▼ Show 20 Line(s) | |||||
353 | } | 353 | } | ||
354 | 354 | | |||
355 | void SpectacleConfig::setDefaultSaveLocation(const QUrl &location) | 355 | void SpectacleConfig::setDefaultSaveLocation(const QUrl &location) | ||
356 | { | 356 | { | ||
357 | mGeneralConfig.writePathEntry(QStringLiteral("default-save-location"), location.toString()); | 357 | mGeneralConfig.writePathEntry(QStringLiteral("default-save-location"), location.toString()); | ||
358 | mGeneralConfig.sync(); | 358 | mGeneralConfig.sync(); | ||
359 | } | 359 | } | ||
360 | 360 | | |||
361 | // auto save image after the screenshot has been made | ||||
362 | | ||||
363 | bool SpectacleConfig::autoSaveImage() const | ||||
364 | { | ||||
365 | return mGeneralConfig.readEntry(QStringLiteral("autoSaveImage"), false); | ||||
366 | } | ||||
367 | | ||||
368 | void SpectacleConfig::setAutoSaveImage(bool enabled) | ||||
369 | { | ||||
370 | mGeneralConfig.writeEntry(QStringLiteral("autoSaveImage"), enabled); | ||||
371 | mGeneralConfig.sync(); | ||||
372 | } | ||||
373 | | ||||
361 | // copy file location to clipboard after saving | 374 | // copy file location to clipboard after saving | ||
362 | 375 | | |||
363 | bool SpectacleConfig::copySaveLocationToClipboard() const | 376 | bool SpectacleConfig::copySaveLocationToClipboard() const | ||
364 | { | 377 | { | ||
365 | return mGeneralConfig.readEntry(QStringLiteral("copySaveLocation"), false); | 378 | return mGeneralConfig.readEntry(QStringLiteral("copySaveLocation"), false); | ||
366 | } | 379 | } | ||
367 | 380 | | |||
368 | void SpectacleConfig::setCopySaveLocationToClipboard(bool enabled) | 381 | void SpectacleConfig::setCopySaveLocationToClipboard(bool enabled) | ||
Show All 36 Lines |