| 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 | List of all members
Digikam::DigikamItemView Class Reference
Inheritance diagram for Digikam::DigikamItemView:

## Public Types
enum | SidebarViewMode { NormalView = 0 , SearchView , FuzzySView , PeopleView }

## Public Slots
void | assignRating (const QList< QModelIndex > &index, int rating)
void | confirmFaces (const QList< QModelIndex > &indexes, int tagId)
| Confirm the face with a face tag (name) in the database.
void | deleteSelected (const ItemViewUtilities::DeleteMode deleteMode=ItemViewUtilities::DeleteUseTrash)
void | deleteSelectedDirectly (const ItemViewUtilities::DeleteMode deleteMode=ItemViewUtilities::DeleteUseTrash)
void | dragDropSort (const ItemInfo &pick, const QList< ItemInfo > &infos)
void | ignoreFaces (const QList< QModelIndex > &indexes)
| Set Face to Ignore ID.
void | openFile (const ItemInfo &info)
void | rejectFaces (const QList< QModelIndex > &indexes)
| This slot is connected to the reject signal of AssignNameOverlay, and handles two cases.
void | removeFaces (const QList< QModelIndex > &indexes)
| Removes the face from the database.
void | rename ()
void | unknownFaces (const QList< QModelIndex > &indexes)
| Ignored Face back to Unknown face.
Public Slots inherited from Digikam::ItemCategorizedView
void | hintAt (const ItemInfo &info)
| Does something to gain attention for info, but not changing current selection.
void | openAlbum (const QList< Album * > &album)
void | setCurrentInfo (const ItemInfo &info)
| Set as current item the item identified by the imageinfo.
void | setCurrentUrl (const QUrl &url)
| Set as current item the item identified by its file url.
void | setCurrentUrlWhenAvailable (const QUrl &url)
| Set as current item when it becomes available, the item identified by its file url.
void | setCurrentWhenAvailable (qlonglong imageId)
| Scroll the view to the given item when it becomes available.
void | setSelectedItemInfos (const QList< ItemInfo > &infos)
| Set selected items.
void | setSelectedUrls (const QList< QUrl > &urlList)
| Set selected items identified by their file urls.
void | setThumbnailSize (int size)
Public Slots inherited from Digikam::ItemViewCategorized
void | copy () override
void | cut () override
void | hideIndexNotification ()
void | paste () override
void | showIndexNotification (const QModelIndex &index, const QString &message)
Public Slots inherited from Digikam::DCategorizedView
void | reset () override

## Signals
void | previewRequested (const ItemInfo &info)
void | signalOpenGeolocationMap ()
void | signalSeparationModeChanged (int category)
void | signalShowContextMenu (QContextMenuEvent *event, const QList< QAction * > &actions=QList< QAction * >())
void | signalShowContextMenuOnInfo (QContextMenuEvent *event, const ItemInfo &info, const QList< QAction * > &actions, ItemFilterModel *filterModel)
void | signalShowGroupContextMenu (QContextMenuEvent *event, const QList< ItemInfo > &selectedInfos, ItemFilterModel *filterModel)
Signals inherited from Digikam::ItemCategorizedView
void | currentInfoChanged (const ItemInfo &info)
void | deselected (const QList< ItemInfo > &nowDeselectedInfos)
| Emitted when items are deselected.
void | imageActivated (const ItemInfo &info)
| Emitted when the given image is activated. Info is never null.
void | modelChanged ()
| Emitted when a new model is set.
void | selected (const QList< ItemInfo > &newSelectedInfos)
| Emitted when new items are selected.
Signals inherited from Digikam::ItemViewCategorized
void | itemSelectionChanged ()
| Emitted when any item selection change occurs.
void | keyPressed (QKeyEvent *e)
| Remember you may want to check if the event is accepted or ignored.
void | selectionCleared ()
| Emitted when the selection is completely cleared.
void | signalClicked (const QMouseEvent *e, const QModelIndex &index)
| For overlays: Like the respective parent class signals, but with additional info.
void | signalEntered (const QMouseEvent *e, const QModelIndex &index)
void | viewportClicked (const QMouseEvent *e)
| While clicked() is emitted with a valid index, this corresponds to clicking on empty space.
void | zoomInStep ()
void | zoomOutStep ()

