|
static QRectF | absoluteToRelative (const QRect ®ion, const QSize &fullSize) |
|
static QSize | adjustToOrientation (QRect ®ion, int orientation, const QSize &fullSize) |
|
static TagRegion | fromVariant (const QVariant &var) |
|
static QRect | mapFromOriginalSize (const DImg &reducedSizeImage, const QRect &fullSizeDetail) |
|
static QRect | mapFromOriginalSize (const QSize &fullImageSize, const QSize &reducedImageSize, const QRect &fullSizeDetail) |
|
static QRect | mapToOriginalSize (const DImg &reducedSizeImage, const QRect &reducedSizeDetail) |
|
static QRect | mapToOriginalSize (const QSize &fullImageSize, const QSize &reducedImageSize, const QRect &reducedSizeDetail) |
|
static QRect | relativeToAbsolute (const QRectF ®ion, const DImg &reducedSizeImage) |
|
static QRect | relativeToAbsolute (const QRectF ®ion, const QSize &fullSize) |
|
static void | reverseToOrientation (QRect ®ion, int orientation, const QSize &fullSize) |
|
◆ Type
◆ TagRegion() [1/3]
Digikam::TagRegion::TagRegion |
( |
| ) |
|
Use this small class to convert between the formatted textual representation of a tag region in the database and the corresponding object. Construct an invalid region.
Referenced by fromVariant().
◆ TagRegion() [2/3]
Digikam::TagRegion::TagRegion |
( |
const QString & |
descriptor | ) |
|
|
explicit |
◆ TagRegion() [3/3]
Digikam::TagRegion::TagRegion |
( |
const QRect & |
rect | ) |
|
|
explicit |
Construct with the region.
◆ absoluteToRelative()
QRectF Digikam::TagRegion::absoluteToRelative |
( |
const QRect & |
region, |
|
|
const QSize & |
fullSize |
|
) |
| |
|
static |
◆ adjustToOrientation()
QSize Digikam::TagRegion::adjustToOrientation |
( |
QRect & |
region, |
|
|
int |
orientation, |
|
|
const QSize & |
fullSize |
|
) |
| |
|
static |
Rotate and flip region to MetaEngine::ImageOrientation. The value region are calculated for the new image orientation.
References Digikam::MetaEngine::ORIENTATION_HFLIP, Digikam::MetaEngine::ORIENTATION_ROT_180, Digikam::MetaEngine::ORIENTATION_ROT_270, Digikam::MetaEngine::ORIENTATION_ROT_90, Digikam::MetaEngine::ORIENTATION_ROT_90_HFLIP, Digikam::MetaEngine::ORIENTATION_ROT_90_VFLIP, and Digikam::MetaEngine::ORIENTATION_VFLIP.
Referenced by Digikam::FaceGroup::applyItemGeometryChanges(), Digikam::ItemScanner::commitFaces(), reverseToOrientation(), Digikam::FaceUtils::rotateFaces(), Digikam::FaceGroup::slotAddItemFinished(), and Digikam::FocusPointGroup::slotAddItemFinished().
◆ fromVariant()
TagRegion Digikam::TagRegion::fromVariant |
( |
const QVariant & |
var | ) |
|
|
static |
◆ intersects()
bool Digikam::TagRegion::intersects |
( |
const TagRegion & |
other, |
|
|
double |
fraction = 0 |
|
) |
| |
Returns true if this and the other region intersect. fraction describes the relative overlap area needed to return true: If fraction is 0, returns true if the regions intersect at all. If fraction is 1, returns true only if other is completely contained in this region. If fraction is x, 0 < x < 1, returns true if the area of this region covered by the other is greater than x. Invalid areas never intersect.
References Invalid, m_type, Rect, and toRect().
Referenced by Digikam::DetectionBenchmarker::process(), and Digikam::FaceUtils::writeUnconfirmedResults().
◆ isValid()
bool Digikam::TagRegion::isValid |
( |
| ) |
const |
◆ mapFromOriginalSize() [1/2]
QRect Digikam::TagRegion::mapFromOriginalSize |
( |
const DImg & |
reducedSizeImage, |
|
|
const QRect & |
fullSizeDetail |
|
) |
| |
|
static |
◆ mapFromOriginalSize() [2/2]
QRect Digikam::TagRegion::mapFromOriginalSize |
( |
const QSize & |
fullImageSize, |
|
|
const QSize & |
reducedImageSize, |
|
|
const QRect & |
fullSizeDetail |
|
) |
| |
|
static |
◆ mapToOriginalSize() [1/2]
QRect Digikam::TagRegion::mapToOriginalSize |
( |
const DImg & |
reducedSizeImage, |
|
|
const QRect & |
reducedSizeDetail |
|
) |
| |
|
static |
◆ mapToOriginalSize() [2/2]
QRect Digikam::TagRegion::mapToOriginalSize |
( |
const QSize & |
fullImageSize, |
|
|
const QSize & |
reducedImageSize, |
|
|
const QRect & |
reducedSizeDetail |
|
) |
| |
|
static |
Converts detail rectangles taken from a reduced size image to the original size, and vice versa.
Referenced by mapToOriginalSize().
◆ operator!=()
bool Digikam::TagRegion::operator!= |
( |
const TagRegion & |
other | ) |
const |
◆ operator==()
bool Digikam::TagRegion::operator== |
( |
const TagRegion & |
other | ) |
const |
◆ relativeToAbsolute() [1/2]
QRect Digikam::TagRegion::relativeToAbsolute |
( |
const QRectF & |
region, |
|
|
const DImg & |
reducedSizeImage |
|
) |
| |
|
static |
◆ relativeToAbsolute() [2/2]
QRect Digikam::TagRegion::relativeToAbsolute |
( |
const QRectF & |
region, |
|
|
const QSize & |
fullSize |
|
) |
| |
|
static |
◆ reverseToOrientation()
void Digikam::TagRegion::reverseToOrientation |
( |
QRect & |
region, |
|
|
int |
orientation, |
|
|
const QSize & |
fullSize |
|
) |
| |
|
static |
◆ toRect()
QRect Digikam::TagRegion::toRect |
( |
| ) |
const |
If type is Rect, returns the contained rectangle.
References m_type, m_value, and Rect.
Referenced by Digikam::FaceTagsEditor::add(), Digikam::ItemScanner::commitFaces(), Digikam::FaceGroup::Private::createItem(), Digikam::ItemFaceDelegate::faceRect(), Digikam::FaceItemRetriever::getDetails(), Digikam::FaceTagsEditor::getTagRects(), Digikam::FaceItemRetriever::getThumbnails(), intersects(), Digikam::MetadataHub::loadFaceTags(), Digikam::DetectionBenchmarker::process(), Digikam::FaceTagsEditor::removeFaceAndTag(), Digikam::FaceUtils::rotateFaces(), Digikam::DatabaseTask::run(), and Digikam::FaceUtils::storeThumbnails().
◆ toVariant()
QVariant Digikam::TagRegion::toVariant |
( |
| ) |
const |
◆ toXml()
QString Digikam::TagRegion::toXml |
( |
| ) |
const |
◆ type()
◆ m_type
Type Digikam::TagRegion::m_type |
|
protected |
◆ m_value
QVariant Digikam::TagRegion::m_value |
|
protected |
The documentation for this class was generated from the following files: