digiKam
|
Classes | |
class | Private |
Public Slots | |
void | aboutToSetInfo (const ItemInfo &info) |
void | aboutToSetInfoAfterRotate (const ItemInfo &info) |
void | addFace () |
void | rejectAll () |
void | setInfo (const ItemInfo &info) |
void | setVisible (bool visible) |
void | setVisibleItem (RegionFrameItem *item) |
Public Member Functions | |
bool | acceptsMouseClick (const QPointF &scenePos) |
bool | autoSuggest () const |
RegionFrameItem * | closestItem (const QPointF &p, qreal *const manhattanLength=nullptr) const |
void | enterEvent (QEvent *) |
FaceGroup (GraphicsDImgView *const view) | |
bool | hasVisibleItems () const |
ItemInfo | info () const |
bool | isVisible () const |
void | itemHoverEnterEvent (QGraphicsSceneHoverEvent *event) |
void | itemHoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
void | itemHoverMoveEvent (QGraphicsSceneHoverEvent *event) |
QList< RegionFrameItem * > | items () const |
void | leaveEvent (QEvent *) |
void | setAutoSuggest (bool doAutoSuggest) |
void | setShowOnHover (bool show) |
bool | showOnHover () const |
~FaceGroup () override | |
Protected Slots | |
void | cancelAddItem () |
void | focusRandomFace () |
void | itemStateChanged (int) |
void | slotAddItemFinished (const QRectF &rect) |
void | slotAddItemMoving (const QRectF &rect) |
void | slotAddItemStarted (const QPointF &pos) |
void | slotAlbumRenamed (Album *album) |
void | slotAlbumsUpdated (int type) |
void | slotAssigned (const TaggingAction &action, const ItemInfo &info, const QVariant &faceIdentifier) |
void | slotIgnored (const ItemInfo &info, const QVariant &faceIdentifier) |
void | slotIgnoredClicked (const ItemInfo &info, const QVariant &faceIdentifier) |
void | slotLabelClicked (const ItemInfo &info, const QVariant &faceIdentifier) |
void | slotRejected (const ItemInfo &info, const QVariant &faceIdentifier) |
void | startAutoSuggest () |
Protected Member Functions | |
void | applyItemGeometryChanges () |
void | clear () |
void | load () |
Properties | |
bool | visible |
|
explicit |
Constructs a new face group, managing RegionFrameItems for faces of a particular image, displayed on a GraphicsDImgView.
References Digikam::FacePipeline::construct(), Digikam::FaceGroup::Private::editPipeline, Digikam::AlbumManager::instance(), itemStateChanged(), Digikam::FacePipeline::plugDatabaseEditor(), Digikam::FacePipeline::plugTrainer(), Digikam::GraphicsDImgView::previewItem(), Digikam::ItemVisibilityController::setShallBeShown(), slotAlbumRenamed(), slotAlbumsUpdated(), Digikam::FaceGroup::Private::view, and Digikam::FaceGroup::Private::visibilityController.
|
override |
|
slot |
Prepares to load a new info. Closes the face group for editing. Pass a null info if about to close.
References applyItemGeometryChanges(), clear(), info(), and Digikam::FaceGroup::Private::info.
|
slot |
References clear(), info(), and Digikam::FaceGroup::Private::info.
bool Digikam::FaceGroup::acceptsMouseClick | ( | const QPointF & | scenePos | ) |
References Digikam::FaceGroup::Private::hotItems().
|
slot |
Enters a special state where by click + drag a new face can be created
References cancelAddItem(), Digikam::FaceGroup::Private::manuallyAddWrapItem, Digikam::GraphicsDImgView::previewItem(), slotAddItemFinished(), slotAddItemMoving(), slotAddItemStarted(), and Digikam::FaceGroup::Private::view.
|
protected |
References Digikam::TagRegion::adjustToOrientation(), Digikam::DImg::copy(), Digikam::ItemInfo::dimensions(), Digikam::FaceGroup::Private::editPipeline, Digikam::FacePipeline::editRegion(), Digikam::FaceGroup::Private::exifRotate, Digikam::FaceItem::face(), Digikam::GraphicsDImgItem::image, Digikam::FaceGroup::Private::info, Digikam::FaceTagsIface::isNull(), Digikam::FaceGroup::Private::items, Digikam::ItemInfo::orientation(), Digikam::DImgChildItem::originalRect(), Digikam::GraphicsDImgView::previewItem(), Digikam::FaceTagsIface::region(), Digikam::DImg::rotateAndFlip(), and Digikam::FaceGroup::Private::view.
Referenced by aboutToSetInfo().
bool Digikam::FaceGroup::autoSuggest | ( | ) | const |
References Digikam::FaceGroup::Private::autoSuggest.
|
protectedslot |
References Digikam::FaceGroup::Private::manuallyAddedItem, Digikam::FaceGroup::Private::manuallyAddWrapItem, and Digikam::FaceGroup::Private::view.
Referenced by addFace(), clear(), and slotAddItemFinished().
|
protected |
References cancelAddItem(), Digikam::ItemVisibilityController::clear(), Digikam::FaceGroup::Private::items, Digikam::NoFaces, Digikam::FaceGroup::Private::state, and Digikam::FaceGroup::Private::visibilityController.
Referenced by aboutToSetInfo(), aboutToSetInfoAfterRotate(), rejectAll(), setInfo(), and slotAlbumsUpdated().
RegionFrameItem * Digikam::FaceGroup::closestItem | ( | const QPointF & | p, |
qreal *const | manhattanLength = nullptr |
||
) | const |
Returns the item in this group closest to scene position p. If given, manhattanLength is set to the manhattan length between p and the closest point of the returned item's bounding rectangle. In particular, if p is inside the item's rectangle, manhattanLength is 0.
References Digikam::RegionFrameItem::boundingRect(), and Digikam::FaceGroup::Private::items.
Referenced by itemHoverMoveEvent().
void Digikam::FaceGroup::enterEvent | ( | QEvent * | ) |
|
protectedslot |
bool Digikam::FaceGroup::hasVisibleItems | ( | ) | const |
ItemInfo Digikam::FaceGroup::info | ( | ) | const |
bool Digikam::FaceGroup::isVisible | ( | ) | const |
References Digikam::ItemVisibilityController::shallBeShown, and Digikam::FaceGroup::Private::visibilityController.
Referenced by itemHoverMoveEvent(), and leaveEvent().
void Digikam::FaceGroup::itemHoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) |
void Digikam::FaceGroup::itemHoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) |
void Digikam::FaceGroup::itemHoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) |
References closestItem(), Digikam::ItemVisibilityController::ExcludeFadingOut, Digikam::FaceGroup::Private::hotItems(), isVisible(), setVisibleItem(), Digikam::FaceGroup::Private::showOnHover, Digikam::FaceGroup::Private::visibilityController, visible, and Digikam::ItemVisibilityController::visibleItems().
QList< RegionFrameItem * > Digikam::FaceGroup::items | ( | ) | const |
References Digikam::FaceGroup::Private::items.
Referenced by Digikam::FaceGroup::Private::addItem().
|
protectedslot |
References Digikam::FacesLoaded, Digikam::ItemVisibilityController::hide(), Digikam::DImgPreviewItem::ImageLoaded, Digikam::DImgPreviewItem::ImageLoadingFailed, Digikam::DImgPreviewItem::Loading, Digikam::DImgPreviewItem::NoImage, Digikam::ItemVisibilityController::show(), Digikam::FaceGroup::Private::state, and Digikam::FaceGroup::Private::visibilityController.
Referenced by FaceGroup().
void Digikam::FaceGroup::leaveEvent | ( | QEvent * | ) |
References isVisible(), setVisibleItem(), and Digikam::FaceGroup::Private::showOnHover.
|
protected |
References Digikam::FaceGroup::Private::addItem(), Digikam::DImg::attribute(), Digikam::ItemVisibilityController::clear(), Digikam::FaceTagsEditor::databaseFaces(), Digikam::DImg::detectedFormat(), Digikam::MetaEngineSettingsContainer::exifRotate, Digikam::FaceGroup::Private::exifRotate, Digikam::FacesLoaded, Digikam::ItemInfo::id(), Digikam::GraphicsDImgItem::image, Digikam::FaceGroup::Private::info, Digikam::MetaEngineSettings::instance(), Digikam::DImgPreviewItem::isLoaded(), Digikam::ItemInfo::isNull(), Digikam::LoadingFaces, Digikam::NoFaces, Digikam::GraphicsDImgView::previewItem(), Digikam::DImg::RAW, Digikam::MetaEngineSettings::settings(), Digikam::ItemVisibilityController::show(), Digikam::FaceGroup::Private::state, Digikam::FaceGroup::Private::view, and Digikam::FaceGroup::Private::visibilityController.
Referenced by setInfo(), and slotAlbumsUpdated().
|
slot |
Rejects (clears) all faces on the current image
References clear(), Digikam::ItemInfo::dimensions(), Digikam::ItemInfo::filePath(), Digikam::ItemInfo::id(), Digikam::FaceGroup::Private::info, Digikam::MetadataHub::load(), Digikam::MetadataHub::loadFaceTags(), Digikam::FaceTagsEditor::removeAllFaces(), Digikam::MetadataHub::write(), and Digikam::MetadataHub::WRITE_ALL.
void Digikam::FaceGroup::setAutoSuggest | ( | bool | doAutoSuggest | ) |
Auto suggest applies if an image has not been scanned, or an unknown face is registered. In this case, a new scan will be triggered.
References Digikam::FaceGroup::Private::autoSuggest.
|
slot |
void Digikam::FaceGroup::setShowOnHover | ( | bool | show | ) |
Even if visible() is false, show the item under the mouse cursor
References Digikam::FaceGroup::Private::showOnHover.
|
slot |
Shows or hides the frames
References Digikam::FaceGroup::Private::applyVisible(), Digikam::ItemVisibilityController::setShallBeShown(), Digikam::FaceGroup::Private::visibilityController, and visible.
|
slot |
bool Digikam::FaceGroup::showOnHover | ( | ) | const |
References Digikam::FaceGroup::Private::showOnHover.
|
protectedslot |
References Digikam::FaceGroup::Private::addItem(), Digikam::FacePipeline::addManually(), Digikam::TagRegion::adjustToOrientation(), cancelAddItem(), Digikam::DImg::copy(), Digikam::ItemInfo::dimensions(), Digikam::FaceGroup::Private::editPipeline, Digikam::FaceGroup::Private::exifRotate, Digikam::GraphicsDImgItem::image, Digikam::FaceGroup::Private::info, Digikam::FaceGroup::Private::manuallyAddedItem, Digikam::FaceGroup::Private::manuallyAddWrapItem, Digikam::ItemInfo::orientation(), Digikam::DImgChildItem::originalRect(), Digikam::GraphicsDImgView::previewItem(), Digikam::DImg::rotateAndFlip(), Digikam::ItemVisibilityController::setItemDirectlyVisible(), Digikam::RegionFrameItem::setRectInSceneCoordinatesAdjusted(), Digikam::FaceItem::switchMode(), Digikam::AssignNameWidget::UnconfirmedEditMode, Digikam::FaceGroup::Private::view, and Digikam::FaceGroup::Private::visibilityController.
Referenced by addFace().
|
protectedslot |
References Digikam::ItemVisibilityController::addItem(), Digikam::FaceGroup::Private::createItem(), Digikam::FaceGroup::Private::manuallyAddedItem, Digikam::RegionFrameItem::setRectInSceneCoordinatesAdjusted(), Digikam::ItemVisibilityController::showItem(), and Digikam::FaceGroup::Private::visibilityController.
Referenced by addFace().
|
protectedslot |
Referenced by addFace().
|
protectedslot |
|
protectedslot |
References clear(), Digikam::FaceGroup::Private::items, load(), and Digikam::Album::TAG.
Referenced by FaceGroup().
|
protectedslot |
References Digikam::FacePipeline::confirm(), Digikam::AssignNameWidget::ConfirmedMode, Digikam::FaceGroup::Private::editPipeline, Digikam::FaceItem::face(), focusRandomFace(), Digikam::FaceTags::getOrCreateTagForPerson(), Digikam::GraphicsDImgItem::image, Digikam::FaceGroup::Private::info, Digikam::FaceTagsIface::isConfirmedName(), Digikam::FaceTags::isTheUnknownPerson(), Digikam::FaceGroup::Private::items, Digikam::TaggingAction::newTagName(), Digikam::DImgChildItem::originalRect(), Digikam::TaggingAction::parentTagId(), Digikam::GraphicsDImgView::previewItem(), Digikam::FaceTagsIface::region(), Digikam::FaceItem::setFace(), Digikam::TaggingAction::shallAssignTag(), Digikam::TaggingAction::shallCreateNewTag(), Digikam::FaceItem::switchMode(), Digikam::FaceTagsIface::tagId(), Digikam::TaggingAction::tagId(), and Digikam::FaceGroup::Private::view.
Referenced by Digikam::FaceGroup::Private::createAssignNameWidget().
|
protectedslot |
References Digikam::AssignNameWidget::ConfirmedMode, Digikam::FaceGroup::Private::editPipeline, Digikam::FacePipeline::editTag(), Digikam::FaceItem::face(), Digikam::FaceTags::ignoredPersonTagId(), Digikam::FaceGroup::Private::info, Digikam::FaceGroup::Private::items, Digikam::FaceItem::setFace(), and Digikam::FaceItem::switchMode().
Referenced by Digikam::FaceGroup::Private::createAssignNameWidget().
|
protectedslot |
|
protectedslot |
|
protectedslot |
References Digikam::FaceGroup::Private::editPipeline, Digikam::FaceItem::face(), Digikam::ItemVisibilityController::hideAndRemoveItem(), Digikam::FaceGroup::Private::info, Digikam::FaceGroup::Private::items, Digikam::FacePipeline::remove(), Digikam::FaceItem::setFace(), and Digikam::FaceGroup::Private::visibilityController.
Referenced by Digikam::FaceGroup::Private::createAssignNameWidget().
|
protectedslot |
References Digikam::FaceGroup::Private::autoSuggest.
|
readwrite |
Referenced by itemHoverMoveEvent(), and setVisible().