digiKam
coredbfields.h File Reference

Go to the source code of this file.

Classes

class  Digikam::DatabaseFields::DatabaseFieldsEnumIterator< FieldName >
 
class  Digikam::DatabaseFields::DatabaseFieldsEnumIteratorSetOnly< FieldName >
 
class  Digikam::DatabaseFields::FieldMetaInfo< FieldName >
 
class  Digikam::DatabaseFields::Hash< T >
 
class  Digikam::DatabaseFields::Set
 

Namespaces

 Digikam
 
 Digikam::DatabaseFields
 

Macros

#define DATABASEFIELDS_ENUM_ITERATOR(Flag)
 
#define DATABASEFIELDS_HASH_DECLARE_METHODS(Key, method)
 
#define DATABASEFIELDS_SET_DECLARE_METHODS(Flag, variable)
 
#define DECLARE_FIELDMETAINFO(FieldName)
 

Typedefs

typedef uint8_t Digikam::DatabaseFields::ImageHistoryInfoMinSizeType
 
typedef uint16_t Digikam::DatabaseFields::ImageMetadataMinSizeType
 
typedef uint8_t Digikam::DatabaseFields::ImagesMinSizeType
 
typedef uint8_t Digikam::DatabaseFields::ItemCommentsMinSizeType
 
typedef uint16_t Digikam::DatabaseFields::ItemInformationMinSizeType
 
typedef uint16_t Digikam::DatabaseFields::ItemPositionsMinSizeType
 
typedef uint8_t Digikam::DatabaseFields::VideoMetadataMinSizeType
 

Enumerations

enum  Digikam::DatabaseFields::CustomEnumFlags
 
enum  Digikam::DatabaseFields::ImageHistoryInfoField {
  Digikam::DatabaseFields::ImageHistoryInfoNone = 0 , Digikam::DatabaseFields::ImageUUID = 1 << 0 , Digikam::DatabaseFields::ImageHistory = 1 << 1 , Digikam::DatabaseFields::ImageRelations = 1 << 2 ,
  Digikam::DatabaseFields::ImageHistoryInfoAll , Digikam::DatabaseFields::ImageHistoryInfoFirst = ImageUUID , Digikam::DatabaseFields::ImageHistoryInfoLast = ImageRelations
}
 
enum  Digikam::DatabaseFields::ImageMetadataField {
  Digikam::DatabaseFields::ImageMetadataNone = 0 , Digikam::DatabaseFields::Make = 1 << 0 , Digikam::DatabaseFields::Model = 1 << 1 , Digikam::DatabaseFields::Lens = 1 << 2 ,
  Digikam::DatabaseFields::Aperture = 1 << 3 , Digikam::DatabaseFields::FocalLength = 1 << 4 , Digikam::DatabaseFields::FocalLength35 = 1 << 5 , Digikam::DatabaseFields::ExposureTime = 1 << 6 ,
  Digikam::DatabaseFields::ExposureProgram = 1 << 7 , Digikam::DatabaseFields::ExposureMode = 1 << 8 , Digikam::DatabaseFields::Sensitivity = 1 << 9 , Digikam::DatabaseFields::FlashMode = 1 << 10 ,
  Digikam::DatabaseFields::WhiteBalance = 1 << 11 , Digikam::DatabaseFields::WhiteBalanceColorTemperature = 1 << 12 , Digikam::DatabaseFields::MeteringMode = 1 << 13 , Digikam::DatabaseFields::SubjectDistance = 1 << 14 ,
  Digikam::DatabaseFields::SubjectDistanceCategory = 1 << 15 , Digikam::DatabaseFields::ImageMetadataAll , Digikam::DatabaseFields::ImageMetadataFirst = Make , Digikam::DatabaseFields::ImageMetadataLast = SubjectDistanceCategory
}
 
