digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DCategorizedView Class Reference

Item view for listing items. More...

+ Inheritance diagram for Digikam::DCategorizedView:

Public Slots

void reset () override
 

Public Member Functions

 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.
 
DCategoryDrawercategoryDrawer () 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
 

Protected Slots

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 rowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void slotLayoutChanged ()
 
void updateGeometries () override
 

Protected Member Functions

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
 

Detailed Description

DCategorizedView allows you to use it as it were a QListView. Subclass DCategorizedSortFilterProxyModel to provide category information for items.

Member Function Documentation

◆ categorizedIndexesIn()

QModelIndexList Digikam::DCategorizedView::categorizedIndexesIn ( const QRect &  rect) const
virtual
Parameters
rectrectangle to test intersection with
Note
Returns an empty list if the view is not categorized.

◆ categoryAt()

QModelIndex Digikam::DCategorizedView::categoryAt ( const QPoint &  point) const
virtual
Note
Returns QModelIndex() if the view is not categorized.

◆ categoryRange()

QItemSelectionRange Digikam::DCategorizedView::categoryRange ( const QModelIndex &  index) const
virtual
Note
Returns an empty range if the view is no categorized.

◆ categoryVisualRect()

QRect Digikam::DCategorizedView::categoryVisualRect ( const QModelIndex &  index) const
virtual
Note
Returns QRect() if the view is not categorized.

◆ setDrawDraggedItems()

void Digikam::DCategorizedView::setDrawDraggedItems ( bool  drawDraggedItems)

Default: on. While dragging over the view, dragged items will be drawn transparently following the mouse cursor.

Parameters
drawDraggedItemsif true, dragged items will be drawn