digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::AlbumThumbnailLoader Class Reference
+ Inheritance diagram for Digikam::AlbumThumbnailLoader:

Public Types

enum  RelativeSize { NormalSize , SmallerSize }
 Album thumbnail size is configurable via the settings menu. More...
 

Signals

void signalDispatchThumbnailInternal (int albumID, const QPixmap &thumbnail)
 Internal signal to dispatch Album thumbnail change.
 
void signalFailed (Album *album)
 This signal is emitted if thumbnail generation for given album failed.
 
void signalReloadThumbnails ()
 Indicates that all album and tag thumbnails need to be reloaded.
 
void signalThumbnail (Album *album, const QPixmap &)
 This signal is emitted as soon as a thumbnail has become available for given album.
 

Public Member Functions

void cleanUp ()
 
bool getAlbumThumbnail (PAlbum *const album)
 Request thumbnail for given album.
 
QPixmap getAlbumThumbnailDirectly (PAlbum *const album)
 Request thumbnail for given album, with slightly different behavior than the above method: If the thumbnail is already available in the cache, it is returned.
 
QPixmap getFaceThumbnailDirectly (TAlbum *const album)
 Loads face tag thumbnail, like getTagThumbnailDirectly() but loads thumbnails in the size for faces.
 
QPixmap getNewTagIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardAlbumIcon (PAlbum *const album, RelativeSize size=NormalSize)
 
QPixmap getStandardAlbumIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardAlbumRootIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardEmptyTrashIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardFaceIcon (TAlbum *const album, RelativeSize size=NormalSize)
 
QPixmap getStandardFullTrashIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardOfflineIcon (RelativeSize size=NormalSize)
 
QPixmap getStandardTagIcon (RelativeSize size=NormalSize)
 Return standard tag and album icons.
 
QPixmap getStandardTagIcon (TAlbum *const album, RelativeSize size=NormalSize)
 
QPixmap getStandardTagRootIcon (RelativeSize size=NormalSize)
 
bool getTagThumbnail (TAlbum *const album, QPixmap &icon)
 Behaves similar to the above method.
 
QPixmap getTagThumbnailDirectly (TAlbum *const album)
 Loads tag thumbnail, with slightly different behavior than the above method: If the thumbnail is already available in the cache, it is returned, already blended with the standard icon, if requested.
 
void setThumbnailSize (int size, int face)
 Change the size of the thumbnails.
 
int thumbnailSize () const
 Get the current default icon size.
 

Static Public Member Functions

static AlbumThumbnailLoaderinstance ()
 Return a preview of physical album directly without to use cache.
 

Protected Slots

void slotDispatchThumbnailInternal (int albumID, const QPixmap &thumbnail)
 
void slotGotThumbnailFromIcon (const LoadingDescription &loadingDescription, const QPixmap &pixmap)
 
void slotIconChanged (Album *album)
 

Friends

class AlbumThumbnailLoaderCreator
 

Member Enumeration Documentation

◆ RelativeSize

Some widgets use smaller icons than other widgets. These widgets do not need to know the currently set icon size from the setup and calculate a smaller size, but can simply request a relatively smaller icon. Depending on the user-chosen icon size, this size may in fact not be smaller than the normal size.

Member Function Documentation

◆ getAlbumThumbnail()

bool Digikam::AlbumThumbnailLoader::getAlbumThumbnail ( PAlbum *const  album)

The thumbnail will be loaded and returned asynchronously by the signals. If no thumbnail is associated with given album, no action will be taken, and false is returned.

◆ getAlbumThumbnailDirectly()

QPixmap Digikam::AlbumThumbnailLoader::getAlbumThumbnailDirectly ( PAlbum *const  album)

If the icon is not yet loaded, it will be returned asynchronously by the signals, and a default icon is returned here. If no icon is associated, the default icon is returned.

◆ getStandardTagIcon()

QPixmap Digikam::AlbumThumbnailLoader::getStandardTagIcon ( RelativeSize  size = NormalSize)

The third methods check if album is the root, and returns the standard icon or the root standard icon.

◆ getTagThumbnail()

bool Digikam::AlbumThumbnailLoader::getTagThumbnail ( TAlbum *const  album,
QPixmap &  icon 
)

Tag thumbnails will be processed as appropriate. Tags may have associated an icon that is loaded synchronously by the system icon loader. In this case, icon is set to this icon, and false is returned. If no icon is associated with the tag, icon is set to null, and false is returned. If a custom icon is associated with the tag, it is loaded asynchronously, icon is set to null, and true is returned. Tag thumbnails are always smaller than album thumbnails - as small as an album thumbnail with SmallerSize. They are supposed to be blended into the standard tag icon obtained below, or used as is when SmallerSize is requested anyway.

Returns
Returns true if icon is loaded asynchronously.

◆ getTagThumbnailDirectly()

QPixmap Digikam::AlbumThumbnailLoader::getTagThumbnailDirectly ( TAlbum *const  album)

If the icon is not yet loaded, it will be returned asynchronously by the signals (unblended), and a default icon is returned here. If no icon is associated, the default icon is returned.

◆ instance()

AlbumThumbnailLoader * Digikam::AlbumThumbnailLoader::instance ( )
static

Size of image can be passed as argument.

◆ setThumbnailSize()

void Digikam::AlbumThumbnailLoader::setThumbnailSize ( int  size,
int  face 
)

If the size differs from the current size, signalReloadThumbnails will be emitted.

◆ signalFailed

void Digikam::AlbumThumbnailLoader::signalFailed ( Album album)
signal

Same considerations as above.

◆ signalReloadThumbnails

void Digikam::AlbumThumbnailLoader::signalReloadThumbnails ( )
signal

This is usually because the icon size has changed in the setup.

◆ signalThumbnail

void Digikam::AlbumThumbnailLoader::signalThumbnail ( Album album,
const QPixmap &   
)
signal

This class is a singleton, so any object connected to this signal might not actually have requested a thumbnail for given url