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 | // copy file to clipboard after the screenshot has been made | ||||
362 | | ||||
363 | SpectacleConfig::AfterTakingScreenshotAction SpectacleConfig::afterTakingScreenshotAction() const | ||||
364 | { | ||||
365 | int doNothing = static_cast<int>(SpectacleConfig::AfterTakingScreenshotAction::DoNothing); | ||||
366 | return static_cast<SpectacleConfig::AfterTakingScreenshotAction>(mGeneralConfig.readEntry(QStringLiteral("afterTakingScreenshot"), doNothing)); | ||||
367 | } | ||||
368 | | ||||
369 | void SpectacleConfig::setAfterTakingScreenshotAction (SpectacleConfig::AfterTakingScreenshotAction action) | ||||
370 | { | ||||
371 | mGeneralConfig.writeEntry(QStringLiteral("afterTakingScreenshot"), static_cast<int>(action)); | ||||
372 | mGeneralConfig.sync(); | ||||
373 | } | ||||
374 | | ||||
361 | // copy file location to clipboard after saving | 375 | // copy file location to clipboard after saving | ||
362 | 376 | | |||
363 | bool SpectacleConfig::copySaveLocationToClipboard() const | 377 | bool SpectacleConfig::copySaveLocationToClipboard() const | ||
364 | { | 378 | { | ||
365 | return mGeneralConfig.readEntry(QStringLiteral("copySaveLocation"), false); | 379 | return mGeneralConfig.readEntry(QStringLiteral("copySaveLocation"), false); | ||
366 | } | 380 | } | ||
367 | 381 | | |||
368 | void SpectacleConfig::setCopySaveLocationToClipboard(bool enabled) | 382 | void SpectacleConfig::setCopySaveLocationToClipboard(bool enabled) | ||
Show All 36 Lines |