digiKam
|
NOTE: Some reuse of the existing model-view classes. More...
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) |
ItemViewImportDelegate (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 |
reimplemented from DItemDelegate More... | |
void | setViewOnAllOverlays (QAbstractItemView *view) |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
int | spacing () const |
ThumbnailSize | thumbnailSize () const |
~ItemViewImportDelegate () 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 | drawColorLabelRect (QPainter *p, const QStyleOptionViewItem &option, bool isSelected, int colorId) const |
void | drawCreationDate (QPainter *p, const QRect &dateRect, const QDateTime &date) const |
void | drawDownloadIndicator (QPainter *p, const QRect &r, int itemType) 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 &dimsRect, const QString &mime) const |
void | drawImageSize (QPainter *p, const QRect &dimsRect, const QSize &dims) const |
void | drawLockIndicator (QPainter *p, const QRect &r, int lockStatus) 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 | 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 | 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) const |
Use the tool methods for painting in subclasses. More... | |
virtual void | invalidatePaintingCache () |
reimplement these in subclasses More... | |
ItemViewImportDelegate (ItemViewImportDelegatePrivate &dd, QObject *const parent) | |
void | prepareBackground () |
void | prepareFonts () |
void | prepareMetrics (int maxWidth) |
void | prepareRatingPixmaps (bool composeOverBackground=true) |
QPixmap | ratingPixmap (int rating, bool selected) const |
Returns the relevant pixmap from the cached rating pixmaps. More... | |
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 | |
ItemViewImportDelegatePrivate *const | d_ptr |
QList< ItemDelegateOverlay * > | m_overlays |
NOTE: Some reuse of the existing model-view classes.
|
explicit |
References d_ptr, and Digikam::ItemViewImportDelegatePrivate::init().
|
override |
|
protected |
References d_ptr, and Digikam::ItemViewImportDelegatePrivate::init().
|
overridevirtual |
Implements Digikam::DItemDelegate.
Referenced by Digikam::ImportThumbnailDelegate::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::ColorLabelWidget::labelColor(), and Digikam::NoColorLabel.
Referenced by Digikam::ImportDelegate::paint().
|
protected |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ImportDelegate::paint().
|
protected |
References Digikam::CamItemInfo::DownloadedNo, Digikam::CamItemInfo::DownloadedYes, and Digikam::CamItemInfo::DownloadUnknown.
Referenced by Digikam::ImportDelegate::paint().
|
protected |
References Digikam::ItemPropertiesTab::humanReadableBytesCount().
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protected |
|
protected |
References Digikam::ItemScanner::formatToString().
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Referenced by Digikam::ImportDelegate::paint().
|
protectedvirtualinherited |
|
protected |
References Digikam::AcceptedLabel, Digikam::NoPickLabel, Digikam::PendingLabel, and Digikam::RejectedLabel.
Referenced by Digikam::ImportDelegate::paint().
|
protected |
References ratingPixmap(), and ratingRect().
Referenced by Digikam::ImportDelegate::paint().
|
protected |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ImportDelegate::paint().
|
protected |
Use the tool methods for painting in subclasses.
References Digikam::DItemDelegate::thumbnailBorderPixmap().
Referenced by Digikam::ImportDelegate::paint().
|
overridevirtual |
Returns the gridsize to be set by the view. It's sizeHint plus spacing.
Implements Digikam::DItemDelegate.
Referenced by Digikam::ImportDelegate::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::ImportDelegate.
|
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 |
reimplement these in subclasses
Reimplemented in Digikam::ImportDelegate.
References Digikam::DItemDelegate::gridSizeChanged(), updateSizeRectsAndPixmaps(), and Digikam::DItemDelegate::visualChange().
Referenced by Digikam::ImportDelegate::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::ImportDelegate.
|
protected |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protected |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protected |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protected |
Please call this method after prepareBackground() and when d->ratingPixmap is set
Referenced by Digikam::ImportDelegate::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::ItemViewImportDelegate::rect | ( | ) | const |
|
inherited |
References Digikam::ItemDelegateOverlayContainer::m_overlays, Digikam::ItemDelegateOverlay::setActive(), Digikam::ItemDelegateOverlay::setDelegate(), and Digikam::ItemDelegateOverlay::setView().
Referenced by Digikam::ItemViewDelegate::~ItemViewDelegate(), ~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::ImportDelegate::setDefaultViewOptions().
void Digikam::ItemViewImportDelegate::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::ImportDelegate::setSpacing().
|
overridevirtual |
reimplemented from DItemDelegate
Implements Digikam::DItemDelegate.
References invalidatePaintingCache().
Referenced by Digikam::ImportCategorizedView::setItemDelegate().
|
inherited |
|
override |
|
protectedslot |
References invalidatePaintingCache().
|
protectedslot |
References invalidatePaintingCache().
int Digikam::ItemViewImportDelegate::spacing | ( | ) | const |
|
staticinherited |
Referenced by Digikam::DItemDelegate::squeezedTextCached().
|
protectedinherited |
|
protectedinherited |
ThumbnailSize Digikam::ItemViewImportDelegate::thumbnailSize | ( | ) | const |
|
protectedpure virtual |
Implemented in Digikam::ImportDelegate.
Referenced by invalidatePaintingCache().
|
signalinherited |
|
protected |
Referenced by ItemViewImportDelegate().
|
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().