enum  Digikam::DatabaseFields::ImagesField {
  Digikam::DatabaseFields::ImagesNone = 0 , Digikam::DatabaseFields::Album = 1 << 0 , Digikam::DatabaseFields::Name = 1 << 1 , Digikam::DatabaseFields::Status = 1 << 2 ,
  Digikam::DatabaseFields::Category = 1 << 3 , Digikam::DatabaseFields::ModificationDate = 1 << 4 , Digikam::DatabaseFields::FileSize = 1 << 5 , Digikam::DatabaseFields::UniqueHash = 1 << 6 ,
  Digikam::DatabaseFields::ManualOrder = 1 << 7 , Digikam::DatabaseFields::ImagesAll , Digikam::DatabaseFields::ImagesFirst = Album , Digikam::DatabaseFields::ImagesLast = ManualOrder
}
 
enum  Digikam::DatabaseFields::ItemCommentsField {
  Digikam::DatabaseFields::ItemCommentsNone = 0 , Digikam::DatabaseFields::CommentType = 1 << 0 , Digikam::DatabaseFields::CommentLanguage = 1 << 1 , Digikam::DatabaseFields::CommentAuthor = 1 << 2 ,
  Digikam::DatabaseFields::CommentDate = 1 << 3 , Digikam::DatabaseFields::Comment = 1 << 4 , Digikam::DatabaseFields::ItemCommentsAll , Digikam::DatabaseFields::ItemCommentsFirst = CommentType ,
  Digikam::DatabaseFields::ItemCommentsLast = Comment
}
 
enum  Digikam::DatabaseFields::ItemInformationField {
  Digikam::DatabaseFields::ItemInformationNone = 0 , Digikam::DatabaseFields::Rating = 1 << 0 , Digikam::DatabaseFields::CreationDate = 1 << 1 , Digikam::DatabaseFields::DigitizationDate = 1 << 2 ,
  Digikam::DatabaseFields::Orientation = 1 << 3 , Digikam::DatabaseFields::Width = 1 << 4 , Digikam::DatabaseFields::Height = 1 << 5 , Digikam::DatabaseFields::Format = 1 << 6 ,
  Digikam::DatabaseFields::ColorDepth = 1 << 7 , Digikam::DatabaseFields::ColorModel = 1 << 8 , Digikam::DatabaseFields::ColorLabel = 1 << 9 , Digikam::DatabaseFields::PickLabel = 1 << 10 ,
  Digikam::DatabaseFields::ItemInformationAll , Digikam::DatabaseFields::ItemInformationFirst = Rating , Digikam::DatabaseFields::ItemInformationLast = PickLabel
}
 
enum  Digikam::DatabaseFields::ItemPositionsField {
  Digikam::DatabaseFields::ItemPositionsNone = 0 , Digikam::DatabaseFields::Latitude = 1 << 0 , Digikam::DatabaseFields::LatitudeNumber = 1 << 1 , Digikam::DatabaseFields::Longitude = 1 << 2 ,
  Digikam::DatabaseFields::LongitudeNumber = 1 << 3 , Digikam::DatabaseFields::Altitude = 1 << 4 , Digikam::DatabaseFields::PositionOrientation = 1 << 5 , Digikam::DatabaseFields::PositionTilt = 1 << 6 ,
  Digikam::DatabaseFields::PositionRoll = 1 << 7 , Digikam::DatabaseFields::PositionAccuracy = 1 << 8 , Digikam::DatabaseFields::PositionDescription = 1 << 9 , Digikam::DatabaseFields::ItemPositionsAll ,
  Digikam::DatabaseFields::ItemPositionsFirst = Latitude , Digikam::DatabaseFields::ItemPositionsLast = PositionDescription
}
 
enum  Digikam::DatabaseFields::VideoMetadataField {
  Digikam::DatabaseFields::VideoMetadataNone = 0 , Digikam::DatabaseFields::AspectRatio = 1 << 0 , Digikam::DatabaseFields::AudioBitRate = 1 << 1 , Digikam::DatabaseFields::AudioChannelType = 1 << 2 ,
  Digikam::DatabaseFields::AudioCodec = 1 << 3 , Digikam::DatabaseFields::Duration = 1 << 4 , Digikam::DatabaseFields::FrameRate = 1 << 5 , Digikam::DatabaseFields::VideoCodec = 1 << 6 ,
  Digikam::DatabaseFields::VideoMetadataAll , Digikam::DatabaseFields::VideoMetadataFirst = AspectRatio , Digikam::DatabaseFields::VideoMetadataLast = VideoCodec
}
 

