digiKam
Digikam::DCategorizedView Class Reference

Item view for listing items. More...

+ Inheritance diagram for Digikam::DCategorizedView:

Classes

class  Private
 

Public Slots

void reset () override
 

Public Member Functions

virtual QModelIndexList categorizedIndexesIn (const QRect &rect) const
 
virtual QModelIndex categoryAt (const QPoint &point) const
 
DCategoryDrawercategoryDrawer () const
 
virtual QItemSelectionRange categoryRange (const QModelIndex &index) const
 
virtual QRect categoryVisualRect (const QModelIndex &index) const
 
 DCategorizedView (QWidget *const parent=nullptr)
 
QModelIndex indexAt (const QPoint &point) const override
 
void setCategoryDrawer (DCategoryDrawer *categoryDrawer)
 
void setDrawDraggedItems (bool drawDraggedItems)
 
void setGridSize (const QSize &size)
 
void setModel (QAbstractItemModel *model) override
 
QRect visualRect (const QModelIndex &index) const override
 
 ~DCategorizedView () 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

Item view for listing items.

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

Constructor & Destructor Documentation

◆ DCategorizedView()

Digikam::DCategorizedView::DCategorizedView ( QWidget *const  parent = nullptr)
explicit

◆ ~DCategorizedView()

Digikam::DCategorizedView::~DCategorizedView ( )
override

Member Function Documentation

◆ categorizedIndexesIn()

QModelIndexList Digikam::DCategorizedView::categorizedIndexesIn ( const QRect &  rect) const
virtual

This method will return all indexes whose visual rect intersects rect.

Parameters
rectrectangle to test intersection with
Note
Returns an empty list if the view is not categorized.

References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.

◆ categoryAt()

QModelIndex Digikam::DCategorizedView::categoryAt ( const QPoint &  point) const
virtual

◆ categoryDrawer()

◆ categoryRange()

QItemSelectionRange Digikam::DCategorizedView::categoryRange ( const QModelIndex &  index) const
virtual

◆ categoryVisualRect()

QRect Digikam::DCategorizedView::categoryVisualRect ( const QModelIndex &  index) const
virtual

◆ currentChanged

◆ dragLeaveEvent()

void Digikam::DCategorizedView::dragLeaveEvent ( QDragLeaveEvent *  event)
overrideprotected

◆ dragMoveEvent()

◆ dropEvent()

void Digikam::DCategorizedView::dropEvent ( QDropEvent *  event)
overrideprotected

◆ indexAt()

◆ leaveEvent()

◆ mouseMoveEvent()

◆ mousePressEvent()

◆ mouseReleaseEvent()

◆ moveCursor()

◆ paintEvent()

◆ reset

◆ resizeEvent()

◆ rowsInserted

◆ rowsInsertedArtifficial

◆ rowsRemoved

void Digikam::DCategorizedView::rowsRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtualslot

◆ setCategoryDrawer()

◆ setDrawDraggedItems()

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

Switch on drawing of dragged items. 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

References Digikam::DCategorizedView::Private::drawItemsWhileDragging.

Referenced by Digikam::ItemViewCategorized::ItemViewCategorized().

◆ setGridSize()

void Digikam::DCategorizedView::setGridSize ( const QSize &  size)

◆ setModel()

◆ setSelection()

◆ slotLayoutChanged

◆ startDrag()

void Digikam::DCategorizedView::startDrag ( Qt::DropActions  supportedActions)
overrideprotected

◆ updateGeometries

◆ visualRect()


The documentation for this class was generated from the following files: