25 #ifndef DIGIKAM_ITEM_VIEW_IMPORT_DELEGATE_H
26 #define DIGIKAM_ITEM_VIEW_IMPORT_DELEGATE_H
37 class ImportCategoryDrawer;
38 class ImportCategorizedView;
39 class ImportFilterModel;
40 class ImportItemModel;
41 class ItemViewImportDelegatePrivate;
58 QSize
sizeHint(
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
67 const QModelIndex& index, QRect* tooltipRect =
nullptr)
const override;
69 const QModelIndex& index, QRect* activationRect =
nullptr)
const override;
98 void mouseMoved(QMouseEvent* e,
const QRect& visualRect,
const QModelIndex& index)
override;
115 QRect
drawThumbnail(QPainter* p,
const QRect& thumbRect,
const QPixmap& background,
const QPixmap& thumbnail)
const;
116 void drawRating(QPainter* p,
const QModelIndex& index,
const QRect&
ratingRect,
int rating,
bool isSelected)
const;
117 void drawName(QPainter* p,
const QRect& nameRect,
const QString& name)
const;
118 void drawCreationDate(QPainter* p,
const QRect& dateRect,
const QDateTime& date)
const;
119 void drawImageSize(QPainter* p,
const QRect& dimsRect,
const QSize& dims)
const;
120 void drawImageFormat(QPainter* p,
const QRect& dimsRect,
const QString& mime)
const;
121 void drawFileSize(QPainter* p,
const QRect& r, qlonglong bytes)
const;
122 void drawTags(QPainter* p,
const QRect& r,
const QString& tagsString,
bool isSelected)
const;
123 void drawGroupIndicator(QPainter* p,
const QRect& r,
int numberOfGroupedImages,
bool open)
const;
125 void drawColorLabelRect(QPainter* p,
const QStyleOptionViewItem& option,
bool isSelected,
int colorId)
const;
129 void drawFocusRect(QPainter* p,
const QStyleOptionViewItem& option,
bool isSelected)
const;
Definition: ditemdelegate.h:42
Definition: itemdelegateoverlay.h:333
Definition: itemviewimportdelegate_p.h:49
NOTE: Some reuse of the existing model-view classes.
Definition: itemviewimportdelegate.h:46
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: itemviewimportdelegate.cpp:178
void drawFileSize(QPainter *p, const QRect &r, qlonglong bytes) const
Definition: itemviewimportdelegate.cpp:380
void prepareBackground()
Definition: itemviewimportdelegate.cpp:594
void setThumbnailSize(const ThumbnailSize &thumbSize) override
reimplemented from DItemDelegate
Definition: itemviewimportdelegate.cpp:116
QRect drawThumbnail(QPainter *p, const QRect &thumbRect, const QPixmap &background, const QPixmap &thumbnail) const
Use the tool methods for painting in subclasses.
Definition: itemviewimportdelegate.cpp:265
void prepareRatingPixmaps(bool composeOverBackground=true)
Definition: itemviewimportdelegate.cpp:619
void drawName(QPainter *p, const QRect &nameRect, const QString &name) const
Definition: itemviewimportdelegate.cpp:307
void prepareMetrics(int maxWidth)
Definition: itemviewimportdelegate.cpp:576
void setSpacing(int spacing) override
Definition: itemviewimportdelegate.cpp:127
void slotSetupChanged()
Definition: itemviewimportdelegate.cpp:242
void drawRating(QPainter *p, const QModelIndex &index, const QRect &ratingRect, int rating, bool isSelected) const
Definition: itemviewimportdelegate.cpp:296
void drawCreationDate(QPainter *p, const QRect &dateRect, const QDateTime &date) const
Definition: itemviewimportdelegate.cpp:315
void drawGroupIndicator(QPainter *p, const QRect &r, int numberOfGroupedImages, bool open) const
Definition: itemviewimportdelegate.cpp:515
void drawImageFormat(QPainter *p, const QRect &dimsRect, const QString &mime) const
Definition: itemviewimportdelegate.cpp:325
ItemViewImportDelegatePrivate *const d_ptr
Definition: itemviewimportdelegate.h:147
void drawImageSize(QPainter *p, const QRect &dimsRect, const QSize &dims) const
Definition: itemviewimportdelegate.cpp:356
QAbstractItemDelegate * asDelegate() override
Returns the delegate, typically, the derived class.
Definition: itemviewimportdelegate.cpp:212
void setDefaultViewOptions(const QStyleOptionViewItem &option) override
Definition: itemviewimportdelegate.cpp:229
void prepareFonts()
Definition: itemviewimportdelegate.cpp:552
QPixmap ratingPixmap(int rating, bool selected) const
Returns the relevant pixmap from the cached rating pixmaps.
Definition: itemviewimportdelegate.cpp:696
void drawLockIndicator(QPainter *p, const QRect &r, int lockStatus) const
Definition: itemviewimportdelegate.cpp:478
void mouseMoved(QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override
Definition: itemviewimportdelegate.cpp:222
virtual QRect imageInformationRect() const
Definition: itemviewimportdelegate.cpp:159
void drawPickLabelIcon(QPainter *p, const QRect &r, int pickLabel) const
Definition: itemviewimportdelegate.cpp:400
void drawDownloadIndicator(QPainter *p, const QRect &r, int itemType) const
Definition: itemviewimportdelegate.cpp:453
int spacing() const
Definition: itemviewimportdelegate.cpp:140
virtual QRect pixmapRect() const
Definition: itemviewimportdelegate.cpp:154
QRect rect() const
Definition: itemviewimportdelegate.cpp:147
virtual QRect ratingRect() const
Definition: itemviewimportdelegate.cpp:164
void setRatingEdited(const QModelIndex &index)
Definition: itemviewimportdelegate.cpp:171
void requestNotification(const QModelIndex &index, const QString &message)
QSize gridSize() const override
Definition: itemviewimportdelegate.cpp:185
virtual void updateSizeRectsAndPixmaps()=0
void slotThemeChanged()
Definition: itemviewimportdelegate.cpp:237
bool acceptsToolTip(const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *tooltipRect=nullptr) const override
Definition: itemviewimportdelegate.cpp:192
void overlayDestroyed(QObject *o) override
Definition: itemviewimportdelegate.cpp:217
void drawTags(QPainter *p, const QRect &r, const QString &tagsString, bool isSelected) const
Definition: itemviewimportdelegate.cpp:388
void drawFocusRect(QPainter *p, const QStyleOptionViewItem &option, bool isSelected) const
Definition: itemviewimportdelegate.cpp:501
void drawGeolocationIndicator(QPainter *p, const QRect &r) const
Definition: itemviewimportdelegate.cpp:441
ItemViewImportDelegate(QObject *const parent=nullptr)
Definition: itemviewimportdelegate.cpp:89
bool acceptsActivation(const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *activationRect=nullptr) const override
Definition: itemviewimportdelegate.cpp:202
virtual void invalidatePaintingCache()
reimplement these in subclasses
Definition: itemviewimportdelegate.cpp:247
ThumbnailSize thumbnailSize() const
Definition: itemviewimportdelegate.cpp:109
~ItemViewImportDelegate() override
Definition: itemviewimportdelegate.cpp:101
void drawMouseOverRect(QPainter *p, const QStyleOptionViewItem &option) const
Definition: itemviewimportdelegate.cpp:541
void drawColorLabelRect(QPainter *p, const QStyleOptionViewItem &option, bool isSelected, int colorId) const
Definition: itemviewimportdelegate.cpp:425
Definition: thumbnailsize.h:42
Definition: datefolderview.cpp:43