digiKam
|
Classes | |
class | Private |
Public Slots | |
void | start () |
void | stop () |
void | wait () |
Signals | |
void | finished () |
void | signalImageLoaded (const LoadingDescription &loadingDescription, const DImg &img) |
void | signalImageSaved (const QString &filePath, bool success) |
void | signalImageStartedLoading (const LoadingDescription &loadingDescription) |
void | signalImageStartedSaving (const QString &filePath) |
void | signalLoadingProgress (const LoadingDescription &loadingDescription, float progress) |
void | signalMoreCompleteLoadingAvailable (const LoadingDescription &oldLoadingDescription, const LoadingDescription &newLoadingDescription) |
void | signalSavingProgress (const QString &filePath, float progress) |
void | signalThumbnailLoaded (const LoadingDescription &loadingDescription, const QImage &img) |
void | signalThumbnailLoaded (const LoadingDescription &loadingDescription, const QPixmap &pix) |
NOTE: See LoadSaveThread for a QImage-based thumbnailLoaded() signal. More... | |
void | starting () |
void | ThumbnailLoaded (const LoadingDescription &, const QImage &) |
void | thumbnailsAvailable () |
NOTE: For internal use only. More... | |
Public Member Functions | |
void | find (const ThumbnailIdentifier &identifier) |
void | find (const ThumbnailIdentifier &identifier, const QRect &rect) |
void | find (const ThumbnailIdentifier &identifier, const QRect &rect, int size) |
bool | find (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap) |
bool | find (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap, int size) |
void | find (const ThumbnailIdentifier &identifier, int size) |
bool | find (const ThumbnailIdentifier &identifier, QPixmap &pixmap) |
bool | find (const ThumbnailIdentifier &identifier, QPixmap &pixmap, int size) |
void | findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathAndRects) |
void | findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathsAndRects, int size) |
void | findGroup (QList< ThumbnailIdentifier > &identifiers) |
void | findGroup (QList< ThumbnailIdentifier > &identifiers, int size) |
void | imageLoaded (const LoadingDescription &loadingDescription, const DImg &img) override |
void | imageSaved (const QString &filePath, bool success) override |
void | imageStartedLoading (const LoadingDescription &loadingDescription) override |
void | imageStartedSaving (const QString &filePath) override |
bool | isFinished () const |
bool | isRunning () const |
QList< LoadingDescription > | lastDescriptions () const |
void | load (const LoadingDescription &description) |
void | load (const LoadingDescription &description, LoadingPolicy policy) |
LoadingPolicy | loadingPolicy () const |
void | loadingProgress (const LoadingDescription &loadingDescription, float progress) override |
void | moreCompleteLoadingAvailable (const LoadingDescription &oldLoadingDescription, const LoadingDescription &newLoadingDescription) override |
int | pixmapToThumbnailSize (int size) const |
void | pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers) |
void | pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers, int size) |
void | preload (const ThumbnailIdentifier &identifier) |
void | preload (const ThumbnailIdentifier &identifier, int size) |
void | preloadGroup (QList< ThumbnailIdentifier > &identifiers) |
void | preloadGroup (QList< ThumbnailIdentifier > &identifiers, int size) |
QThread::Priority | priority () const |
virtual bool | querySendNotifyEvent () const |
void | save (const DImg &image, const QString &filePath, const QString &format) |
void | save (DImg &image, const QString &filePath, const QString &format) |
void | savingProgress (const QString &filePath, float progress) override |
void | setEmitSignals (bool emitThem) |
void | setHighlightPixmap (bool highlight) |
void | setLoadingPolicy (LoadingPolicy policy) |
void | setNotificationPolicy (NotificationPolicy notificationPolicy) |
void | setPixmapRequested (bool wantPixmap) |
void | setPriority (QThread::Priority priority) |
void | setSendSurrogatePixmap (bool send) |
void | setTerminationPolicy (TerminationPolicy terminationPolicy) |
void | setThumbnailSize (int size, bool forFace=false) |
State | state () const |
void | stopAllTasks () |
void | stopLoading (const LoadingDescription &desc, LoadingTaskFilter filter=LoadingTaskFilterAll) |
void | stopLoading (const QString &filePath=QString(), LoadingTaskFilter filter=LoadingTaskFilterAll) |
void | stopSaving (const QString &filePath=QString()) |
void | storeDetailThumbnail (const QString &filePath, const QRect &detailRect, const QImage &image, bool isFace=false) |
int | storedSize () const |
virtual void | taskHasFinished () |
TerminationPolicy | terminationPolicy () const |
ThumbnailCreator * | thumbnailCreator () const |
NOTE: For internal use - may only be used from the thread. More... | |
ThumbnailLoadThread (QObject *const parent=nullptr) | |
int | thumbnailToPixmapSize (int size) const |
~ThumbnailLoadThread () override | |
Static Public Member Functions | |
static void | cleanUp () |
static ThumbnailLoadThread * | defaultIconViewThread () |
static ThumbnailLoadThread * | defaultThread () |
static void | deleteThumbnail (const QString &filePath) |
static int | exifOrientation (const QString &filePath, const DMetadata &metadata, bool isRaw, bool fromRawEmbeddedPreview) |
static LoadSaveFileInfoProvider * | infoProvider () |
static void | initializeThumbnailDatabase (const DbEngineParameters ¶ms, ThumbnailInfoProvider *const provider=nullptr) |
static int | maximumThumbnailPixmapSize (bool withHighlighting) |
static int | maximumThumbnailSize () |
static void | setDisplayingWidget (QWidget *const widget) |
static void | setInfoProvider (LoadSaveFileInfoProvider *const infoProvider) |
static int | thumbnailToPixmapSize (bool withHighlight, int size) |
Protected Member Functions | |
void | load (const LoadingDescription &description, LoadingMode loadingMode, AccessMode mode=AccessModeReadWrite) |
void | load (const LoadingDescription &description, LoadingMode loadingMode, LoadingPolicy policy, AccessMode mode=AccessModeReadWrite) |
void | loadPreview (const LoadingDescription &description, LoadingPolicy policy) |
void | loadThumbnail (const LoadingDescription &description) |
void | notificationReceived () |
void | preloadThumbnail (const LoadingDescription &description) |
void | preloadThumbnailGroup (const QList< LoadingDescription > &descriptions) |
void | prependThumbnailGroup (const QList< LoadingDescription > &descriptions) |
void | run () override |
bool | runningFlag () const volatile |
void | shutDown () |
void | start (QMutexLocker &locker) |
void | stop (QMutexLocker &locker) |
QMutex * | threadMutex () const |
void | thumbnailLoaded (const LoadingDescription &loadingDescription, const QImage &img) override |
void | wait (QMutexLocker &locker) |
Protected Attributes | |
LoadSaveTask * | m_currentTask |
LoadingPolicy | m_loadingPolicy |
QMutex | m_mutex |
NotificationPolicy | m_notificationPolicy |
TerminationPolicy | m_terminationPolicy |
QList< LoadSaveTask * > | m_todo |
|
inherited |
used by SharedLoadSaveThread only
Enumerator | |
---|---|
AccessModeRead | image will only be used for reading |
AccessModeReadWrite | image data will possibly be changed |
|
inherited |
used by SharedLoadSaveThread only
Enumerator | |
---|---|
LoadingModeNormal | no sharing of loading process, no caching of image |
LoadingModeShared | loading process is shared, image is cached |
|
inherited |
Enumerator | |
---|---|
LoadingPolicyFirstRemovePrevious | Load image immediately, remove and stop all previous loading tasks. |
LoadingPolicyPrepend | Prepend loading in front of all other tasks, but wait for the current task to finish. No other tasks will be removed, preloading tasks will be stopped and postponed. |
LoadingPolicySimplePrepend | Prepend in front of all other tasks (not touching the current task). Do not check for duplicate tasks, do not check for preloading tasks. |
LoadingPolicyAppend | Append loading task to the end of the list, but in front of all preloading tasks. No other tasks will be removed, preloading tasks will be stopped and postponed. This is similar to the simple load() operation from LoadSaveThread, except for the special care taken for preloading. |
LoadingPolicySimpleAppend | Append to the lists of tasks. Do not check for duplicate tasks, do not check for preloading tasks. |
LoadingPolicyPreload | Preload image, i.e. load it with low priority when no other tasks are scheduled. All other tasks will take precedence, and preloading tasks will be stopped and postponed when another task is added. No progress info will be sent for preloaded images |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
explicit |
|
override |
|
static |
|
static |
|
static |
Return application-wide default thumbnail threads. It is perfectly all right to create an extra object of the class, but it is useful to have default object
Referenced by cleanUp(), Digikam::DeleteItemList::DeleteItemList(), Digikam::FindDuplicatesAlbum::FindDuplicatesAlbum(), Digikam::FuzzySearchView::FuzzySearchView(), and Digikam::ImageDialogPreview::ImageDialogPreview().
|
static |
This is a tool to force regeneration of thumbnails. All thumbnail files for the given file will be removed from disk, and the cached instances will be removed as well. Use this method if you know that the contents of the file has changed. This method works independently from the multithreaded thumbnail loading.
References Digikam::LoadingCache::cache(), Digikam::ThumbnailCreator::deleteThumbnailsFromDisk(), Digikam::LoadingDescription::possibleThumbnailCacheKeys(), Digikam::LoadingCache::removeThumbnail(), and Digikam::ThumbnailCreator::setThumbnailInfoProvider().
Referenced by Digikam::EditorWindow::moveFile(), Digikam::EditorWindow::movingSaveFileFinished(), Digikam::ItemViewUtilities::notifyFileContentChanged(), and Digikam::FileActionMngr::Private::slotImageDataChanged().
|
staticinherited |
Retrieves the Exif orientation, either from the info provider if available, or from the metadata
References Digikam::MetaEngineRotation::exifOrientation(), Digikam::MetaEngine::getItemOrientation(), Digikam::LoadSaveThread::infoProvider(), Digikam::MetaEngine::ORIENTATION_NORMAL, Digikam::MetaEngine::ORIENTATION_UNSPECIFIED, Digikam::LoadSaveFileInfoProvider::orientationHint(), and Digikam::MetaEngineRotation::toTransform().
Referenced by Digikam::DImg::exifOrientation().
void Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier | ) |
Find a thumbnail. This method sends the signals and does not return values like the method above. If you certainly need asynchronous return, connect with Qt::QueuedConnection to the signals. If you connect directly, the signals may be sent from within the method call.
References find(), and Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
const QRect & | rect | ||
) |
References find(), and Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
const QRect & | rect, | ||
int | size | ||
) |
References find().
bool Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
const QRect & | rect, | ||
QPixmap & | pixmap | ||
) |
All tastes of find() methods, for loading the thumbnail of a detail
References find(), and Digikam::ThumbnailLoadThread::Private::size.
bool Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
const QRect & | rect, | ||
QPixmap & | pixmap, | ||
int | size | ||
) |
References find().
void Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
int | size | ||
) |
Same as above, but does not use the global size, but an extra specified size.
References find().
bool Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
QPixmap & | pixmap | ||
) |
Find a thumbnail. If the pixmap is found in the cache, returns true and sets pixmap to the found QPixmap. If the pixmap is not found in the cache, load() is called to start the loading process, false is returned and pixmap is not touched.
References Digikam::ThumbnailLoadThread::Private::size.
Referenced by find(), Digikam::FaceItemRetriever::getThumbnails(), and Digikam::TableViewTreeView::pixmapForDrag().
bool Digikam::ThumbnailLoadThread::find | ( | const ThumbnailIdentifier & | identifier, |
QPixmap & | pixmap, | ||
int | size | ||
) |
Same as above, but does not use the global size, but an extra specified size.
References find().
void Digikam::ThumbnailLoadThread::findGroup | ( | const QList< QPair< ThumbnailIdentifier, QRect > > & | filePathAndRects | ) |
References findGroup(), and Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::findGroup | ( | const QList< QPair< ThumbnailIdentifier, QRect > > & | filePathsAndRects, |
int | size | ||
) |
void Digikam::ThumbnailLoadThread::findGroup | ( | QList< ThumbnailIdentifier > & | identifiers | ) |
Find a group of thumbnails. The items will be loaded in order and signals will be sent. Can be used to ensure that thumbnails are loaded in a particular order
References Digikam::ThumbnailLoadThread::Private::size.
Referenced by findGroup().
void Digikam::ThumbnailLoadThread::findGroup | ( | QList< ThumbnailIdentifier > & | identifiers, |
int | size | ||
) |
|
signalinherited |
|
overridevirtualinherited |
|
overridevirtualinherited |
Implements Digikam::LoadSaveNotifier.
References Digikam::LoadSaveThread::notificationReceived(), and Digikam::LoadSaveThread::signalImageSaved().
Referenced by Digikam::SavingTask::execute().
|
overridevirtualinherited |
Implements Digikam::LoadSaveNotifier.
References Digikam::LoadSaveThread::notificationReceived(), and Digikam::LoadSaveThread::signalImageStartedLoading().
Referenced by Digikam::SharedLoadingTask::execute().
|
overridevirtualinherited |
Implements Digikam::LoadSaveNotifier.
References Digikam::LoadSaveThread::notificationReceived(), and Digikam::LoadSaveThread::signalImageStartedSaving().
Referenced by Digikam::SavingTask::execute().
|
staticinherited |
Referenced by Digikam::LoadSaveThread::exifOrientation(), and Digikam::LoadSaveThread::setInfoProvider().
|
static |
Enable loading of thumbnails from a thumbnail database. This shall be called once at application startup. This need not be called, then the FreeDesktop standard is used. You can optionally provide a thumbnail info provider.
References Digikam::ThumbsDbAccess::checkReadyForUse(), Digikam::ThumbsDbAccess::setParameters(), and Digikam::ThumbnailCreator::ThumbnailDatabase.
Referenced by Digikam::AlbumManager::setDatabase().
|
inherited |
References Digikam::DynamicThread::Inactive.
|
inherited |
QList< LoadingDescription > Digikam::ThumbnailLoadThread::lastDescriptions | ( | ) | const |
Returns the descriptions used by the last call to any of the above methods. After calling single-thumbnail methods (find, preload) the list will have size 1, after the group methods (findGroup, preloadGroup, pregenerateGroup) the list can be larger than 1. There is no information if the description was ever scheduled in the thread, already processed, skipped or canceled.
References Digikam::ThumbnailLoadThread::Private::lastDescriptions.
Referenced by Digikam::ThumbnailImageCatcher::enqueue(), and Digikam::ThumbnailLoadThread::Private::makeDescriptions().
void Digikam::ThumbnailLoadThread::load | ( | const LoadingDescription & | description | ) |
Load a thumbnail. You do not need to use this method directly, it will not access the pixmap cache. Use find(). The LoadingDescription shall be constructed with the constructor for preview/thumbnail jobs. (in the description constructor, you need to specify file path, thumbnail size and Exif rotation)
Referenced by preload().
|
protectedinherited |
|
protectedinherited |
References Digikam::ManagedLoadSaveThread::load(), Digikam::LoadingTask::loadingDescription(), Digikam::ManagedLoadSaveThread::LoadingPolicyAppend, Digikam::ManagedLoadSaveThread::LoadingPolicyFirstRemovePrevious, Digikam::ManagedLoadSaveThread::LoadingPolicyPreload, Digikam::ManagedLoadSaveThread::LoadingPolicyPrepend, Digikam::ManagedLoadSaveThread::LoadingPolicySimpleAppend, Digikam::ManagedLoadSaveThread::LoadingPolicySimplePrepend, Digikam::ManagedLoadSaveThread::LoadingTaskFilterAll, Digikam::ManagedLoadSaveThread::LoadingTaskFilterPreloading, Digikam::LoadingTask::LoadingTaskStatusLoading, Digikam::LoadingTask::LoadingTaskStatusStopping, Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_todo, Digikam::LoadingTask::setStatus(), Digikam::DynamicThread::start(), and Digikam::DynamicThread::threadMutex().
|
inherited |
|
inherited |
References Digikam::ManagedLoadSaveThread::m_loadingPolicy.
|
overridevirtualinherited |
Implements Digikam::LoadSaveNotifier.
References Digikam::LoadSaveThread::notificationReceived(), and Digikam::LoadSaveThread::signalLoadingProgress().
Referenced by Digikam::LoadingTask::progressInfo().
|
protectedinherited |
References Digikam::ManagedLoadSaveThread::load(), and Digikam::ManagedLoadSaveThread::LoadingModeShared.
Referenced by Digikam::PreviewLoadThread::load().
|
protectedinherited |
|
static |
References Digikam::ThumbnailSize::maxThumbsSize().
Referenced by Digikam::ItemThumbnailDelegate::maximumSize().
|
static |
Returns the maximum possible size of a thumbnail. If you request a larger size, the thumbnail will not load. The size of the pixmap can slightly differ, especially when highlighting.
References Digikam::ThumbnailSize::maxThumbsSize().
Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), and Digikam::ThumbsTask::ThumbsTask().
|
overridevirtualinherited |
|
protectedinherited |
References Digikam::LoadSaveThread::m_notificationPolicy, Digikam::LoadSaveThread::NotificationPolicyDirect, and Digikam::LoadSaveThread::NotificationPolicyTimeLimited.
Referenced by Digikam::LoadSaveThread::imageLoaded(), Digikam::LoadSaveThread::imageSaved(), Digikam::LoadSaveThread::imageStartedLoading(), Digikam::LoadSaveThread::imageStartedSaving(), Digikam::LoadSaveThread::loadingProgress(), Digikam::LoadSaveThread::moreCompleteLoadingAvailable(), Digikam::LoadSaveThread::savingProgress(), and Digikam::LoadSaveThread::thumbnailLoaded().
int Digikam::ThumbnailLoadThread::pixmapToThumbnailSize | ( | int | size | ) | const |
Computes the thumbnail size for the give pixmap size.
References Digikam::ThumbnailLoadThread::Private::thumbnailSizeForPixmapSize().
void Digikam::ThumbnailLoadThread::pregenerateGroup | ( | const QList< ThumbnailIdentifier > & | identifiers | ) |
Pregenerate the thumbnail group. No signals will be emitted when these are loaded.
References Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::pregenerateGroup | ( | const QList< ThumbnailIdentifier > & | identifiers, |
int | size | ||
) |
void Digikam::ThumbnailLoadThread::preload | ( | const ThumbnailIdentifier & | identifier | ) |
Preload the thumbnail or thumbnail group. This is essentially the same as loading, but with a lower priority.
References Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::preload | ( | const ThumbnailIdentifier & | identifier, |
int | size | ||
) |
void Digikam::ThumbnailLoadThread::preloadGroup | ( | QList< ThumbnailIdentifier > & | identifiers | ) |
References Digikam::ThumbnailLoadThread::Private::size.
void Digikam::ThumbnailLoadThread::preloadGroup | ( | QList< ThumbnailIdentifier > & | identifiers, |
int | size | ||
) |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
References Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_todo, Digikam::DynamicThread::start(), and Digikam::DynamicThread::threadMutex().
Referenced by findGroup().
|
inherited |
Referenced by Digikam::DynamicThread::setPriority().
|
virtualinherited |
References Digikam::LoadSaveThread::m_notificationPolicy, Digikam::LoadSaveThread::NotificationPolicyDirect, and Digikam::LoadSaveThread::NotificationPolicyTimeLimited.
Referenced by Digikam::LoadingTask::progressInfo(), Digikam::SavingTask::progressInfo(), and Digikam::SharedLoadingTask::querySendNotifyEvent().
|
overrideprotectedvirtualinherited |
Implement this pure virtual function in your subclass.
Implements Digikam::DynamicThread.
References Digikam::LoadSaveTask::execute(), Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_notificationPolicy, Digikam::LoadSaveThread::m_todo, Digikam::LoadSaveThread::NotificationPolicyTimeLimited, Digikam::DynamicThread::runningFlag(), Digikam::DynamicThread::stop(), and Digikam::DynamicThread::threadMutex().
|
protectedinherited |
In you run() method, you shall regularly check for runningFlag() and cleanup and return if false.
Referenced by Digikam::ImageHistogram::calculate(), Digikam::RawProcessingFilter::continueQuery(), Digikam::LoadSaveThread::run(), Digikam::ScanStateFilter::run(), and Digikam::NREstimate::startAnalyse().
|
inherited |
Append a task to save the image to the task list
References Digikam::LoadSaveThread::m_todo, Digikam::DynamicThread::start(), and Digikam::DynamicThread::threadMutex().
|
inherited |
Append a task to save the image to the task list
References Digikam::ManagedLoadSaveThread::load(), Digikam::LoadingTask::loadingDescription(), Digikam::ManagedLoadSaveThread::LoadingPolicyPreload, Digikam::ManagedLoadSaveThread::LoadingTaskFilterPreloading, Digikam::LoadingTask::LoadingTaskStatusStopping, Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_todo, Digikam::LoadingTask::setStatus(), Digikam::DynamicThread::start(), and Digikam::DynamicThread::threadMutex().
|
overridevirtualinherited |
Implements Digikam::LoadSaveNotifier.
References Digikam::LoadSaveThread::notificationReceived(), and Digikam::LoadSaveThread::signalSavingProgress().
Referenced by Digikam::SavingTask::progressInfo().
|
static |
For color management, this sets the widget the thumbnails will be color managed for. (currently it is only possible to set one global widget)
References Digikam::IccManager::displayProfile().
Referenced by Digikam::DigikamApp::DigikamApp().
|
inherited |
void Digikam::ThumbnailLoadThread::setHighlightPixmap | ( | bool | highlight | ) |
If you enable this, a highlighting border will be drawn around the pixmap. This option has only an effect if pixmapRequested is true. Default value: Enabled.
References Digikam::ThumbnailLoadThread::Private::highlight.
|
staticinherited |
References Digikam::LoadSaveThread::infoProvider().
Referenced by Digikam::DigikamApp::DigikamApp().
|
inherited |
Set the loading policy. Default is LoadingPolicyAppend. You can override the default value for each operation.
References Digikam::ManagedLoadSaveThread::m_loadingPolicy.
Referenced by Digikam::FacePreviewLoader::FacePreviewLoader().
|
inherited |
References Digikam::LoadSaveThread::m_notificationPolicy.
void Digikam::ThumbnailLoadThread::setPixmapRequested | ( | bool | wantPixmap | ) |
If you enable this, the signal thumbnailLoaded(LoadingDescription, QPixmap) will be emitted. If you do not enable this, only the QImage-based signal (see LoadSaveThread) will be emitted.
If you disable this, pay attention to the (global) setting of the LoadingCache, which per default does not cache the images !!
Default value: Enabled.
References Digikam::ThumbnailLoadThread::Private::wantPixmap.
Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), DigikamGenericMetadataEditPlugin::MetadataEditDialog::MetadataEditDialog(), and Digikam::ThumbsTask::ThumbsTask().
|
inherited |
Sets the priority for this dynamic thread. Can be set anytime. If the thread is currently not running, the priority will be set when it is run next time. When you set QThread::InheritPriority (default), the priority is not changed but inherited from the thread pool.
References Digikam::DynamicThread::priority().
Referenced by Digikam::FacePipeline::Private::applyPriority(), and Digikam::FacePipeline::Private::createThumbnailLoadThread().
void Digikam::ThumbnailLoadThread::setSendSurrogatePixmap | ( | bool | send | ) |
If you enable this, the thread will try hard to send a pixmap if thumbnail loading failed. It will use standard system icons to replace the real thumbnail. If you disable this, a null QPixmap will be sent. This does not influence the QImage-based signal; this signal will be emitted with a null QImage regardless of this setting here, if the loading failed. Default value: Enabled.
References Digikam::ThumbnailLoadThread::Private::sendSurrogate.
Referenced by ShowFoto::Showfoto::Showfoto().
|
inherited |
void Digikam::ThumbnailLoadThread::setThumbnailSize | ( | int | size, |
bool | forFace = false |
||
) |
NOTE: If the thread is currently loading thumbnails, there is no guarantee as to when the property change by one of the following methods takes effect. Set the requested thumbnail size. Default value: 128
References Digikam::ThumbnailLoadThread::Private::creator, Digikam::ThumbnailCreator::setThumbnailSize(), and Digikam::ThumbnailLoadThread::Private::size.
Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), DigikamGenericMetadataEditPlugin::MetadataEditDialog::MetadataEditDialog(), ShowFoto::Showfoto::Showfoto(), and Digikam::ThumbsTask::ThumbsTask().
|
protectedinherited |
References Digikam::ManagedLoadSaveThread::LoadingTaskFilterAll, Digikam::ManagedLoadSaveThread::LoadingTaskFilterPreloading, Digikam::LoadingTask::LoadingTaskStatusStopping, Digikam::LoadSaveThread::m_currentTask, Digikam::ManagedLoadSaveThread::m_terminationPolicy, Digikam::LoadingTask::setStatus(), Digikam::DynamicThread::shutDown(), Digikam::ManagedLoadSaveThread::stopAllTasks(), Digikam::ManagedLoadSaveThread::TerminationPolicyTerminateAll, Digikam::ManagedLoadSaveThread::TerminationPolicyTerminateLoading, Digikam::ManagedLoadSaveThread::TerminationPolicyTerminatePreloading, Digikam::ManagedLoadSaveThread::TerminationPolicyWait, and Digikam::DynamicThread::threadMutex().
Referenced by Digikam::ManagedLoadSaveThread::~ManagedLoadSaveThread(), and ~ThumbnailLoadThread().
|
signalinherited |
This signal is emitted when the loading process has finished. If the process failed, img is null.
Referenced by Digikam::FacePreviewLoader::FacePreviewLoader(), and Digikam::LoadSaveThread::imageLoaded().
|
signalinherited |
Referenced by Digikam::LoadSaveThread::imageSaved().
|
signalinherited |
All signals are delivered to the thread from where the LoadSaveThread object has been created. This thread must use its event loop to get the signals. You must connect to these signals with Qt::AutoConnection (default) or Qt::QueuedConnection. This signal is emitted when the loading process begins.
Referenced by Digikam::LoadSaveThread::imageStartedLoading().
|
signalinherited |
Referenced by Digikam::LoadSaveThread::imageStartedSaving().
|
signalinherited |
This signal is emitted whenever new progress info is available and the notification policy allows emitting the signal. No progress info will be sent for preloaded images (ManagedLoadSaveThread).
Referenced by Digikam::LoadSaveThread::loadingProgress().
|
signalinherited |
This signal is emitted if
Referenced by Digikam::LoadSaveThread::moreCompleteLoadingAvailable().
|
signalinherited |
Referenced by Digikam::LoadSaveThread::savingProgress().
|
signalinherited |
Referenced by Digikam::LoadSaveThread::thumbnailLoaded().
|
signal |
NOTE: See LoadSaveThread for a QImage-based thumbnailLoaded() signal.
|
slotinherited |
Referenced by Digikam::ImageHistogram::calculateInThread(), Digikam::FacePreviewLoader::checkRestart(), Digikam::ImageHistogram::getCount(), Digikam::ImageHistogram::getMaximum(), Digikam::ImageHistogram::getMean(), Digikam::ImageHistogram::getMedian(), Digikam::ImageHistogram::getStdDev(), Digikam::LoadSaveThread::load(), Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::loadThumbnail(), Digikam::DImgThreadedFilter::multithreadedSteps(), Digikam::ManagedLoadSaveThread::preloadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnailGroup(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), Digikam::ScanStateFilter::process(), Digikam::LoadSaveThread::save(), Digikam::ManagedLoadSaveThread::save(), and Digikam::DImgThreadedFilter::startFilter().
|
protectedinherited |
Doing the same as start(), stop() and wait above, provide it with a locked QMutexLocker on mutex(). Note the start() will unlock and relock for scheduling once, after state change.
References Digikam::ThreadManager::instance(), and Digikam::ThreadManager::schedule().
|
signalinherited |
Emitted if emitSignals is enabled
|
inherited |
|
slotinherited |
Stop computation, sets the running flag to false.
Referenced by Digikam::WBFilter::autoExposureAdjustement(), Digikam::DImgThreadedFilter::cancelFilter(), Digikam::DImgThreadedFilter::multithreadedSteps(), Digikam::LoadSaveThread::run(), Digikam::ScanStateFilter::run(), Digikam::DynamicThread::shutDown(), Digikam::FacePreviewLoader::slotImageLoaded(), Digikam::FacePipeline::Private::stop(), and Digikam::ImageHistogram::stopCalculation().
|
protectedinherited |
|
inherited |
References Digikam::LoadingTask::LoadingTaskStatusStopping, Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_todo, Digikam::SavingTask::SavingTaskStatusStopping, Digikam::LoadingTask::setStatus(), Digikam::SavingTask::setStatus(), Digikam::LoadSaveTask::TaskTypeLoading, Digikam::LoadSaveTask::TaskTypeSaving, Digikam::DynamicThread::threadMutex(), and Digikam::LoadSaveTask::type().
Referenced by Digikam::FacePreviewLoader::cancel(), cleanUp(), Digikam::ManagedLoadSaveThread::shutDown(), and Digikam::FacePipeline::Private::stop().
|
inherited |
Same than previous method, but Stop and remove tasks filtered by LoadingDescription.
References Digikam::DynamicThread::threadMutex().
|
inherited |
Stop and remove tasks filtered by filePath and policy. If filePath isNull, applies to all file paths.
References Digikam::DynamicThread::threadMutex().
Referenced by Digikam::EditorCore::load().
|
inherited |
Stop and remove saving tasks filtered by filePath. If filePath isNull, applies to all file paths.
References Digikam::SavingTask::filePath(), Digikam::LoadSaveThread::m_currentTask, Digikam::LoadSaveThread::m_todo, Digikam::SavingTask::SavingTaskStatusStopping, Digikam::SavingTask::setStatus(), Digikam::LoadSaveTask::TaskTypeSaving, Digikam::DynamicThread::threadMutex(), and Digikam::LoadSaveTask::type().
Referenced by Digikam::EditorCore::abortSaving().
void Digikam::ThumbnailLoadThread::storeDetailThumbnail | ( | const QString & | filePath, |
const QRect & | detailRect, | ||
const QImage & | image, | ||
bool | isFace = false |
||
) |
Stores the given detail thumbnail on disk. Use this if possible because generation of detail thumbnails is potentially slower. The image should at least have storedSize().
References Digikam::ThumbnailLoadThread::Private::creator, and Digikam::ThumbnailCreator::storeDetailThumbnail().
Referenced by Digikam::FaceUtils::storeThumbnails().
int Digikam::ThumbnailLoadThread::storedSize | ( | ) | const |
|
virtualinherited |
|
inherited |
References Digikam::ManagedLoadSaveThread::m_terminationPolicy.
Referenced by Digikam::ManagedLoadSaveThread::setTerminationPolicy().
|
protectedinherited |
This is the non-recursive mutex used to protect state variables and waiting in this class. You can use it if you want to protect your memory in the same scope as calling start, stop or wait, then using the QMutexLocker variants below. Note that when you have locked this mutex, you must use these variants, as the mutex is non-recursive.
Referenced by Digikam::ScanStateFilter::dispatch(), Digikam::LoadSaveThread::load(), Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::loadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnailGroup(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), Digikam::ScanStateFilter::process(), Digikam::LoadSaveThread::run(), Digikam::ScanStateFilter::run(), Digikam::LoadSaveThread::save(), Digikam::ManagedLoadSaveThread::save(), Digikam::ManagedLoadSaveThread::shutDown(), Digikam::ManagedLoadSaveThread::stopAllTasks(), Digikam::ManagedLoadSaveThread::stopLoading(), Digikam::ManagedLoadSaveThread::stopSaving(), and Digikam::LoadSaveThread::taskHasFinished().
ThumbnailCreator * Digikam::ThumbnailLoadThread::thumbnailCreator | ( | ) | const |
NOTE: For internal use - may only be used from the thread.
References Digikam::ThumbnailLoadThread::Private::creator.
Referenced by Digikam::ThumbnailLoadingTask::ThumbnailLoadingTask().
|
signal |
|
overrideprotectedvirtual |
virtual method overridden from LoadSaveNotifier, implemented first by LoadSaveThread called by ThumbnailTask from working thread
Reimplemented from Digikam::LoadSaveThread.
References Digikam::LoadingDescription::cacheKey(), Digikam::ThumbnailLoadThread::Private::collectedResults, Digikam::ThumbnailLoadThread::Private::notifiedForResults, Digikam::ThumbnailLoadThread::Private::resultsMutex, Digikam::LoadSaveThread::thumbnailLoaded(), thumbnailsAvailable(), and Digikam::ThumbnailLoadThread::Private::wantPixmap.
|
signal |
NOTE: For internal use only.
Referenced by thumbnailLoaded(), and ThumbnailLoadThread().
|
static |
int Digikam::ThumbnailLoadThread::thumbnailToPixmapSize | ( | int | size | ) | const |
Computes the pixmap size for the give thumbnail size. These can differ when highlighting is turned on.
References Digikam::ThumbnailLoadThread::Private::pixmapSizeForThumbnailSize().
Referenced by Digikam::ItemThumbnailDelegate::updateContentWidth().
|
slotinherited |
Waits until the thread finishes. Typically, call stop() before.
Referenced by Digikam::DImgThreadedFilter::cancelFilter(), cleanUp(), Digikam::DynamicThread::shutDown(), Digikam::FacePreviewLoader::slotImageLoaded(), Digikam::ImageHistogram::stopCalculation(), and Digikam::FacePipeline::Private::wait().
|
protectedinherited |
|
protectedinherited |
Referenced by Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), Digikam::LoadSaveThread::run(), Digikam::ManagedLoadSaveThread::save(), Digikam::ManagedLoadSaveThread::shutDown(), Digikam::ManagedLoadSaveThread::stopAllTasks(), Digikam::ManagedLoadSaveThread::stopSaving(), and Digikam::LoadSaveThread::taskHasFinished().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by Digikam::LoadSaveThread::load(), Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::loadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnailGroup(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), Digikam::LoadSaveThread::run(), Digikam::LoadSaveThread::save(), Digikam::ManagedLoadSaveThread::save(), Digikam::ManagedLoadSaveThread::stopAllTasks(), and Digikam::ManagedLoadSaveThread::stopSaving().