digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DbKeysCollection Class Referenceabstract

A class for managing / grouping database keys. More...

+ Inheritance diagram for Digikam::DbKeysCollection:

Public Member Functions

 DbKeysCollection (const QString &n)
 Default constructor.
 
QString collectionName () const
 Get the name of the DbKeysCollection.
 
QString getValue (const QString &key, ParseSettings &settings)
 Get a value from the database.
 
DbKeyIdsMap ids () const
 Get all IDs associated with this key collection.
 

Protected Member Functions

void addId (const QString &id, const QString &description)
 Add an ID to the key collection.
 
virtual QString getDbValue (const QString &key, ParseSettings &settings)=0
 Abstract method for retrieving the value from the database for the given key.
 

Detailed Description

This class manages database keys and provides methods to get the appropriate value from the database.

Constructor & Destructor Documentation

◆ DbKeysCollection()

Digikam::DbKeysCollection::DbKeysCollection ( const QString &  n)
explicit
Parameters
ncollection name

Member Function Documentation

◆ addId()

void Digikam::DbKeysCollection::addId ( const QString &  id,
const QString &  description 
)
protected
Parameters
idthe id of the database key
descriptiona short description of the database key

◆ collectionName()

QString Digikam::DbKeysCollection::collectionName ( ) const
Returns
the name of the collection

◆ getDbValue()

virtual QString Digikam::DbKeysCollection::getDbValue ( const QString &  key,
ParseSettings settings 
)
protectedpure virtual

This method has to be implemented by all child classes. It is called by the getValue() method.

Parameters
keythe key representing the value in the database
settingsthe ParseSettings object holding all relevant information about the image.
Returns
the value of the given database key
See also
DbKeysCollection::getValue()

Implemented in Digikam::CommonKeys, Digikam::MetadataKeys, and Digikam::PositionKeys.

◆ getValue()

QString Digikam::DbKeysCollection::getValue ( const QString &  key,
ParseSettings settings 
)
Parameters
keythe key representing the value in the database
settingsthe ParseSettings object holding all relevant information about the image.
Returns
the value of the given database key

◆ ids()

DbKeyIdsMap Digikam::DbKeysCollection::ids ( ) const
Returns
a map of all associated ids and their description