Changeset View
Changeset View
Standalone View
Standalone View
lib/thumbnailview/previewitemdelegate.cpp
Show First 20 Lines • Show All 593 Lines • ▼ Show 20 Line(s) | 581 | { | |||
---|---|---|---|---|---|
594 | d->mDetails = FileNameDetail; | 594 | d->mDetails = FileNameDetail; | ||
595 | d->mContextBarActions = SelectionAction | FullScreenAction | RotateAction; | 595 | d->mContextBarActions = SelectionAction | FullScreenAction | RotateAction; | ||
596 | d->mTextElideMode = Qt::ElideRight; | 596 | d->mTextElideMode = Qt::ElideRight; | ||
597 | 597 | | |||
598 | connect(view, SIGNAL(rowsRemovedSignal(QModelIndex,int,int)), | 598 | connect(view, SIGNAL(rowsRemovedSignal(QModelIndex,int,int)), | ||
599 | SLOT(slotRowsChanged())); | 599 | SLOT(slotRowsChanged())); | ||
600 | connect(view, SIGNAL(rowsInsertedSignal(QModelIndex,int,int)), | 600 | connect(view, SIGNAL(rowsInsertedSignal(QModelIndex,int,int)), | ||
601 | SLOT(slotRowsChanged())); | 601 | SLOT(slotRowsChanged())); | ||
602 | connect(view, &ThumbnailView::selectionChangedSignal, [this]() { | ||||
603 | d->updateToggleSelectionButton(); | ||||
604 | }); | ||||
602 | 605 | | |||
603 | #ifndef GWENVIEW_SEMANTICINFO_BACKEND_NONE | 606 | #ifndef GWENVIEW_SEMANTICINFO_BACKEND_NONE | ||
604 | d->mRatingPainter.setAlignment(Qt::AlignHCenter | Qt::AlignBottom); | 607 | d->mRatingPainter.setAlignment(Qt::AlignHCenter | Qt::AlignBottom); | ||
605 | d->mRatingPainter.setLayoutDirection(view->layoutDirection()); | 608 | d->mRatingPainter.setLayoutDirection(view->layoutDirection()); | ||
606 | d->mRatingPainter.setMaxRating(10); | 609 | d->mRatingPainter.setMaxRating(10); | ||
607 | #endif | 610 | #endif | ||
608 | 611 | | |||
609 | connect(view, SIGNAL(thumbnailSizeChanged(QSize)), | 612 | connect(view, SIGNAL(thumbnailSizeChanged(QSize)), | ||
▲ Show 20 Lines • Show All 268 Lines • ▼ Show 20 Line(s) | |||||
878 | void PreviewItemDelegate::slotFullScreenClicked() | 881 | void PreviewItemDelegate::slotFullScreenClicked() | ||
879 | { | 882 | { | ||
880 | showDocumentInFullScreenRequested(urlForIndex(d->mIndexUnderCursor)); | 883 | showDocumentInFullScreenRequested(urlForIndex(d->mIndexUnderCursor)); | ||
881 | } | 884 | } | ||
882 | 885 | | |||
883 | void PreviewItemDelegate::slotToggleSelectionClicked() | 886 | void PreviewItemDelegate::slotToggleSelectionClicked() | ||
884 | { | 887 | { | ||
885 | d->mView->selectionModel()->select(d->mIndexUnderCursor, QItemSelectionModel::Toggle); | 888 | d->mView->selectionModel()->select(d->mIndexUnderCursor, QItemSelectionModel::Toggle); | ||
886 | d->updateToggleSelectionButton(); | | |||
muhlenpfordt: Not needed here (and the other place) anymore, since the `select()` above leads to the call. | |||||
887 | } | 889 | } | ||
888 | 890 | | |||
889 | PreviewItemDelegate::ThumbnailDetails PreviewItemDelegate::thumbnailDetails() const | 891 | PreviewItemDelegate::ThumbnailDetails PreviewItemDelegate::thumbnailDetails() const | ||
890 | { | 892 | { | ||
891 | return d->mDetails; | 893 | return d->mDetails; | ||
892 | } | 894 | } | ||
893 | 895 | | |||
894 | void PreviewItemDelegate::setThumbnailDetails(PreviewItemDelegate::ThumbnailDetails details) | 896 | void PreviewItemDelegate::setThumbnailDetails(PreviewItemDelegate::ThumbnailDetails details) | ||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Not needed here (and the other place) anymore, since the select() above leads to the call.