25 #ifndef DIGIKAM_ITEM_VIEW_DELEGATE_H
26 #define DIGIKAM_ITEM_VIEW_DELEGATE_H
38 class ItemViewDelegatePrivate;
58 void setRatingEdited(
const QModelIndex& index);
60 QSize sizeHint(
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
61 QSize gridSize()
const override;
64 void setThumbnailSize(
const ThumbnailSize& thumbSize)
override;
65 void setSpacing(
int spacing)
override;
66 void setDefaultViewOptions(
const QStyleOptionViewItem& option)
override;
67 bool acceptsToolTip(
const QPoint& pos,
const QRect& visualRect,
68 const QModelIndex& index, QRect* tooltipRect =
nullptr)
const override;
69 bool acceptsActivation(
const QPoint& pos,
const QRect& visualRect,
70 const QModelIndex& index, QRect* activationRect =
nullptr)
const override;
76 virtual QRect pixmapRect()
const;
85 virtual QRect imageInformationRect()
const;
91 virtual QRect ratingRect()
const;
93 void mouseMoved(QMouseEvent* e,
const QRect& visualRect,
const QModelIndex& index)
override;
97 void slotThemeChanged();
98 void slotSetupChanged();
100 void overlayDestroyed(QObject* o)
override;
112 QRect drawThumbnail(QPainter* p,
const QRect& thumbRect,
const QPixmap& background,
const QPixmap& thumbnail,
bool isGrouped)
const;
113 void drawRating(QPainter* p,
const QModelIndex& index,
const QRect& ratingRect,
int rating,
bool isSelected)
const;
114 void drawSpecialInfo(QPainter* p,
const QRect& r,
const QString& text)
const;
115 void drawName(QPainter* p,
const QRect& nameRect,
const QString& name)
const;
116 void drawTitle(QPainter *p,
const QRect& titleRect,
const QString& title)
const;
117 void drawComments(QPainter* p,
const QRect& commentsRect,
const QString& comments)
const;
118 void drawCreationDate(QPainter* p,
const QRect& dateRect,
const QDateTime& date)
const;
119 void drawModificationDate(QPainter* p,
const QRect& dateRect,
const QDateTime& date)
const;
120 void drawImageSize(QPainter* p,
const QRect& dimsRect,
const QSize& dims)
const;
121 void drawAspectRatio(QPainter* p,
const QRect& dimsRect,
const QSize& dims)
const;
122 void drawFileSize(QPainter* p,
const QRect& r, qlonglong bytes)
const;
123 void drawTags(QPainter* p,
const QRect& r,
const QString& tagsString,
bool isSelected)
const;
124 void drawImageFormat(QPainter* p,
const QRect& r,
const QString& f,
bool drawTop)
const;
125 void drawColorLabelRect(QPainter* p,
const QStyleOptionViewItem& option,
bool isSelected,
int colorId)
const;
126 void drawPickLabelIcon(QPainter* p,
const QRect& r,
int pickLabel)
const;
127 void drawGroupIndicator(QPainter* p,
const QRect& r,
int numberOfGroupedImages,
bool open)
const;
128 void drawGeolocationIndicator(QPainter* p,
const QRect& r)
const;
129 void drawPanelSideIcon(QPainter* p,
bool left,
bool right)
const;
130 void drawFocusRect(QPainter* p,
const QStyleOptionViewItem& option,
bool isSelected)
const;
131 void drawMouseOverRect(QPainter* p,
const QStyleOptionViewItem& option)
const;
133 void prepareMetrics(
int maxWidth);
134 void prepareBackground();
135 void prepareRatingPixmaps(
bool composeOverBackground =
true);
140 QPixmap ratingPixmap(
int rating,
bool selected)
const;
142 QAbstractItemDelegate* asDelegate()
override;
145 virtual void invalidatePaintingCache();
Definition: ditemdelegate.h:42
Definition: itemdelegateoverlay.h:333
Definition: itemviewdelegate_p.h:50
Definition: itemviewdelegate.h:42
virtual void updateSizeRectsAndPixmaps()=0
void requestNotification(const QModelIndex &index, const QString &message)
ItemViewDelegatePrivate *const d_ptr
Definition: itemviewdelegate.h:150
Definition: thumbnailsize.h:42
Definition: datefolderview.cpp:43