digiKam Developer Documentation: Digikam::AssignNameWidget Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | List of all members
Digikam::AssignNameWidget Class Reference
Inheritance diagram for Digikam::AssignNameWidget:

## Public Types
enum | LayoutMode { InvalidLayout , FullLine , TwoLines , Compact }
enum | Mode { InvalidMode , UnconfirmedEditMode , ConfirmedMode , ConfirmedEditMode , IgnoredMode }
enum | TagEntryWidgetMode { InvalidTagEntryWidgetMode , AddTagsComboBoxMode , AddTagsLineEditMode }
enum | VisualStyle { InvalidVisualStyle , StyledFrame , TranslucentDarkRound , TranslucentThemedFrameless }

## Public Slots
void | setCurrentFace (const FaceTagsIface &face)
void | setCurrentTag (int tagId)
| Sets the suggested (UnconfirmedEditMode) or assigned (ConfirmedMode) tag to be displayed.
void | setCurrentTag (TAlbum *album)
void | setParentTag (TAlbum *album)
| Set a parent tag for suggesting a parent tag for a new tag, and a default action.
void | setUserData (const ItemInfo &info, const QVariant &faceIdentifier=QVariant())
| The identifying information emitted with the signals.

## Signals
void | assigned (const TaggingAction &action, const ItemInfo &info, const QVariant &faceIdentifier)
| A name has been assigned to the associated face.
void | ignored (const ItemInfo &info, const QVariant &faceIdentifier)
void | ignoredClicked (const ItemInfo &info, const QVariant &faceIdentifier)
| In IgnoredMode, this signal is emitted when the user clicked on the label.
void | labelClicked (const ItemInfo &info, const QVariant &faceIdentifier)
| In ConfirmedMode, this signal is emitted when the user clicked on the label.
void | rejected (const ItemInfo &info, const QVariant &faceIdentifier)
| The suggestion has been rejected and the face will be moved to Unknown.
void | selected (const TaggingAction &action, const ItemInfo &info, const QVariant &faceIdentifier)
| An action has been selected.

## Public Member Functions
| AssignNameWidget (QWidget *const parent=nullptr)
| Please take care: you must set all four modes before usage!
AddTagsComboBox * | comboBox () const
| The combo box or line edit in use, if any.
QVariant | faceIdentifier () const
ItemInfo | info () const
LayoutMode | layoutMode () const
AddTagsLineEdit * | lineEdit () const
Mode | mode () const
void | setAlbumModels (TagModel *const model, TagPropertiesFilterModel *const filteredModel, CheckableAlbumFilterModel *const filterModel)
| Set the tag model to use for completion.
void | setDefaultModel ()
void | setLayoutMode (LayoutMode mode)
void | setMode (Mode mode)
void | setTagEntryWidgetMode (TagEntryWidgetMode mode)
void | setVisualStyle (VisualStyle style)
TagEntryWidgetMode | tagEntryWidgetMode () const
VisualStyle | visualStyle () const

## Protected Slots
void | slotActionActivated (const TaggingAction &action)
void | slotActionSelected (const TaggingAction &action)
void | slotConfirm ()
void | slotIgnore ()
void | slotIgnoredClicked ()
void | slotLabelClicked ()
void | slotReject ()

## Protected Member Functions
void | keyPressEvent (QKeyEvent *e) override
void | showEvent (QShowEvent *e) override

## Properties
LayoutMode | layoutMode
Mode | mode
TagEntryWidgetMode | tagEntryWidgetMode
VisualStyle | visualStyle

## Member Function Documentation

## ◆ assigned

void Digikam::AssignNameWidget::assigned | ( | const TaggingAction & | action,
|  | const ItemInfo & | info,
|  | const QVariant & | faceIdentifier
| ) |  |
| signal

This can be an existing tag, or a new tag, as described by TaggingAction. For convenience, info() and faceIdentifier() are provided.

## ◆ rejected

void Digikam::AssignNameWidget::rejected | ( | const ItemInfo & | info,
|  | const QVariant & | faceIdentifier
| ) |  |
| signal

For convenience, info() and faceIdentifier() are provided.

## ◆ selected

void Digikam::AssignNameWidget::selected | ( | const TaggingAction & | action,
|  | const ItemInfo & | info,
|  | const QVariant & | faceIdentifier
| ) |  |
| signal

This purely signals user interaction, no fixed decision - mouse hover may be enough to emit this signal. The action may be invalid (user switched back to empty selection).

## ◆ setMode()

void Digikam::AssignNameWidget::setMode | ( | Mode | mode | ) |

Reject tooltip and icon should be updated even if the same mode is passed, because Unconfirmed and Unknown. Faces have the same mode but different tooltips and icons.

## ◆ setUserData

void Digikam::AssignNameWidget::setUserData | ( | const ItemInfo & | info,
|  | const QVariant & | faceIdentifier = `QVariant()`
| ) |  |
| slot

Ignored faces are drawn over with a different overlay, as Reject button should be disabled.