digiKam
|
Item view for listing items. More...
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 |
DCategoryDrawer * | categoryDrawer () 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 ¤t, 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 |
Item view for listing items.
DCategorizedView allows you to use it as it were a QListView. Subclass DCategorizedSortFilterProxyModel to provide category information for items.
|
explicit |
|
override |
|
virtual |
This method will return all indexes whose visual rect intersects rect
.
rect | rectangle to test intersection with |
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
|
virtual |
This method will return the first index of the category in the region of which point
is found.
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedSortFilterProxyModel::sortColumn().
Referenced by Digikam::ItemViewCategorized::indexForCategoryAt().
DCategoryDrawer * Digikam::DCategorizedView::categoryDrawer | ( | ) | const |
|
virtual |
This method returns the range of indexes contained in the category in which index
is sorted.
References Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedSortFilterProxyModel::sortColumn().
|
virtual |
This method will return the visual rect of the header of the category in which index
is sorted.
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
|
overrideprotectedslot |
References Digikam::DCategorizedView::Private::biggestItemSize, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
Referenced by Digikam::ItemCategorizedView::currentChanged(), and Digikam::ImportCategorizedView::currentChanged().
|
overrideprotected |
|
overrideprotected |
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::dragLeftViewport, Digikam::DCategorizedView::Private::drawDraggedItems(), Digikam::DCategorizedView::Private::hovered, indexAt(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::mousePosition, and Digikam::DCategorizedView::Private::proxyModel.
|
overrideprotected |
|
override |
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
Referenced by Digikam::ItemViewCategorized::contextMenuEvent(), dragMoveEvent(), Digikam::ItemViewCategorized::mouseMoveEvent(), Digikam::ItemViewCategorized::mousePressEvent(), and Digikam::ItemViewCategorized::viewportEvent().
|
overrideprotected |
References Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::hoveredCategory, and Digikam::DCategorizedView::Private::mouseButtonPressed.
Referenced by Digikam::ActionCategorizedView::leaveEvent(), and Digikam::ItemViewCategorized::leaveEvent().
|
overrideprotected |
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedView::Private::drawItemsWhileDragging, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::hoveredCategory, Digikam::DCategorizedView::Private::initialPressPosition, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::lastDraggedItemsRect, Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::mousePosition, Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedView::Private::rightMouseButtonPressed.
Referenced by Digikam::ActionCategorizedView::mouseMoveEvent(), and Digikam::ItemViewCategorized::mouseMoveEvent().
|
overrideprotected |
References Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedView::Private::dragLeftViewport, Digikam::DCategorizedView::Private::hoveredCategory, Digikam::DCategorizedView::Private::initialPressPosition, Digikam::DCategorizedView::Private::lastSelection, Digikam::DCategorizedView::Private::mouseButtonPressed, and Digikam::DCategorizedView::Private::rightMouseButtonPressed.
Referenced by Digikam::ItemViewCategorized::mousePressEvent().
|
overrideprotected |
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::hoveredCategory, Digikam::DCategorizedView::Private::initialPressPosition, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::mousePosition, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedView::Private::rightMouseButtonPressed, and visualRect().
Referenced by Digikam::ItemViewCategorized::mouseReleaseEvent().
|
overrideprotected |
References Digikam::DCategorizedView::Private::biggestItemSize, Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
Referenced by Digikam::ItemViewCategorized::moveCursor().
|
overrideprotected |
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::categoryVisualRect(), Digikam::DCategorizedView::Private::dragLeftViewport, Digikam::DCategorizedView::Private::drawDraggedItems(), Digikam::DCategorizedView::Private::drawItemsWhileDragging, Digikam::DCategorizedView::Private::drawNewCategory(), Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::initialPressPosition, Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::mousePosition, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedSortFilterProxyModel::sortColumn(), and visualRect().
Referenced by Digikam::ImportCategorizedView::paintEvent().
|
overrideslot |
References Digikam::DCategorizedView::Private::biggestItemSize, Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoriesPosition, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::intersectedIndexes, Digikam::DCategorizedView::Private::lastSelection, Digikam::DCategorizedView::Private::mouseButtonPressed, and Digikam::DCategorizedView::Private::rightMouseButtonPressed.
Referenced by Digikam::ItemViewCategorized::reset().
|
overrideprotected |
References Digikam::DCategorizedView::Private::categoriesPosition, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedView::Private::updateScrollbars().
Referenced by Digikam::ItemViewCategorized::resizeEvent().
|
overrideprotectedslot |
References Digikam::DCategorizedView::Private::biggestItemSize, Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoriesPosition, Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::intersectedIndexes, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedView::Private::rightMouseButtonPressed, and rowsInsertedArtifficial().
Referenced by Digikam::ItemViewCategorized::rowsInserted().
|
protectedvirtualslot |
References Digikam::DCategorizedView::Private::biggestItemSize, Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoriesPosition, Digikam::DCategorizedView::Private::ElementInfo::category, Digikam::DCategorizedSortFilterProxyModel::CategoryDisplayRole, Digikam::DCategorizedView::Private::categoryUpperBound(), Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::intersectedIndexes, Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedView::Private::ElementInfo::relativeOffsetToCategory, Digikam::DCategorizedView::Private::rightMouseButtonPressed, Digikam::DCategorizedSortFilterProxyModel::sortColumn(), and Digikam::DCategorizedView::Private::updateScrollbars().
Referenced by rowsInserted(), rowsRemoved(), and slotLayoutChanged().
|
protectedvirtualslot |
Reimplemented in Digikam::ItemViewCategorized.
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and rowsInsertedArtifficial().
Referenced by Digikam::ItemViewCategorized::rowsRemoved(), and setModel().
void Digikam::DCategorizedView::setCategoryDrawer | ( | DCategoryDrawer * | categoryDrawer | ) |
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoriesPosition, categoryDrawer(), Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::intersectedIndexes, Digikam::DCategorizedView::Private::lastSelection, Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedView::Private::rightMouseButtonPressed, slotLayoutChanged(), and updateGeometries().
Referenced by Digikam::ImportCategorizedView::setItemDelegate(), Digikam::ItemCategorizedView::setItemDelegate(), and Digikam::ActionCategorizedView::setupIconMode().
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.
drawDraggedItems | if true , dragged items will be drawn |
References Digikam::DCategorizedView::Private::drawItemsWhileDragging.
Referenced by Digikam::ItemViewCategorized::ItemViewCategorized().
void Digikam::DCategorizedView::setGridSize | ( | const QSize & | size | ) |
References slotLayoutChanged().
Referenced by Digikam::ActionCategorizedView::adjustGridSize().
|
override |
References Digikam::DCategorizedView::Private::categories, Digikam::DCategorizedView::Private::categoriesIndexes, Digikam::DCategorizedView::Private::categoriesPosition, Digikam::DCategorizedView::Private::elementsInfo, Digikam::DCategorizedView::Private::elementsPosition, Digikam::DCategorizedView::Private::forcedSelectionPosition, Digikam::DCategorizedView::Private::hovered, Digikam::DCategorizedView::Private::intersectedIndexes, Digikam::DCategorizedView::Private::lastSelection, Digikam::DCategorizedView::Private::mouseButtonPressed, Digikam::DCategorizedView::Private::proxyModel, Digikam::DCategorizedView::Private::rightMouseButtonPressed, rowsRemoved(), and slotLayoutChanged().
Referenced by Digikam::ImportCategorizedView::setModels(), Digikam::ItemCategorizedView::setModels(), ShowFoto::ShowfotoCategorizedView::setModels(), and Digikam::EditorWindow::setupSelectToolsAction().
|
overrideprotected |
References Digikam::DCategorizedView::Private::cachedRectIndex(), Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedView::Private::contentsSize(), Digikam::DCategorizedView::Private::intersectionSet(), Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedView::Private::selectionForRect().
|
protectedvirtualslot |
|
overrideprotected |
|
overrideprotectedslot |
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), and Digikam::DCategorizedView::Private::proxyModel.
Referenced by setCategoryDrawer(), Digikam::ItemCategorizedView::updateGeometries(), and Digikam::ImportCategorizedView::updateGeometries().
|
override |
References Digikam::DCategorizedView::Private::categoryDrawer, Digikam::DCategorizedSortFilterProxyModel::isCategorizedModel(), Digikam::DCategorizedView::Private::proxyModel, and Digikam::DCategorizedView::Private::visualRect().
Referenced by Digikam::DCategorizedView::Private::drawDraggedItems(), Digikam::DCategorizedView::Private::intersectionSet(), Digikam::ItemViewCategorized::mouseMoveEvent(), mouseReleaseEvent(), paintEvent(), Digikam::ItemViewCategorized::scrollToRelaxed(), Digikam::ItemViewCategorized::showIndexNotification(), Digikam::ItemViewCategorized::slotActivated(), and Digikam::ItemViewCategorized::viewportEvent().