digiKam Developer Documentation: Digikam::ItemViewCategorized Class Reference

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

Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Digikam::ItemViewCategorized Class Referenceabstract
Inheritance diagram for Digikam::ItemViewCategorized:

## Public Slots
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 | 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
| ItemViewCategorized (QWidget *const parent=nullptr)
void | awayFromSelection ()
DItemDelegate * | delegate () const
virtual QSortFilterProxyModel * | filterModel () const =0
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 ()

## Protected Slots
void | layoutAboutToBeChanged ()
void | layoutWasChanged ()
void | slotActivated (const QModelIndex &index)
void | slotClicked (const QModelIndex &index)
void | slotEntered (const QModelIndex &index)
virtual void | slotSetupChanged ()
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 | contextMenuEvent (QContextMenuEvent *event) override
| reimplemented from parent class
virtual void | indexActivated (const QModelIndex &index, Qt::KeyboardModifiers modifiers)
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
virtual QModelIndex | nextIndexHint (const QModelIndex &indexToAnchor, const QItemSelectionRange &removed) const
| Assuming the given indexes would be removed (hypothetically!), return the index to be selected instead, starting from anchor.
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 void | showContextMenu (QContextMenuEvent *event)
virtual void | showContextMenuOnIndex (QContextMenuEvent *event, const QModelIndex &index)
| Reimplement these in a subclass.
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)
virtual AbstractItemDragDropHandler * | dragDropHandler () const =0
| You need to implement these three methods Returns the drag drop handler.
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

## ◆ filterModel()

virtual QSortFilterProxyModel * Digikam::ItemViewCategorized::filterModel | ( |  | ) | const
| pure virtual

Implemented in ShowFoto::ShowfotoCategorizedView, and Digikam::ImportCategorizedView.

## ◆ itemSelectionChanged

void Digikam::ItemViewCategorized::itemSelectionChanged | ( |  | ) |
| signal

Any of the signals below will be emitted before.

## ◆ keyPressed

void Digikam::ItemViewCategorized::keyPressed | ( | QKeyEvent * | e | ) |
| signal

This signal is emitted after being handled by this widget. You can accept it if ignored.

## ◆ mapIndexForDragDrop()

QModelIndex Digikam::ItemViewCategorized::mapIndexForDragDrop | ( | const QModelIndex & | index | ) | const
| overrideprotectedvirtual

cut(), copy(), paste(), dragEnterEvent(), dragMoveEvent(), dropEvent(), startDrag() are implemented by DragDropViewImplementation

Implements Digikam::DragDropViewImplementation.

## ◆ nextIndexHint()

QModelIndex Digikam::ItemViewCategorized::nextIndexHint | ( | const QModelIndex & | indexToAnchor,
|  | const QItemSelectionRange & | removed
| ) |  | const
| protectedvirtual

The default implementation returns the next remaining sibling.

Reimplemented in Digikam::ItemCategorizedView, ShowFoto::ShowfotoCategorizedView, and Digikam::ImportCategorizedView.

## ◆ pixmapForDrag()

QPixmap Digikam::ItemViewCategorized::pixmapForDrag | ( | const QList< QModelIndex > & | indexes | ) | const
| overrideprotectedvirtual

Implements Digikam::DragDropViewImplementation.

## ◆ rowsRemoved()

void Digikam::ItemViewCategorized::rowsRemoved | ( | const QModelIndex & | parent,
|  | int | start,
|  | int | end
| ) |  |
| overrideprotectedvirtual

Reimplemented from Digikam::DCategorizedView.

## ◆ setScrollStepGranularity()

void Digikam::ItemViewCategorized::setScrollStepGranularity | ( | int | factor | ) |

Default is 10.

## ◆ setSpacing()

void Digikam::ItemViewCategorized::setSpacing | ( | int | spacing | ) |

Does not use setSpacing()/spacing() from QListView

## ◆ showContextMenuOnIndex()

void Digikam::ItemViewCategorized::showContextMenuOnIndex | ( | QContextMenuEvent * | event,
|  | const QModelIndex & | index
| ) |  |
| protectedvirtual

Reimplemented in Digikam::ItemCategorizedView, ShowFoto::ShowfotoCategorizedView, and Digikam::ImportCategorizedView.

## ◆ showToolTip()

bool Digikam::ItemViewCategorized::showToolTip | ( | const QModelIndex & | index,
|  | QStyleOptionViewItem & | option,
|  | QHelpEvent * | e = `nullptr`
| ) |  |
| protectedvirtual

Returns true if a tooltip was shown. The help event is optional.

## ◆ signalClicked

void Digikam::ItemViewCategorized::signalClicked | ( | const QMouseEvent * | e,
|  | const QModelIndex & | index
| ) |  |
| signal

Do not change the mouse events.