digiKam
Digikam::ItemInfoCache Class Reference
+ Inheritance diagram for Digikam::ItemInfoCache:

Public Member Functions

QString albumRelativePath (int albumId)
 
void cacheByName (const QExplicitlySharedDataPointer< ItemInfoData > &infoPtr)
 
void dropInfo (const QExplicitlySharedDataPointer< ItemInfoData > &infoPtr)
 
int getImageGroupedCount (qlonglong id)
 
QExplicitlySharedDataPointer< ItemInfoDatainfoForId (qlonglong id)
 
QExplicitlySharedDataPointer< ItemInfoDatainfoForPath (int albumRootId, const QString &relativePath, const QString &name)
 
void invalidate ()
 
 ItemInfoCache ()
 
 ~ItemInfoCache () override
 

Constructor & Destructor Documentation

◆ ItemInfoCache()

Digikam::ItemInfoCache::ItemInfoCache ( )

◆ ~ItemInfoCache()

Digikam::ItemInfoCache::~ItemInfoCache ( )
override

Member Function Documentation

◆ albumRelativePath()

QString Digikam::ItemInfoCache::albumRelativePath ( int  albumId)

Returns the cached relativePath for the given album id.

Referenced by Digikam::ItemInfo::filePath().

◆ cacheByName()

void Digikam::ItemInfoCache::cacheByName ( const QExplicitlySharedDataPointer< ItemInfoData > &  infoPtr)

Call this to put data in the hash by file name if you have newly created data and the name is filled. Call under write lock.

References Digikam::ItemInfoData::id, and Digikam::ItemInfoData::name.

Referenced by Digikam::ItemInfo::fromLocationAlbumAndName(), Digikam::ItemInfo::ItemInfo(), and Digikam::ItemInfo::setName().

◆ dropInfo()

void Digikam::ItemInfoCache::dropInfo ( const QExplicitlySharedDataPointer< ItemInfoData > &  infoPtr)

Call this when the data has been dereferenced, before deletion.

References Digikam::ItemInfoData::id, and Digikam::ItemInfoData::name.

Referenced by Digikam::ItemInfo::operator=(), and Digikam::ItemInfo::~ItemInfo().

◆ getImageGroupedCount()

int Digikam::ItemInfoCache::getImageGroupedCount ( qlonglong  id)

◆ infoForId()

QExplicitlySharedDataPointer< ItemInfoData > Digikam::ItemInfoCache::infoForId ( qlonglong  id)

Return an ItemInfoData object for the given image id. A new object is created, or an existing object is returned. If a new object is created, the id field will be initialized.

References Digikam::ItemInfoData::id.

Referenced by Digikam::ItemInfo::fromLocationAlbumAndName(), and Digikam::ItemInfo::ItemInfo().

◆ infoForPath()

QExplicitlySharedDataPointer< ItemInfoData > Digikam::ItemInfoCache::infoForPath ( int  albumRootId,
const QString &  relativePath,
const QString &  name 
)

Return an ItemInfoData object for the given album root, relativePath and file name triple. Works if previously cached with cacheByName. Returns 0 if not found.

Referenced by Digikam::ItemInfo::fromLocationAlbumAndName().

◆ invalidate()

void Digikam::ItemInfoCache::invalidate ( )

Invalidate the cache and all its cached data

Referenced by Digikam::CoreDbAccess::setParameters().


The documentation for this class was generated from the following files: