digiKam
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)
 

Signals

void clicked (const QMouseEvent *e, const QModelIndex &index)
 
void entered (const QMouseEvent *e, const QModelIndex &index)
 
void keyPressed (QKeyEvent *e)
 
void selectionChanged ()
 
void selectionCleared ()
 
void viewportClicked (const QMouseEvent *e)
 
void zoomInStep ()
 
void zoomOutStep ()
 

Public Member Functions

void awayFromSelection ()
 
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
 
DItemDelegatedelegate () const
 
virtual QSortFilterProxyModel * filterModel () const =0
 
QModelIndex indexAt (const QPoint &point) const override
 
void invertSelection ()
 
bool isToolTipEnabled () const
 
 ItemViewCategorized (QWidget *const parent=nullptr)
 
int numberOfSelectedIndexes () const
 
void scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible) override
 
void scrollToRelaxed (const QModelIndex &index, ScrollHint hint=EnsureVisible)
 
void setCategoryDrawer (DCategoryDrawer *categoryDrawer)
 
void setDrawDraggedItems (bool drawDraggedItems)
 
void setGridSize (const QSize &size)
 
void setModel (QAbstractItemModel *model) override
 
void setScrollCurrentToCenter (bool enabled)
 
void setScrollStepGranularity (int factor)
 
void setSelectedIndexes (const QList< QModelIndex > &indexes)
 
void setSpacing (int spacing)
 
void setToolTipEnabled (bool enabled)
 
void setUsePointingHandCursor (bool useCursor)
 
void toFirstIndex ()
 
void toIndex (const QModelIndex &index)
 
void toLastIndex ()
 
void toNextIndex ()
 
void toPreviousIndex ()
 
QRect visualRect (const QModelIndex &index) const override
 
 ~ItemViewCategorized () override
 

Protected Slots

void currentChanged (const QModelIndex &current, const QModelIndex &previous) override
 
void layoutAboutToBeChanged ()
 
void layoutWasChanged ()
 
virtual void rowsInsertedArtifficial (const QModelIndex &parent, int start, int end)
 
void slotActivated (const QModelIndex &index)
 
void slotClicked (const QModelIndex &index)
 
void slotEntered (const QModelIndex &index)
 
virtual void slotLayoutChanged ()
 
virtual void slotSetupChanged ()
 
virtual void slotThemeChanged ()
 
void updateGeometries () override
 

Protected Member Functions

virtual QAbstractItemView * asView ()=0
 
void contextMenuEvent (QContextMenuEvent *event) override
 reimplemented from parent class More...
 
bool decodeIsCutSelection (const QMimeData *mimeData)
 
virtual AbstractItemDragDropHandlerdragDropHandler () const =0
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dragLeaveEvent (QDragLeaveEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *e)
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *e)
 
void dropEvent (QDropEvent *event) override
 
void encodeIsCutSelection (QMimeData *mime, bool isCutSelection)
 
virtual void indexActivated (const QModelIndex &index, Qt::KeyboardModifiers modifiers)
 
QModelIndex indexForCategoryAt (const QPoint &pos) const
 
void keyPressEvent (QKeyEvent *event) override
 
void leaveEvent (QEvent *event) override
 
QModelIndex mapIndexForDragDrop (const QModelIndex &index) const override
 
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
 
void paintEvent (QPaintEvent *event) override
 
QPixmap pixmapForDrag (const QList< QModelIndex > &indexes) const override
 
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 setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags flags) override
 
void setToolTip (ItemViewToolTip *tip)
 
virtual void showContextMenu (QContextMenuEvent *event)
 
virtual void showContextMenuOnIndex (QContextMenuEvent *event, const QModelIndex &index)
 Reimplement these in a subclass. More...
 
virtual bool showToolTip (const QModelIndex &index, QStyleOptionViewItem &option, QHelpEvent *e=nullptr)
 
void startDrag (Qt::DropActions supportedActions)
 
void startDrag (Qt::DropActions supportedActions) override
 
void updateDelegateSizes ()
 
void userInteraction ()
 
bool viewportEvent (QEvent *event) override
 
void wheelEvent (QWheelEvent *event) override
 

Constructor & Destructor Documentation

◆ ItemViewCategorized()

◆ ~ItemViewCategorized()

Digikam::ItemViewCategorized::~ItemViewCategorized ( )
override

Member Function Documentation

◆ asView()

virtual QAbstractItemView* Digikam::DragDropViewImplementation::asView ( )
protectedpure virtualinherited

◆ awayFromSelection()

◆ categorizedIndexesIn()

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

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
virtualinherited

◆ categoryDrawer()

◆ categoryRange()

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

◆ categoryVisualRect()

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

◆ clicked

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

For overlays: Like the respective parent class signals, but with additional info. Do not change the mouse events.

Referenced by ItemViewCategorized(), and slotClicked().

◆ contextMenuEvent()

void Digikam::ItemViewCategorized::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotected

◆ copy

void Digikam::ItemViewCategorized::copy ( )
inlineoverrideslot

◆ currentChanged

◆ cut

void Digikam::ItemViewCategorized::cut ( )
inlineoverrideslot

◆ decodeIsCutSelection()

bool Digikam::ItemViewCategorized::decodeIsCutSelection ( const QMimeData *  mimeData)
protected

◆ delegate()

DItemDelegate * Digikam::ItemViewCategorized::delegate ( ) const

Referenced by setItemDelegate().

◆ dragDropHandler()

◆ dragEnterEvent()

void Digikam::DragDropViewImplementation::dragEnterEvent ( QDragEnterEvent *  event)
protectedinherited

Implements the relevant QAbstractItemView methods for drag and drop.

References Digikam::AbstractItemDragDropHandler::acceptsMimeData(), and Digikam::DragDropViewImplementation::dragDropHandler().

◆ dragLeaveEvent()

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

◆ dragMoveEvent() [1/2]

◆ dragMoveEvent() [2/2]

◆ dropEvent() [1/2]

◆ dropEvent() [2/2]

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

◆ encodeIsCutSelection()

void Digikam::ItemViewCategorized::encodeIsCutSelection ( QMimeData *  mime,
bool  isCutSelection 
)
protected

◆ entered

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

Referenced by ItemViewCategorized(), and slotEntered().

◆ filterModel()

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

◆ hideIndexNotification

◆ indexActivated()

void Digikam::ItemViewCategorized::indexActivated ( const QModelIndex &  index,
Qt::KeyboardModifiers  modifiers 
)
protectedvirtual

◆ indexAt()

◆ indexForCategoryAt()

QModelIndex Digikam::ItemViewCategorized::indexForCategoryAt ( const QPoint &  pos) const
protected

Returns an index that is representative for the category at position pos

References Digikam::DCategorizedView::categoryAt().

Referenced by Digikam::ItemCategorizedView::albumAt().

◆ invertSelection()

void Digikam::ItemViewCategorized::invertSelection ( )

◆ isToolTipEnabled()

bool Digikam::ItemViewCategorized::isToolTipEnabled ( ) const

◆ keyPressed

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

Remember you may want to check if the event is accepted or ignored. This signal is emitted after being handled by this widget. You can accept it if ignored.

Referenced by keyPressEvent().

◆ keyPressEvent()

void Digikam::ItemViewCategorized::keyPressEvent ( QKeyEvent *  event)
overrideprotected

◆ layoutAboutToBeChanged

◆ layoutWasChanged

◆ leaveEvent()

void Digikam::ItemViewCategorized::leaveEvent ( QEvent *  event)
overrideprotected

◆ mapIndexForDragDrop()

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

◆ mouseMoveEvent()

void Digikam::ItemViewCategorized::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

◆ mousePressEvent()

void Digikam::ItemViewCategorized::mousePressEvent ( QMouseEvent *  event)
overrideprotected

◆ mouseReleaseEvent()

void Digikam::ItemViewCategorized::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

◆ moveCursor()

QModelIndex Digikam::ItemViewCategorized::moveCursor ( CursorAction  cursorAction,
Qt::KeyboardModifiers  modifiers 
)
overrideprotected

◆ nextIndexHint()

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

Assuming the given indexes would be removed (hypothetically!), return the index to be selected instead, starting from anchor. The default implementation returns the next remaining sibling.

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

Referenced by layoutAboutToBeChanged(), Digikam::ItemCategorizedView::nextIndexHint(), Digikam::ImportCategorizedView::nextIndexHint(), and rowsAboutToBeRemoved().

◆ numberOfSelectedIndexes()

int Digikam::ItemViewCategorized::numberOfSelectedIndexes ( ) const

◆ paintEvent()

◆ paste

void Digikam::ItemViewCategorized::paste ( )
inlineoverrideslot

◆ pixmapForDrag()

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

Creates a pixmap for dragging the given indexes.

Implements Digikam::DragDropViewImplementation.

◆ reset()

void Digikam::ItemViewCategorized::reset ( )
overrideprotected

◆ resizeEvent()

void Digikam::ItemViewCategorized::resizeEvent ( QResizeEvent *  e)
overrideprotected

◆ rowsAboutToBeRemoved()

void Digikam::ItemViewCategorized::rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotected

References nextIndexHint().

◆ rowsInserted()

void Digikam::ItemViewCategorized::rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotected

◆ rowsInsertedArtifficial

◆ rowsRemoved()

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

◆ scrollTo()

◆ scrollToRelaxed()

void Digikam::ItemViewCategorized::scrollToRelaxed ( const QModelIndex &  index,
ScrollHint  hint = EnsureVisible 
)

Like scrollTo, but only scrolls if the index is not visible, regardless of hint.

References scrollTo(), and Digikam::DCategorizedView::visualRect().

Referenced by layoutWasChanged(), and resizeEvent().

◆ selectionChanged [1/2]

void Digikam::ItemViewCategorized::selectionChanged ( )
signal

