digiKam
|
Classes | |
class | Private |
Public Member Functions | |
ItemLister () | |
void | list (ItemListerReceiver *const receiver, const CoreDbUrl &url) |
void | listDateRange (ItemListerReceiver *const receiver, const QDate &startDate, const QDate &endDate) |
void | setListOnlyAvailable (bool listOnlyAvailable) |
void | setRecursive (bool recursive) |
~ItemLister () | |
Operations with TAlbum | |
void | listTag (ItemListerReceiver *const receiver, const QList< int > &tagIds) |
void | listImageTagPropertySearch (ItemListerReceiver *const receiver, const QString &xml) |
QString | tagSearchXml (int tagId, const QString &type, bool includeChildTags) const |
Operations with FAlbum | |
void | listFaces (ItemListerReceiver *const receiver, int personId) |
Operations with PAlbum | |
void | listPAlbum (ItemListerReceiver *const receiver, int albumRootId, const QString &album) |
Operations with SAlbum | |
void | listSearch (ItemListerReceiver *const receiver, const QString &xml, int limit=0, qlonglong referenceImageId=-1) |
void | listHaarSearch (ItemListerReceiver *const receiver, const QString &xml) |
void | listAreaRange (ItemListerReceiver *const receiver, double lat1, double lat2, double lon1, double lon2) |
|
explicit |
Digikam::ItemLister::~ItemLister | ( | ) |
void Digikam::ItemLister::list | ( | ItemListerReceiver *const | receiver, |
const CoreDbUrl & | url | ||
) |
Convenience method for Album, Tag and Date URLs, not for Search URLs.
References Digikam::CoreDbUrl::album(), Digikam::CoreDbUrl::albumRootId(), Digikam::CoreDbUrl::areaCoordinates(), Digikam::CoreDbUrl::endDate(), Digikam::CoreDbUrl::isAlbumUrl(), Digikam::CoreDbUrl::isDateUrl(), Digikam::CoreDbUrl::isMapImagesUrl(), Digikam::CoreDbUrl::isTagUrl(), listAreaRange(), listDateRange(), listPAlbum(), listTag(), Digikam::CoreDbUrl::startDate(), and Digikam::CoreDbUrl::tagIds().
Referenced by listFaces().
void Digikam::ItemLister::listAreaRange | ( | ItemListerReceiver *const | receiver, |
double | lat1, | ||
double | lat2, | ||
double | lon1, | ||
double | lon2 | ||
) |
List the images whose coordinates are between coordinates contained in areaCoordinates(lat1, lat2, lng1, lng2).
References Digikam::ItemListerRecord::albumRootID, Digikam::CoreDbAccess::backend(), Digikam::ItemListerRecord::creationDate, Digikam::BdEngineBackend::execSql(), Digikam::ItemListerRecord::extraValues, Digikam::ItemListerRecord::imageID, Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::ItemListerRecord::rating, and Digikam::ItemListerReceiver::receive().
Referenced by list(), and Digikam::GPSJob::run().
void Digikam::ItemLister::listDateRange | ( | ItemListerReceiver *const | receiver, |
const QDate & | startDate, | ||
const QDate & | endDate | ||
) |
List those images whose date lies in the range beginning with startDate (inclusive) and ending before endDate (exclusive).
References Digikam::ItemListerRecord::albumID, Digikam::ItemListerRecord::albumRootID, Digikam::CoreDbAccess::backend(), Digikam::ItemListerRecord::category, Digikam::ItemListerRecord::creationDate, Digikam::BdEngineBackend::execSql(), Digikam::ItemListerRecord::fileSize, Digikam::ItemListerRecord::format, Digikam::ItemListerRecord::imageID, Digikam::ItemListerRecord::imageSize, Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::ItemListerRecord::modificationDate, Digikam::ItemListerRecord::name, Digikam::ItemListerRecord::rating, Digikam::ItemListerReceiver::receive(), and Digikam::startOfDay().
Referenced by list(), and Digikam::DatesJob::run().
void Digikam::ItemLister::listFaces | ( | ItemListerReceiver *const | receiver, |
int | personId | ||
) |
List the images which have faces. An image with n faces will be listed n times. FIXME: Obviously an ugly way. Should be trashed later in favor of a better method.
References Digikam::CoreDbAccess::backend(), Digikam::BdEngineBackend::execSql(), Digikam::TagsCache::instance(), list(), Digikam::TagsCache::tagForPath(), Digikam::TagsCache::tagName(), and Digikam::ItemTagPair::values().
void Digikam::ItemLister::listHaarSearch | ( | ItemListerReceiver *const | receiver, |
const QString & | xml | ||
) |
Execute the search specified by search XML describing a Haar search
receiver | the receiver for the searches |
xml | SearchXml describing the query |
References Digikam::HaarIface::bestMatchesForImageWithThreshold(), Digikam::HaarIface::bestMatchesForSignature(), Digikam::SearchXml::End, Digikam::ItemListerReceiver::error(), Digikam::SearchXml::Field, Digikam::SearchXmlReader::fieldName(), Digikam::HaarIface::HanddrawnSketch, Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::SearchXmlReader::readNext(), Digikam::SearchXmlReader::readToFirstField(), Digikam::HaarIface::ScannedSketch, Digikam::HaarIface::setAlbumRootsToSearch(), Digikam::SearchXmlReader::value(), Digikam::SearchXmlReader::valueToIntList(), and Digikam::SearchXmlReader::valueToLongLong().
void Digikam::ItemLister::listImageTagPropertySearch | ( | ItemListerReceiver *const | receiver, |
const QString & | xml | ||
) |
Execute the search specified by search XML describing a Tag Properties search. Two special add-ons: Non-unique by image id; if enabled, uses the extended ImageRecord protocol to pass the property value in the record's extraValue.
receiver | the receiver for the searches |
xml | SearchXml describing the query |
References Digikam::ItemListerRecord::albumID, Digikam::ItemListerRecord::albumRootID, Digikam::ImageTagPropertyName::autodetectedPerson(), Digikam::CoreDbAccess::backend(), Digikam::ItemQueryBuilder::buildQuery(), Digikam::ItemListerRecord::category, Digikam::ItemListerRecord::creationDate, Digikam::ItemListerReceiver::error(), Digikam::BdEngineBackend::execSql(), Digikam::ItemListerRecord::extraValues, Digikam::ItemListerRecord::fileSize, Digikam::ItemListerRecord::format, Digikam::ItemListerRecord::imageID, Digikam::ItemListerRecord::imageSize, Digikam::BdEngineBackend::lastError(), Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::ItemListerRecord::modificationDate, Digikam::ItemListerRecord::name, Digikam::ItemListerRecord::rating, Digikam::ItemListerReceiver::receive(), Digikam::ItemQueryBuilder::setImageTagPropertiesJoined(), and value.
Referenced by Digikam::TagsJob::run().
void Digikam::ItemLister::listPAlbum | ( | ItemListerReceiver *const | receiver, |
int | albumRootId, | ||
const QString & | album | ||
) |
List images in the Album (physical album) specified by albumRoot, album. The results will be fed to the specified receiver.
References Digikam::CoreDB::addBoundValuePlaceholders(), Digikam::ItemListerRecord::albumID, Digikam::ItemListerRecord::albumRootID, Digikam::CoreDbAccess::backend(), Digikam::ItemListerRecord::category, Digikam::ItemListerRecord::creationDate, Digikam::CoreDbAccess::db(), Digikam::BdEngineBackend::execSql(), Digikam::ItemListerRecord::fileSize, Digikam::ItemListerRecord::format, Digikam::CoreDB::getAlbumAndSubalbumsForPath(), Digikam::CoreDB::getAlbumForPath(), Digikam::ItemListerRecord::imageID, Digikam::ItemListerRecord::imageSize, Digikam::CollectionManager::instance(), Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::BdEngineBackend::maximumBoundValues(), Digikam::ItemListerRecord::modificationDate, Digikam::ItemListerRecord::name, Digikam::ItemListerRecord::rating, Digikam::ItemListerReceiver::receive(), and Digikam::ItemLister::Private::recursive.
Referenced by list(), and Digikam::AlbumsJob::run().
void Digikam::ItemLister::listSearch | ( | ItemListerReceiver *const | receiver, |
const QString & | xml, | ||
int | limit = 0 , |
||
qlonglong | referenceImageId = -1 |
||
) |
Execute the search specified by search XML
receiver | the receiver for the searches |
xml | SearchXml describing the query |
limit | the limit the count of the result set. If limit = 0, then no limit is set. |
referenceImageId | the id of a reference image in the search query. |
References Digikam::ItemListerRecord::albumID, Digikam::ItemListerRecord::albumRootID, Digikam::CoreDbAccess::backend(), Digikam::ItemQueryBuilder::buildQuery(), Digikam::ItemListerRecord::category, Digikam::ItemQueryPostHooks::checkPosition(), Digikam::ItemListerRecord::creationDate, Digikam::ItemListerRecord::currentFuzzySearchReferenceImage, Digikam::ItemListerRecord::currentSimilarity, Digikam::SimilarityDbAccess::db(), Digikam::ItemListerReceiver::error(), Digikam::BdEngineBackend::execSql(), Digikam::ItemListerRecord::fileSize, Digikam::ItemListerRecord::format, Digikam::SimilarityDb::getImageSimilarity(), Digikam::ItemListerRecord::imageID, Digikam::ItemListerRecord::imageSize, Digikam::BdEngineBackend::lastError(), Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::ItemListerRecord::modificationDate, Digikam::ItemListerRecord::name, Digikam::ItemListerRecord::rating, and Digikam::ItemListerReceiver::receive().
void Digikam::ItemLister::listTag | ( | ItemListerReceiver *const | receiver, |
const QList< int > & | tagIds | ||
) |
List the images which have assigned the tags specified by tagIds Updated to support multiple tags
References Digikam::ItemListerRecord::albumID, Digikam::ItemListerRecord::albumRootID, Digikam::CoreDbAccess::backend(), Digikam::ItemListerRecord::category, Digikam::ItemListerRecord::creationDate, Digikam::BdEngineBackend::execDBAction(), Digikam::ItemListerRecord::fileSize, Digikam::ItemListerRecord::format, Digikam::BdEngineBackend::getDBAction(), Digikam::ItemListerRecord::imageID, Digikam::ItemListerRecord::imageSize, Digikam::ItemLister::Private::listOnlyAvailableImages, Digikam::ItemListerRecord::modificationDate, Digikam::ItemListerRecord::name, Digikam::ItemListerRecord::rating, Digikam::ItemListerReceiver::receive(), and Digikam::ItemLister::Private::recursive.
Referenced by list(), and Digikam::TagsJob::run().
void Digikam::ItemLister::setListOnlyAvailable | ( | bool | listOnlyAvailable | ) |
Adjust the setting if images from collections that are currently not in the state "available" will be included in the listing. Default: true.
References Digikam::ItemLister::Private::listOnlyAvailableImages.
Referenced by Digikam::AlbumsJob::run(), Digikam::DatesJob::run(), Digikam::GPSJob::run(), and Digikam::TagsJob::run().
void Digikam::ItemLister::setRecursive | ( | bool | recursive | ) |
Adjust the setting if album or tags will be listed recursively (i.e. including subalbums / subtags)
References Digikam::ItemLister::Private::recursive.
Referenced by Digikam::AlbumsJob::run(), and Digikam::TagsJob::run().
QString Digikam::ItemLister::tagSearchXml | ( | int | tagId, |
const QString & | type, | ||
bool | includeChildTags | ||
) | const |
References Digikam::ImageTagPropertyName::autodetectedFace(), Digikam::ImageTagPropertyName::autodetectedPerson(), Digikam::SearchXml::Equal, Digikam::SearchXmlWriter::finishField(), Digikam::SearchXmlWriter::finishGroup(), Digikam::ImageTagPropertyName::ignoredFace(), Digikam::SearchXml::InTree, Digikam::SearchXml::Or, Digikam::SearchXmlWriter::setDefaultFieldOperator(), Digikam::ImageTagPropertyName::tagRegion(), Digikam::SearchXmlWriter::writeField(), Digikam::SearchXmlWriter::writeGroup(), Digikam::SearchXmlWriter::writeValue(), and Digikam::SearchXmlWriter::xml().
Referenced by Digikam::TagsJob::run().