## Public Member Functions
| DigikamItemView (QWidget *const parent=nullptr)
ItemInfoList | allItemInfos (bool grouping=false) const
bool | allNeedGroupResolving (const OperationType type) const
int | fitToWidthIcons ()
QList< int > | getFaceIds (const QList< QModelIndex > &indexes) const
bool | isPeopleViewMode () const
ItemInfoList | selectedItemInfos (bool grouping=false) const
ItemInfoList | selectedItemInfosCurrentFirst (bool grouping=false) const
bool | selectedNeedGroupResolving (const OperationType type) const
void | setSidebarViewMode (int mode)
void | setThumbnailSize (const ThumbnailSize &size) override
ItemViewUtilities * | utilities () const
Public Member Functions inherited from Digikam::ItemCategorizedView
| ItemCategorizedView (QWidget *const parent=nullptr)
void | addOverlay (ItemDelegateOverlay *overlay, ItemDelegate *delegate=nullptr)
| Add and remove an overlay.
void | addSelectionOverlay (ItemDelegate *delegate=nullptr)
Album * | albumAt (const QPoint &pos) const
| If the model is categorized by an album, returns the album of the category that contains the position.
ItemInfoList | allItemInfos () const
QList< QUrl > | allUrls () const
Album * | currentAlbum () const
ItemInfo | currentInfo () const
QUrl | currentUrl () const
QItemSelectionModel * | getSelectionModel () const
QModelIndex | indexForInfo (const ItemInfo &info) const
ItemAlbumFilterModel * | itemAlbumFilterModel () const
ItemAlbumModel * | itemAlbumModel () const
ItemDelegate * | itemDelegate () const
virtual ItemFilterModel * | itemFilterModel () const
ItemModel * | itemModel () const
ImageSortFilterModel * | itemSortFilterModel () const
ItemThumbnailModel * | itemThumbnailModel () const
ItemInfo | nextInfo (const ItemInfo &info)
ItemInfo | nextInOrder (const ItemInfo &startingPoint, int nth)
ItemInfo | previousInfo (const ItemInfo &info)
void | removeOverlay (ItemDelegateOverlay *overlay)
ItemInfoList | selectedItemInfos () const
ItemInfoList | selectedItemInfosCurrentFirst () const
void | setModels (ItemModel *model, ImageSortFilterModel *filterModel)
ThumbnailSize | thumbnailSize () const
void | toIndex (const QUrl &url)
| Selects the index as current and scrolls to it.
Public Member Functions inherited from Digikam::ItemViewCategorized
| ItemViewCategorized (QWidget *const parent=nullptr)
void | awayFromSelection ()
DItemDelegate * | delegate () const
void | invertSelection ()
bool | isToolTipEnabled () const
int | numberOfSelectedIndexes () const
void | scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible) override
void | scrollToRelaxed (const QModelIndex &index, ScrollHint hint=EnsureVisible)
| Like scrollTo, but only scrolls if the index is not visible, regardless of hint.
void | setInitialSelectedItem (bool enabled)
| Ensure a initial selected item.
void | setScrollCurrentToCenter (bool enabled)
| Scroll automatically the current index to center of the view.
void | setScrollStepGranularity (int factor)
| Determine a step size for scrolling: The larger this number, the smaller and more precise is the scrolling.
void | setSelectedIndexes (const QList< QModelIndex > &indexes)
void | setSpacing (int spacing)
| Sets the spacing.
void | setToolTipEnabled (bool enabled)
void | setUsePointingHandCursor (bool useCursor)
| Set if the PointingHand Cursor should be shown over the activation area.
void | toFirstIndex ()
| Selects the index as current and scrolls to it.
void | toIndex (const QModelIndex &index)
void | toLastIndex ()
void | toNextIndex ()
void | toPreviousIndex ()
Public Member Functions inherited from Digikam::DCategorizedView
| DCategorizedView (QWidget *const parent=nullptr)
virtual QModelIndexList | categorizedIndexesIn (const QRect &rect) const
| This method will return all indexes whose visual rect intersects `rect`.
virtual QModelIndex | categoryAt (const QPoint &point) const
| This method will return the first index of the category in the region of which `point` is found.
DCategoryDrawer * | categoryDrawer () const
virtual QItemSelectionRange | categoryRange (const QModelIndex &index) const
| This method returns the range of indexes contained in the category in which `index` is sorted.
virtual QRect | categoryVisualRect (const QModelIndex &index) const
| This method will return the visual rect of the header of the category in which `index` is sorted.
QModelIndex | indexAt (const QPoint &point) const override
void | setCategoryDrawer (DCategoryDrawer *categoryDrawer)
void | setDrawDraggedItems (bool drawDraggedItems)
| Switch on drawing of dragged items.
void | setGridSize (const QSize &size)
void | setModel (QAbstractItemModel *model) override
QRect | visualRect (const QModelIndex &index) const override
Public Member Functions inherited from Digikam::DragDropViewImplementation
virtual void | copy ()
virtual void | cut ()
virtual void | paste ()
Public Member Functions inherited from Digikam::GroupingViewImplementation
ItemInfoList | getHiddenGroupedInfos (const ItemInfoList &infos) const
bool | needGroupResolving (OperationType type, const ItemInfoList &infos) const
ItemInfoList | resolveGrouping (const ItemInfoList &infos) const

