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 |
QRect | actualPixmapRect (const QModelIndex &index) const |
int | calculatethumbSizeToFit (int ws) |
ItemCategoryDrawer * | categoryDrawer () const |
QRect | commentsRect () const |
QRect | coordinatesIndicatorRect () const |
DigikamItemDelegate (ItemCategorizedView *parent) | |
QSize | gridSize () const override |
QRect | groupIndicatorRect () const |
QRect | imageInformationRect () const override |
void | installOverlay (ItemDelegateOverlay *overlay) |
void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override |
QList< ItemDelegateOverlay * > | overlays () const |
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
QPixmap | pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const override |
QRect | pixmapRect () const override |
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 | setView (ItemCategorizedView *view) |
void | setViewOnAllOverlays (QAbstractItemView *view) |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
int | spacing () const |
QRect | tagsRect () const |
ThumbnailSize | thumbnailSize () const |
~DigikamItemDelegate () 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 QPixmap | retrieveThumbnailPixmap (const QModelIndex &index, int thumbnailSize) |
static QString | squeezedText (const QFontMetrics &fm, int width, const QString &text) |
Protected Slots | |
void | modelChanged () |
void | modelContentsChanged () |
void | overlayDestroyed (QObject *o) override |
void | slotSetupChanged () |
void | slotThemeChanged () |
Protected Member Functions | |
QAbstractItemDelegate * | asDelegate () override |
Returns the delegate, typically, the derived class. More... | |
void | clearCaches () override |
virtual void | clearModelDataCaches () |
DigikamItemDelegate (DigikamItemDelegatePrivate &dd, ItemCategorizedView *parent) | |
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 |
void | invalidatePaintingCache () override |
bool | onActualPixmapRect (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *actualRect) const |
void | prepareBackground () |
void | prepareFonts () |
void | prepareMetrics (int maxWidth) |
void | prepareRatingPixmaps (bool composeOverBackground=true) |
QPixmap | ratingPixmap (int rating, bool selected) const |
void | setModel (QAbstractItemModel *model) |
QString | squeezedTextCached (QPainter *const p, int width, const QString &text) const |
QPixmap | thumbnailBorderPixmap (const QSize &pixSize, bool isGrouped=false) const |
virtual QPixmap | thumbnailPixmap (const QModelIndex &index) const |
void | updateActualPixmapRect (const QModelIndex &index, const QRect &rect) |
virtual void | updateContentWidth () |
void | updateRects () override |
void | updateSizeRectsAndPixmaps () override |
Protected Attributes | |
ItemViewDelegatePrivate *const | d_ptr |
QList< ItemDelegateOverlay * > | m_overlays |
|
explicit |
|
override |
|
protected |
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
Reimplemented in Digikam::ItemThumbnailDelegate.
References Digikam::ItemDelegate::onActualPixmapRect().
|
overridevirtualinherited |
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.
References Digikam::ItemDelegate::onActualPixmapRect().
|
inherited |
References Digikam::ItemViewDelegate::rect().
Referenced by Digikam::ItemDelegate::onActualPixmapRect(), and Digikam::ItemDelegate::paint().
|
overrideprotectedvirtualinherited |
Returns the delegate, typically, the derived class.
Implements Digikam::ItemDelegateOverlayContainer.
|
inherited |
|
inherited |
|
overrideprotectedvirtualinherited |
Reimplemented from Digikam::DItemDelegate.
References Digikam::DItemDelegate::clearCaches().
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protectedvirtualinherited |
Reimplement to clear caches based on model indexes (hash on row number etc.) Change signals are listened to this is called whenever such properties become invalid.
Reimplemented in Digikam::ItemFaceDelegate.
Referenced by Digikam::ItemFaceDelegate::clearModelDataCaches(), Digikam::ItemDelegate::modelChanged(), and Digikam::ItemDelegate::modelContentsChanged().
|
inherited |
|
inherited |
|
staticinherited |
|
protectedinherited |
References Digikam::ItemPropertiesTab::aspectRatioToString().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::ColorLabelWidget::labelColor(), and Digikam::NoColorLabel.
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::ItemPropertiesTab::humanReadableBytesCount().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protectedvirtualinherited |
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::AcceptedLabel, Digikam::NoPickLabel, Digikam::PendingLabel, and Digikam::RejectedLabel.
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::ItemViewDelegate::ratingPixmap(), and Digikam::ItemViewDelegate::ratingRect().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
Use the tool methods for painting in subclasses
References Digikam::DItemDelegate::thumbnailBorderPixmap().
Referenced by Digikam::ItemDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ItemDelegate::paint().
|
overridevirtualinherited |
Returns the gridsize to be set by the view. It's sizeHint plus spacing.
Implements Digikam::DItemDelegate.
Referenced by Digikam::ItemDelegate::calculatethumbSizeToFit().
|
signalinherited |
|
inherited |
|
signalinherited |
|
overridevirtualinherited |
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 from Digikam::ItemViewDelegate.
|
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().
|
overrideprotectedvirtualinherited |
Reimplemented from Digikam::ItemViewDelegate.
References Digikam::ItemViewDelegate::invalidatePaintingCache().
|
staticinherited |
|
protectedslotinherited |
References Digikam::ItemDelegate::clearModelDataCaches(), and Digikam::ItemDelegate::setModel().
Referenced by Digikam::ItemDelegate::setView().
|
protectedslotinherited |
References Digikam::ItemDelegate::clearModelDataCaches().
Referenced by Digikam::ItemDelegate::setModel().
|
overridevirtualinherited |
NOTE: to be called by ItemViewCategorized only
Implements Digikam::DItemDelegate.
References Digikam::ItemDelegateOverlayContainer::mouseMoved().
|
protectedinherited |
References Digikam::ItemDelegate::actualPixmapRect().
Referenced by Digikam::ItemDelegate::acceptsActivation(), and Digikam::ItemDelegate::acceptsToolTip().
|
overrideprotectedslotinherited |
|
inherited |
|
overrideinherited |
References Digikam::ItemDelegate::actualPixmapRect(), Digikam::ItemInfo::colorLabel(), Digikam::ItemInfo::comment(), Digikam::ItemInfo::currentReferenceImage(), Digikam::ItemInfo::dateTime(), Digikam::ItemInfo::dimensions(), Digikam::ItemViewDelegate::drawAspectRatio(), Digikam::ItemViewDelegate::drawColorLabelRect(), Digikam::ItemViewDelegate::drawComments(), Digikam::ItemViewDelegate::drawCreationDate(), Digikam::ItemViewDelegate::drawFileSize(), Digikam::ItemViewDelegate::drawFocusRect(), Digikam::ItemViewDelegate::drawGeolocationIndicator(), Digikam::ItemViewDelegate::drawGroupIndicator(), Digikam::ItemViewDelegate::drawImageFormat(), Digikam::ItemViewDelegate::drawImageSize(), Digikam::ItemViewDelegate::drawModificationDate(), Digikam::ItemViewDelegate::drawMouseOverRect(), Digikam::ItemViewDelegate::drawName(), Digikam::ItemDelegateOverlayContainer::drawOverlays(), Digikam::ItemViewDelegate::drawPanelSideIcon(), Digikam::ItemViewDelegate::drawPickLabelIcon(), Digikam::ItemViewDelegate::drawRating(), Digikam::ItemViewDelegate::drawSpecialInfo(), Digikam::ItemViewDelegate::drawTags(), Digikam::ItemViewDelegate::drawThumbnail(), Digikam::ItemViewDelegate::drawTitle(), Digikam::ItemInfo::fileSize(), Digikam::ItemInfo::format(), Digikam::ApplicationSettings::getDrawFramesToGrouped(), Digikam::ItemFilterModel::GroupIsOpenRole, Digikam::ItemInfo::hasCoordinates(), Digikam::ItemInfo::hasGroupedImages(), Digikam::ItemInfo::id(), Digikam::AlbumManager::instance(), Digikam::ApplicationSettings::instance(), Digikam::ItemInfo::isNull(), Digikam::ItemModel::LTLeftPanelRole, Digikam::ItemModel::LTRightPanelRole, Digikam::ItemInfo::modDateTime(), Digikam::ItemInfo::name(), Digikam::ItemInfo::numberOfGroupedImages(), Digikam::ItemInfo::pickLabel(), Digikam::ItemInfo::rating(), Digikam::ItemModel::retrieveItemInfo(), Digikam::ItemInfo::tagIds(), Digikam::AlbumManager::tagNames(), Digikam::ItemDelegate::thumbnailPixmap(), Digikam::ItemInfo::title(), and Digikam::ItemDelegate::updateActualPixmapRect().
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
References Digikam::DItemDelegate::makeDragPixmap(), and Digikam::ItemDelegate::thumbnailPixmap().
|
overridevirtualinherited |
Returns the area where the pixmap is drawn, or null if not supported.
Reimplemented from Digikam::ItemViewDelegate.
|
protectedinherited |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Returns the relevant pixmap from the cached rating pixmaps.
Referenced by Digikam::ItemViewDelegate::drawRating().
|
virtualinherited |
Returns the rectangle where the rating is drawn, or a null rectangle if not supported.
Referenced by Digikam::ItemViewDelegate::drawRating().
|
inherited |
|
inherited |
References Digikam::ItemDelegateOverlayContainer::m_overlays, Digikam::ItemDelegateOverlay::setActive(), Digikam::ItemDelegateOverlay::setDelegate(), and Digikam::ItemDelegateOverlay::setView().
Referenced by Digikam::ItemViewDelegate::~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().
|
signalinherited |
|
staticinherited |
Retrieve the thumbnail pixmap in given size for the ItemModel::ThumbnailRole for the given index from the given index, which must adhere to ItemThumbnailModel semantics.
References Digikam::ItemModel::ThumbnailRole, and Digikam::ItemViewDelegate::thumbnailSize().
Referenced by Digikam::VersionsDelegate::initStyleOption(), and Digikam::ItemDelegate::thumbnailPixmap().
|
inherited |
|
overridevirtualinherited |
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.
Reimplemented in Digikam::ItemThumbnailDelegate.
References Digikam::ItemViewDelegate::setDefaultViewOptions().
Referenced by Digikam::ItemThumbnailDelegate::setDefaultViewOptions().
|
protectedinherited |
References Digikam::ItemDelegate::modelContentsChanged().
Referenced by Digikam::ItemDelegate::modelChanged(), and Digikam::ItemDelegate::setView().
|
inherited |
Can be used to temporarily disable drawing of the rating. Call with QModelIndex() afterwards.
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
References Digikam::ItemViewDelegate::setSpacing(), and Digikam::ItemViewDelegate::spacing().
|
overridevirtualinherited |
You must set these options from the view
Implements Digikam::DItemDelegate.
References Digikam::ItemViewDelegate::invalidatePaintingCache().
|
inherited |
|
inherited |
|
overrideinherited |
|
protectedslotinherited |
|
protectedslotinherited |
|
inherited |
|
staticinherited |
Referenced by Digikam::DItemDelegate::squeezedTextCached().
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
protectedvirtualinherited |
Reimplemented in Digikam::ItemFaceDelegate.
References Digikam::ItemDelegate::retrieveThumbnailPixmap().
Referenced by Digikam::ItemDelegate::paint(), Digikam::ItemDelegate::pixmapForDrag(), and Digikam::ItemFaceDelegate::thumbnailPixmap().
|
inherited |
|
protectedinherited |
References Digikam::ItemViewDelegate::rect().
Referenced by Digikam::ItemDelegate::paint().
|
protectedvirtualinherited |
Reimplement this to set contentWidth. This is the maximum width of all content rectangles, typically excluding margins on both sides.
Reimplemented in Digikam::ItemThumbnailDelegate.
Referenced by Digikam::ItemThumbnailDelegate::updateContentWidth(), and Digikam::ItemDelegate::updateSizeRectsAndPixmaps().
|
overrideprotectedvirtual |
In a subclass, you need to implement this method to set up the rects for drawing. The paint() method operates depending on these rects.
Implements Digikam::ItemDelegate.
Reimplemented in Digikam::ItemFaceDelegate.
References Digikam::ApplicationSettings::getIconShowAspectRatio(), Digikam::ApplicationSettings::getIconShowComments(), Digikam::ApplicationSettings::getIconShowCoordinates(), Digikam::ApplicationSettings::getIconShowDate(), Digikam::ApplicationSettings::getIconShowImageFormat(), Digikam::ApplicationSettings::getIconShowModDate(), Digikam::ApplicationSettings::getIconShowName(), Digikam::ApplicationSettings::getIconShowRating(), Digikam::ApplicationSettings::getIconShowResolution(), Digikam::ApplicationSettings::getIconShowSize(), Digikam::ApplicationSettings::getIconShowTags(), Digikam::ApplicationSettings::getIconShowTitle(), Digikam::ApplicationSettings::instance(), and Digikam::ThumbnailSize::Small.
Referenced by Digikam::ItemFaceDelegate::updateRects().
|
overrideprotectedvirtualinherited |
Implements Digikam::ItemViewDelegate.
References Digikam::ItemDelegate::clearCaches(), Digikam::ItemViewDelegate::prepareBackground(), Digikam::ItemViewDelegate::prepareFonts(), Digikam::ItemViewDelegate::prepareMetrics(), Digikam::ItemViewDelegate::prepareRatingPixmaps(), Digikam::ItemDelegate::updateContentWidth(), and Digikam::ItemDelegate::updateRects().
|
signalinherited |
|
protectedinherited |
Referenced by Digikam::ItemViewDelegate::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().