Emitted when any selection change occurs. Any of the signals below will be emitted before.

Referenced by reset(), Digikam::ItemCategorizedView::selectionChanged(), selectionChanged(), and Digikam::ImportCategorizedView::selectionChanged().

◆ selectionChanged() [2/2]

void Digikam::ItemViewCategorized::selectionChanged ( const QItemSelection &  selectedItems,
const QItemSelection &  deselectedItems 
)
overrideprotected

◆ selectionCleared

void Digikam::ItemViewCategorized::selectionCleared ( )
signal

Emitted when the selection is completely cleared.

Referenced by reset(), and selectionChanged().

◆ setCategoryDrawer()

◆ setDrawDraggedItems()

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

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

◆ setGridSize()

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

◆ setItemDelegate()

void Digikam::ItemViewCategorized::setItemDelegate ( DItemDelegate delegate)
protected

◆ setModel()

◆ setScrollCurrentToCenter()

void Digikam::ItemViewCategorized::setScrollCurrentToCenter ( bool  enabled)

◆ setScrollStepGranularity()

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

Determine a step size for scrolling: The larger this number, the smaller and more precise is the scrolling. Default is 10.

Referenced by Digikam::ImportThumbnailBar::ImportThumbnailBar(), Digikam::ItemThumbnailBar::ItemThumbnailBar(), and ShowFoto::ShowfotoThumbnailBar::ShowfotoThumbnailBar().

◆ setSelectedIndexes()

void Digikam::ItemViewCategorized::setSelectedIndexes ( const QList< QModelIndex > &  indexes)

◆ setSelection()

◆ setSpacing()

◆ setToolTip()

◆ setToolTipEnabled()

◆ setUsePointingHandCursor()

void Digikam::ItemViewCategorized::setUsePointingHandCursor ( bool  useCursor)

◆ showContextMenu()

void Digikam::ItemViewCategorized::showContextMenu ( QContextMenuEvent *  event)
protectedvirtual

◆ showContextMenuOnIndex()

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

Reimplement these in a subclass.

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

Referenced by contextMenuEvent().

◆ showIndexNotification

void Digikam::ItemViewCategorized::showIndexNotification ( const QModelIndex &  index,
const QString &  message 
)
slot

◆ showToolTip()

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

Provides default behavior, can reimplement in a subclass. Returns true if a tooltip was shown. The help event is optional.

Referenced by viewportEvent().

◆ slotActivated

void Digikam::ItemViewCategorized::slotActivated ( const QModelIndex &  index)
protectedslot

◆ slotClicked

void Digikam::ItemViewCategorized::slotClicked ( const QModelIndex &  index)
protectedslot

References clicked().

Referenced by ItemViewCategorized().

◆ slotEntered

void Digikam::ItemViewCategorized::slotEntered ( const QModelIndex &  index)
protectedslot

References entered().

Referenced by ItemViewCategorized().

◆ slotLayoutChanged

◆ slotSetupChanged

◆ slotThemeChanged

void Digikam::ItemViewCategorized::slotThemeChanged ( )
protectedvirtualslot

Referenced by ItemViewCategorized().

◆ startDrag() [1/2]

void Digikam::DragDropViewImplementation::startDrag ( Qt::DropActions  supportedActions)
protectedinherited

◆ startDrag() [2/2]

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

◆ toFirstIndex()

void Digikam::ItemViewCategorized::toFirstIndex ( )

Selects the index as current and scrolls to it

References moveCursor().

◆ toIndex()

void Digikam::ItemViewCategorized::toIndex ( const QModelIndex &  index)

◆ toLastIndex()

void Digikam::ItemViewCategorized::toLastIndex ( )

References moveCursor().

◆ toNextIndex()

void Digikam::ItemViewCategorized::toNextIndex ( )

References moveCursor(), and toIndex().

Referenced by awayFromSelection().

◆ toPreviousIndex()

void Digikam::ItemViewCategorized::toPreviousIndex ( )

References moveCursor(), and toIndex().

Referenced by awayFromSelection().

◆ updateDelegateSizes()

◆ updateGeometries

◆ userInteraction()

void Digikam::ItemViewCategorized::userInteraction ( )
protected

◆ viewportClicked

void Digikam::ItemViewCategorized::viewportClicked ( const QMouseEvent *  e)
signal

While clicked() is emitted with a valid index, this corresponds to clicking on empty space

Referenced by mousePressEvent().

◆ viewportEvent()

bool Digikam::ItemViewCategorized::viewportEvent ( QEvent *  event)
overrideprotected

◆ visualRect()

◆ wheelEvent()

void Digikam::ItemViewCategorized::wheelEvent ( QWheelEvent *  event)
overrideprotected

References zoomInStep(), and zoomOutStep().

◆ zoomInStep

void Digikam::ItemViewCategorized::zoomInStep ( )
signal

Referenced by wheelEvent().

◆ zoomOutStep

void Digikam::ItemViewCategorized::zoomOutStep ( )
signal

Referenced by wheelEvent().


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