digiKam
Digikam::DbKeysCollection Class Referenceabstract

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

+ Inheritance diagram for Digikam::DbKeysCollection:

Public Member Functions

QString collectionName () const
 
 DbKeysCollection (const QString &n)
 
QString getValue (const QString &key, ParseSettings &settings)
 
DbKeyIdsMap ids () const
 
virtual ~DbKeysCollection ()
 

Protected Member Functions

void addId (const QString &id, const QString &description)
 
virtual QString getDbValue (const QString &key, ParseSettings &settings)=0
 

Detailed Description

A class for managing / grouping database keys.

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

Default constructor.

Parameters
ncollection name

◆ ~DbKeysCollection()

Digikam::DbKeysCollection::~DbKeysCollection ( )
virtual

Member Function Documentation

◆ addId()

void Digikam::DbKeysCollection::addId ( const QString &  id,
const QString &  description 
)
protected

Add an ID to the key collection.

Parameters
idthe id of the database key
descriptiona short description of the database key

Referenced by Digikam::CommonKeys::CommonKeys(), Digikam::MetadataKeys::MetadataKeys(), and Digikam::PositionKeys::PositionKeys().

◆ collectionName()

QString Digikam::DbKeysCollection::collectionName ( ) const

Get the name of the DbKeysCollection

Returns
the name of the collection

◆ getDbValue()

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

Abstract method for retrieving the value from the database for the given key.

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::PositionKeys, Digikam::MetadataKeys, and Digikam::CommonKeys.

Referenced by getValue().

◆ getValue()

QString Digikam::DbKeysCollection::getValue ( const QString &  key,
ParseSettings settings 
)

Get a value from the database.

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

References getDbValue().

◆ ids()

DbKeyIdsMap Digikam::DbKeysCollection::ids ( ) const

Get all IDs associated with this key collection.

Returns
a map of all associated ids and their description

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