Scribus image cache manager.
More...
#include <scimagecachemanager.h>
|
|
typedef ScImageCacheDir::AccessCounter | AccessCounter |
| |
Scribus image cache manager.
- Author
- Marcus Holland-Moritz
| QString ScImageCacheManager::absolutePath |
( |
const QString & |
fn | ) |
|
|
static |
Convert relative to absolute path.
- Parameters
-
| fn | Path relative to the image cache root directory |
- Returns
- Absolute path
| bool ScImageCacheManager::acquireWriteLock |
( |
| ) |
|
Try to acquire a write lock.
- Returns
true if the write lock could be acquired, false otherwise
| int ScImageCacheManager::compressionLevel |
( |
| ) |
const |
Get cache image file compression level.
- Returns
- Current compression level
| bool ScImageCacheManager::enabled |
( |
void |
| ) |
const |
|
inline |
Check if the image cache is enabled.
- Returns
true if the cache is be enabled, false otherwise
Get image cache manager instance.
- Returns
- Reference to the singleton instance
| bool ScImageCacheManager::releaseWriteLock |
( |
| ) |
|
Release a write lock.
- Returns
true if the write lock could be released, false otherwise
| void ScImageCacheManager::removeMasterLock |
( |
| ) |
|
Remove master lock.
This method should only be called if a Scribus crash is detected. It will force the release of an existing master lock in order not to block other Scribus instances.
| bool ScImageCacheManager::setCompressionLevel |
( |
int |
level | ) |
|
Set cache image file compression level.
- Parameters
-
| level | Image compression level. -1 is the default compression level for PNG images. 0 is no compression, 1 is fastest comression and 9 is best compression. |
- Returns
true if the compression level could be set, false otherwise
| void ScImageCacheManager::setEnabled |
( |
bool |
enableCache | ) |
|
Enable/disable the image cache.
- Parameters
-
| enableCache | true if the cache should be enabled |
| bool ScImageCacheManager::setMaxCacheEntries |
( |
int |
maxCacheEntries | ) |
|
Set cache entry limit.
- Parameters
-
| maxCacheEntries | Maximum number of meta files in the cache |
- Returns
true if the cache entry limit could be set, false otherwise
| bool ScImageCacheManager::setMaxCacheSizeMiB |
( |
int |
maxCacheSizeMiB | ) |
|
Set cache size limit.
- Parameters
-
| maxCacheSizeMiB | Maximum cache size in MiB. |
- Returns
true if the cache size limit could be set, false otherwise
| bool ScImageCacheManager::updateAccess |
( |
const QString & |
dir, |
|
|
AccessCounter |
from, |
|
|
AccessCounter |
to |
|
) |
| |
Access update notification.
This method notifies the cache manager of an updated access file.
- Parameters
-
| dir | Path of updated directory relative to the image cache root directory |
| from | Previous access count |
| to | new access count |
- Returns
true if the access count could be updated, false otherwise
| bool ScImageCacheManager::updateFile |
( |
const QString & |
file | ) |
|
File update notification.
This method notifies the cache manager of an updated (i.e. newly created, changed or removed) file in the image cache.
- Parameters
-
| file | Path of updated file relative to the image cache root directory |
- Returns
true if the file information could be updated, false otherwise
The documentation for this class was generated from the following files:
- /Users/ale/src/Scribus/scribus/scimagecachemanager.h
- /Users/ale/src/Scribus/scribus/scimagecachemanager.cpp