## Protected Slots
void | groupIndicatorClicked (const QModelIndex &index)
void | showGroupContextMenu (const QModelIndex &index, QContextMenuEvent *event)
void | slotOpenGeolocationMap (const QModelIndex &index)
Protected Slots inherited from Digikam::ItemCategorizedView
void | slotCurrentUrlTimer ()
void | slotItemInfosAdded ()
Protected Slots inherited from Digikam::ItemViewCategorized
void | layoutAboutToBeChanged ()
void | layoutWasChanged ()
void | slotActivated (const QModelIndex &index)
void | slotClicked (const QModelIndex &index)
void | slotEntered (const QModelIndex &index)
virtual void | slotThemeChanged ()
Protected Slots inherited from Digikam::DCategorizedView
void | currentChanged (const QModelIndex &current, const QModelIndex &previous) override
void | rowsInserted (const QModelIndex &parent, int start, int end) override
virtual void | rowsInsertedArtifficial (const QModelIndex &parent, int start, int end)
virtual void | slotLayoutChanged ()
void | updateGeometries () override

## Protected Member Functions
void | activated (const ItemInfo &info, Qt::KeyboardModifiers modifiers) override
| Reimplement these in a subclass.
void | addAssignNameOverlay (ItemDelegate *delegate=nullptr)
void | addRejectionOverlay (ItemDelegate *delegate=nullptr)
bool | hasHiddenGroupedImages (const ItemInfo &info) const override
| must be implemented by parent view
ItemInfoList | imageInfos (const QList< QModelIndex > &indexes, OperationType type) const
void | showContextMenu (QContextMenuEvent *event) override
void | showContextMenuOnInfo (QContextMenuEvent *event, const ItemInfo &info) override
void | slotSetupChanged () override
Protected Member Functions inherited from Digikam::ItemCategorizedView
void | currentChanged (const QModelIndex &index, const QModelIndex &previous) override
AbstractItemDragDropHandler * | dragDropHandler () const override
| You need to implement these three methods Returns the drag drop handler.
QSortFilterProxyModel * | filterModel () const override
ItemInfo | imageInfo (const QModelIndex &index) const
ItemInfoList | imageInfos (const QList< QModelIndex > &indexes) const
void | indexActivated (const QModelIndex &index, Qt::KeyboardModifiers modifiers) override
void | installDefaultModels ()
| Install default ItemAlbumModel and filter model, ready for use.
QModelIndex | nextIndexHint (const QModelIndex &indexToAnchor, const QItemSelectionRange &removed) const override
| Assuming the given indexes would be removed (hypothetically!), return the index to be selected instead, starting from anchor.
void | selectionChanged (const QItemSelection &, const QItemSelection &) override
void | setItemDelegate (ItemDelegate *delegate)
void | showContextMenuOnIndex (QContextMenuEvent *event, const QModelIndex &index) override
| Reimplement these in a subclass.
void | updateGeometries () override
Protected Member Functions inherited from Digikam::ItemViewCategorized
void | contextMenuEvent (QContextMenuEvent *event) override
| reimplemented from parent class
QModelIndex | indexForCategoryAt (const QPoint &pos) const
| Returns an index that is representative for the category at position pos.
void | keyPressEvent (QKeyEvent *event) override
void | leaveEvent (QEvent *event) override
QModelIndex | mapIndexForDragDrop (const QModelIndex &index) const override
| Note: pure virtual dragDropHandler() still open from DragDropViewImplementation.
void | mouseMoveEvent (QMouseEvent *event) override
void | mousePressEvent (QMouseEvent *event) override
void | mouseReleaseEvent (QMouseEvent *event) override
QModelIndex | moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
QPixmap | pixmapForDrag (const QList< QModelIndex > &indexes) const override
| Creates a pixmap for dragging the given indexes.
void | reset () override
void | resizeEvent (QResizeEvent *e) override
void | rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) override
void | rowsInserted (const QModelIndex &parent, int start, int end) override
void | rowsRemoved (const QModelIndex &parent, int start, int end) override
void | selectionChanged (const QItemSelection &, const QItemSelection &) override
void | setItemDelegate (DItemDelegate *delegate)
void | setToolTip (ItemViewToolTip *tip)
virtual bool | showToolTip (const QModelIndex &index, QStyleOptionViewItem &option, QHelpEvent *e=nullptr)
| Provides default behavior, can reimplement in a subclass.
void | updateDelegateSizes ()
void | userInteraction ()
bool | viewportEvent (QEvent *event) override
void | wheelEvent (QWheelEvent *event) override
Protected Member Functions inherited from Digikam::DCategorizedView
void | dragLeaveEvent (QDragLeaveEvent *event) override
void | dragMoveEvent (QDragMoveEvent *event) override
void | dropEvent (QDropEvent *event) override
void | leaveEvent (QEvent *event) override
void | mouseMoveEvent (QMouseEvent *event) override
void | mousePressEvent (QMouseEvent *event) override
void | mouseReleaseEvent (QMouseEvent *event) override
QModelIndex | moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
void | paintEvent (QPaintEvent *event) override
void | resizeEvent (QResizeEvent *event) override
void | setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags flags) override
void | startDrag (Qt::DropActions supportedActions) override
Protected Member Functions inherited from Digikam::DragDropViewImplementation
virtual QAbstractItemView * | asView ()=0
| This one is implemented by DECLARE_VIEW_DRAG_DROP_METHODS.
bool | decodeIsCutSelection (const QMimeData *mimeData)
void | dragEnterEvent (QDragEnterEvent *event)
| Implements the relevant QAbstractItemView methods for drag and drop.
void | dragMoveEvent (QDragMoveEvent *e)
void | dropEvent (QDropEvent *e)
void | encodeIsCutSelection (QMimeData *mime, bool isCutSelection)
void | startDrag (Qt::DropActions supportedActions)

