digiKam
|
Signals | |
void | gridSizeChanged (const QSize &newSize) |
void | hideNotification () |
void | requestNotification (const QModelIndex &index, const QString &message) |
void | visualChange () |
Public Member Functions | |
bool | acceptsActivation (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *activationRect=nullptr) const override |
bool | acceptsToolTip (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *tooltipRect=nullptr) const override |
QSize | gridSize () const override |
virtual QRect | imageInformationRect () const |
void | installOverlay (ItemDelegateOverlay *overlay) |
ItemViewDelegate (QObject *const parent=nullptr) | |
void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override |
QList< ItemDelegateOverlay * > | overlays () const |
virtual QPixmap | pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const =0 |
virtual QRect | pixmapRect () const |
virtual QRect | ratingRect () const |
QRect | rect () const |
void | removeAllOverlays () |
void | removeOverlay (ItemDelegateOverlay *overlay) |
void | setAllOverlaysActive (bool active) |
void | setDefaultViewOptions (const QStyleOptionViewItem &option) override |
void | setRatingEdited (const QModelIndex &index) |
void | setSpacing (int spacing) override |
void | setThumbnailSize (const ThumbnailSize &thumbSize) override |
void | setViewOnAllOverlays (QAbstractItemView *view) |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
int | spacing () const |
ThumbnailSize | thumbnailSize () const |
~ItemViewDelegate () override | |
Static Public Member Functions | |
static QString | dateToString (const QDateTime &datetime) |
static QPixmap | makeDragPixmap (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes, const QPixmap &suggestedPixmap=QPixmap()) |
static QString | squeezedText (const QFontMetrics &fm, int width, const QString &text) |
Protected Slots | |
void | overlayDestroyed (QObject *o) override |
void | slotSetupChanged () |
void | slotThemeChanged () |
Protected Member Functions | |
QAbstractItemDelegate * | asDelegate () override |
Returns the delegate, typically, the derived class. More... | |
virtual void | clearCaches () |
void | drawAspectRatio (QPainter *p, const QRect &dimsRect, const QSize &dims) const |
void | drawColorLabelRect (QPainter *p, const QStyleOptionViewItem &option, bool isSelected, int colorId) const |
void | drawComments (QPainter *p, const QRect &commentsRect, const QString &comments) const |
void | drawCreationDate (QPainter *p, const QRect &dateRect, const QDateTime &date) const |
void | drawFileSize (QPainter *p, const QRect &r, qlonglong bytes) const |
void | drawFocusRect (QPainter *p, const QStyleOptionViewItem &option, bool isSelected) const |
void | drawGeolocationIndicator (QPainter *p, const QRect &r) const |
void | drawGroupIndicator (QPainter *p, const QRect &r, int numberOfGroupedImages, bool open) const |
void | drawImageFormat (QPainter *p, const QRect &r, const QString &f, bool drawTop) const |
void | drawImageSize (QPainter *p, const QRect &dimsRect, const QSize &dims) const |
void | drawModificationDate (QPainter *p, const QRect &dateRect, const QDateTime &date) const |
void | drawMouseOverRect (QPainter *p, const QStyleOptionViewItem &option) const |
void | drawName (QPainter *p, const QRect &nameRect, const QString &name) const |
virtual void | drawOverlays (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
void | drawPanelSideIcon (QPainter *p, bool left, bool right) const |
void | drawPickLabelIcon (QPainter *p, const QRect &r, int pickLabel) const |
void | drawRating (QPainter *p, const QModelIndex &index, const QRect &ratingRect, int rating, bool isSelected) const |
void | drawSpecialInfo (QPainter *p, const QRect &r, const QString &text) const |
void | drawTags (QPainter *p, const QRect &r, const QString &tagsString, bool isSelected) const |
QRect | drawThumbnail (QPainter *p, const QRect &thumbRect, const QPixmap &background, const QPixmap &thumbnail, bool isGrouped) const |
void | drawTitle (QPainter *p, const QRect &titleRect, const QString &title) const |
virtual void | invalidatePaintingCache () |
ItemViewDelegate (ItemViewDelegatePrivate &dd, QObject *const parent) | |
void | prepareBackground () |
void | prepareFonts () |
void | prepareMetrics (int maxWidth) |
void | prepareRatingPixmaps (bool composeOverBackground=true) |
QPixmap | ratingPixmap (int rating, bool selected) const |
QString | squeezedTextCached (QPainter *const p, int width, const QString &text) const |
QPixmap | thumbnailBorderPixmap (const QSize &pixSize, bool isGrouped=false) const |
virtual void | updateSizeRectsAndPixmaps ()=0 |
Protected Attributes | |
ItemViewDelegatePrivate *const | d_ptr |
QList< ItemDelegateOverlay * > | m_overlays |
|
explicit |
References d_ptr, and Digikam::ItemViewDelegatePrivate::init().
|
override |
|
protected |
References d_ptr, and Digikam::ItemViewDelegatePrivate::init().
|
overridevirtual |
Implements Digikam::DItemDelegate.
Referenced by Digikam::ItemThumbnailDelegate::acceptsActivation().
|
overridevirtual |
These methods take four parameters: The position on viewport, the rect on viewport, the index, and optionally a parameter into which, if the return value is true, a rectangle can be written for which the return value will be true as well.
Implements Digikam::DItemDelegate.
|
overrideprotectedvirtual |
Returns the delegate, typically, the derived class.
Implements Digikam::ItemDelegateOverlayContainer.
|
protectedvirtualinherited |
Reimplemented in Digikam::ImportDelegate, ShowFoto::ShowfotoDelegate, and Digikam::ItemDelegate.
Referenced by Digikam::ItemDelegate::clearCaches(), ShowFoto::ShowfotoDelegate::clearCaches(), and Digikam::ImportDelegate::clearCaches().
|
staticinherited |
|
protected |
References Digikam::ItemPropertiesTab::aspectRatioToString().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::ColorLabelWidget::labelColor(), and Digikam::NoColorLabel.
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::ItemPropertiesTab::humanReadableBytesCount().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protectedvirtualinherited |
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::AcceptedLabel, Digikam::NoPickLabel, Digikam::PendingLabel, and Digikam::RejectedLabel.
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References ratingPixmap(), and ratingRect().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
Use the tool methods for painting in subclasses
References Digikam::DItemDelegate::thumbnailBorderPixmap().
Referenced by Digikam::ItemDelegate::paint().
|
protected |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
overridevirtual |
Returns the gridsize to be set by the view. It's sizeHint plus spacing.
Implements Digikam::DItemDelegate.
Referenced by Digikam::ItemDelegate::calculatethumbSizeToFit().
|
signalinherited |
|
signal |
|
virtual |
Returns the area where the image information is drawn, or null if empty / not supported. The image information is textual or graphical information, but not the pixmap. The ratingRect() will e.g. typically be contained in this area.
Reimplemented in Digikam::ItemDelegate.
|
inherited |
References Digikam::ItemDelegateOverlay::acceptsDelegate(), Digikam::ItemDelegateOverlayContainer::asDelegate(), Digikam::ItemDelegateOverlayContainer::m_overlays, Digikam::ItemDelegateOverlayContainer::overlayDestroyed(), and Digikam::ItemDelegateOverlay::setDelegate().
Referenced by Digikam::VersionsTreeView::addOverlay(), Digikam::ImportCategorizedView::addOverlay(), Digikam::ItemCategorizedView::addOverlay(), and ShowFoto::ShowfotoCategorizedView::addOverlay().
|
protectedvirtual |
Reimplemented in Digikam::ItemDelegate.
References Digikam::DItemDelegate::gridSizeChanged(), updateSizeRectsAndPixmaps(), and Digikam::DItemDelegate::visualChange().
Referenced by Digikam::ItemDelegate::invalidatePaintingCache(), setDefaultViewOptions(), setSpacing(), setThumbnailSize(), slotSetupChanged(), and slotThemeChanged().
|
staticinherited |
|
overridevirtual |
NOTE: to be called by ItemViewCategorized only
Implements Digikam::DItemDelegate.
References Digikam::ItemDelegateOverlayContainer::mouseMoved().
|
overrideprotectedslot |
|
inherited |
|
pure virtualinherited |
Implemented in Digikam::ImportDelegate, ShowFoto::ShowfotoDelegate, and Digikam::ItemDelegate.
|
virtual |
Returns the area where the pixmap is drawn, or null if not supported.
Reimplemented in Digikam::ItemDelegate.
|
protected |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protected |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protected |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protected |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protected |
Returns the relevant pixmap from the cached rating pixmaps.
Referenced by drawRating().
|
virtual |
Returns the rectangle where the rating is drawn, or a null rectangle if not supported.
Referenced by drawRating().
QRect Digikam::ItemViewDelegate::rect | ( | ) | const |
|
inherited |
References Digikam::ItemDelegateOverlayContainer::m_overlays, Digikam::ItemDelegateOverlay::setActive(), Digikam::ItemDelegateOverlay::setDelegate(), and Digikam::ItemDelegateOverlay::setView().
Referenced by ~ItemViewDelegate(), Digikam::ItemViewImportDelegate::~ItemViewImportDelegate(), ShowFoto::ShowfotoItemViewDelegate::~ShowfotoItemViewDelegate(), and Digikam::VersionsTreeView::~VersionsTreeView().
|
inherited |
References Digikam::ItemDelegateOverlayContainer::asDelegate(), Digikam::ItemDelegateOverlayContainer::m_overlays, Digikam::ItemDelegateOverlay::setActive(), and Digikam::ItemDelegateOverlay::setDelegate().
Referenced by Digikam::ItemDelegateOverlayContainer::overlayDestroyed(), Digikam::ItemCategorizedView::removeOverlay(), Digikam::VersionsTreeView::removeOverlay(), ShowFoto::ShowfotoCategorizedView::removeOverlay(), and Digikam::ImportCategorizedView::removeOverlay().
|
signal |
|
inherited |
|
overridevirtual |
Style option with standard values to use for cached rendering. option.rect shall be the viewport rectangle. Call on resize, font change.
Implements Digikam::DItemDelegate.
References invalidatePaintingCache().
Referenced by Digikam::ItemDelegate::setDefaultViewOptions().
void Digikam::ItemViewDelegate::setRatingEdited | ( | const QModelIndex & | index | ) |
Can be used to temporarily disable drawing of the rating. Call with QModelIndex() afterwards.
|
overridevirtual |
Implements Digikam::DItemDelegate.
References invalidatePaintingCache(), and spacing().
Referenced by Digikam::ItemDelegate::setSpacing().
|
overridevirtual |
You must set these options from the view
Implements Digikam::DItemDelegate.
References invalidatePaintingCache().
|
inherited |
|
override |
|
protectedslot |
References invalidatePaintingCache().
|
protectedslot |
References invalidatePaintingCache().
int Digikam::ItemViewDelegate::spacing | ( | ) | const |
|
staticinherited |
Referenced by Digikam::DItemDelegate::squeezedTextCached().
|
protectedinherited |
References Digikam::qHash(), and Digikam::DItemDelegate::squeezedText().
Referenced by drawComments(), drawName(), drawTags(), Digikam::ItemViewImportDelegate::drawTags(), and drawTitle().
|
protectedinherited |
ThumbnailSize Digikam::ItemViewDelegate::thumbnailSize | ( | ) | const |
|
protectedpure virtual |
Implemented in Digikam::ItemDelegate.
Referenced by invalidatePaintingCache().
|
signalinherited |
|
protected |
Referenced by ItemViewDelegate().
|
protectedinherited |
Referenced by Digikam::ItemDelegateOverlayContainer::drawOverlays(), Digikam::ItemDelegateOverlayContainer::installOverlay(), Digikam::ItemDelegateOverlayContainer::mouseMoved(), Digikam::ItemDelegateOverlayContainer::overlays(), Digikam::ItemDelegateOverlayContainer::removeAllOverlays(), Digikam::ItemDelegateOverlayContainer::removeOverlay(), Digikam::ItemDelegateOverlayContainer::setAllOverlaysActive(), and Digikam::ItemDelegateOverlayContainer::setViewOnAllOverlays().