Macro Definition Documentation

◆ DATABASEFIELDS_ENUM_ITERATOR

#define DATABASEFIELDS_ENUM_ITERATOR (   Flag)
Value:
typedef DatabaseFieldsEnumIterator<Flag> Flag##Iterator; \
typedef DatabaseFieldsEnumIteratorSetOnly<Flag> Flag##IteratorSetOnly;

◆ DATABASEFIELDS_HASH_DECLARE_METHODS

#define DATABASEFIELDS_HASH_DECLARE_METHODS (   Key,
  method 
)
Value:
void insertField(const Key& key, const T& value) { QHash<unsigned int, T>::insert(method(key), value); } \
int remove(const Key& key) { return QHash<unsigned int, T>::remove(method(key)); } \
int removeAllFields(const Key& key) \
{ \
int removedCount = 0; \
\
for (DatabaseFieldsEnumIteratorSetOnly<Key> it(key) ; !it.atEnd() ; ++it) \
{ \
removedCount += remove(*it); \
} \
\
return removedCount; \
} \
\
T take(const Key& key) { return QHash<unsigned int, T>::take(method(key)); } \
\
bool contains(const Key& key) const { return QHash<unsigned int, T>::contains(method(key)); } \
const T value(const Key& key) const { return QHash<unsigned int, T>::value(method(key)); } \
const T value(const Key& key, const T& defaultValue) const { return QHash<unsigned int, T>::value(method(key), defaultValue); } \
\
T& operator[](const Key& key) { return QHash<unsigned int, T>::operator[](method(key)); } \
const T operator[](const Key& key) const { return QHash<unsigned int, T>::operator[](method(key)); } \
\
QList<T> values(const Key& key) const { return QHash<unsigned int, T>::value(method(key)); } \
int count(const Key& key) const { return QHash<unsigned int, T>::count(method(key)); }
qulonglong value
Definition: itemviewutilities.cpp:592
#define T

◆ DATABASEFIELDS_SET_DECLARE_METHODS

#define DATABASEFIELDS_SET_DECLARE_METHODS (   Flag,
  variable 
)
Value:
explicit Set(const Flag& f) { initialize(); variable = f; } \
explicit Set(const Flag##Field& f) { initialize(); variable = f; } \
inline Flag& operator=(const Flag& f) { return variable.operator=(f); } \
inline Flag& operator|=(Flag f) { return variable.operator|=(f); } \
inline Flag& operator^=(Flag f) { return variable.operator^=(f); } \
inline Flag operator|(Flag f) const { return variable.operator|(f); } \
inline Flag operator^(Flag f) const { return variable.operator^(f); } \
inline Flag operator&(Flag f) const { return variable.operator&(f); } \
inline operator Flag() const { return variable; } \
inline bool hasFieldsFrom##Flag() const { return variable & Flag##All; } \
inline Flag get##Flag() const { return variable; }
Field
Definition: metadatainfo.h:91
FocusPoint::TypePoint operator&(FocusPoint::TypePoint type1, FocusPoint::TypePoint type2)
Definition: focuspoint.h:111

◆ DECLARE_FIELDMETAINFO

#define DECLARE_FIELDMETAINFO (   FieldName)
Value:
template<> class DIGIKAM_DATABASE_EXPORT FieldMetaInfo <FieldName> \
{ \
public: \
static const FieldName##Field First = FieldName##First; \
static const FieldName##Field Last = FieldName##Last; \
typedef FieldName##MinSizeType MinSizeType; \
inline static MinSizeType toMinSizeType(const FieldName value) { return MinSizeType(value); } \
inline static FieldName fromMinSizeType(const MinSizeType value) { return FieldName(value); } \
};