## Member Function Documentation

## ◆ activated()

void Digikam::DigikamItemView::activated | ( | const ItemInfo & | info,
|  | Qt::KeyboardModifiers | modifiers
| ) |  |
| override protected virtual

Reimplemented from Digikam::ItemCategorizedView.

## ◆ confirmFaces

void Digikam::DigikamItemView::confirmFaces | ( | const QList< QModelIndex > & | indexes,
|  | int | tagId
| ) |  |
| slot

You aren't allowed to "confirm" a person as Ignored. Marking as Ignored is treated as a changeTag() operation.

## ◆ hasHiddenGroupedImages()

bool Digikam::DigikamItemView::hasHiddenGroupedImages | ( | const ItemInfo & |  | ) | const
| override protected virtual

Reimplemented from Digikam::GroupingViewImplementation.

## ◆ rejectFaces

void Digikam::DigikamItemView::rejectFaces | ( | const QList< QModelIndex > & | indexes | ) |
| slot

If reject is done on an Unknown Face, it will mark the face as Ignored.

If reject is done on Unconfirmed suggestions, the suggestion is rejected and the face is marked as Unknown.

## ◆ removeFaces

void Digikam::DigikamItemView::removeFaces | ( | const QList< QModelIndex > & | indexes | ) |
| slot

You will have to run face detection again, to recover the face.

## ◆ setThumbnailSize()

void Digikam::DigikamItemView::setThumbnailSize | ( | const ThumbnailSize & | size | ) |
| override virtual

Reimplemented from Digikam::ItemCategorizedView.

## ◆ showContextMenu()

void Digikam::DigikamItemView::showContextMenu | ( | QContextMenuEvent * | event | ) |
| override protected virtual

Reimplemented from Digikam::ItemViewCategorized.

## ◆ showContextMenuOnInfo()

void Digikam::DigikamItemView::showContextMenuOnInfo | ( | QContextMenuEvent * | event,
|  | const ItemInfo & | info
| ) |  |
| override protected virtual

Reimplemented from Digikam::ItemCategorizedView.

## ◆ slotSetupChanged()

void Digikam::DigikamItemView::slotSetupChanged | ( |  | ) |
| override protected virtual

Reimplemented from Digikam::ItemViewCategorized.