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) |
ImportCategoryDrawer * | categoryDrawer () const |
QRect | coordinatesIndicatorRect () const |
QRect | downloadIndicatorRect () const |
QSize | gridSize () const override |
QRect | groupIndicatorRect () const |
QRect | imageInformationRect () const override |
ImportNormalDelegate (ImportCategorizedView *const parent) | |
void | installOverlay (ItemDelegateOverlay *overlay) |
QRect | lockIndicatorRect () const |
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 |
reimplemented from DItemDelegate More... | |
void | setView (ImportCategorizedView *view) |
void | setViewOnAllOverlays (QAbstractItemView *view) |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
int | spacing () const |
QRect | tagsRect () const |
ThumbnailSize | thumbnailSize () const |
~ImportNormalDelegate () 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 () |
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... | |
ImportNormalDelegate (ImportNormalDelegatePrivate &dd, ImportCategorizedView *const parent) | |
void | invalidatePaintingCache () override |
reimplement these in subclasses More... | |
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 |
Returns the relevant pixmap from the cached rating pixmaps. More... | |
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 | |
ItemViewImportDelegatePrivate *const | d_ptr |
QList< ItemDelegateOverlay * > | m_overlays |
|
explicit |
|
override |
|
protected |
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
Reimplemented in Digikam::ImportThumbnailDelegate.
References Digikam::ImportDelegate::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::ImportDelegate::onActualPixmapRect().
|
inherited |
References Digikam::ItemViewImportDelegate::rect().
Referenced by Digikam::ImportDelegate::onActualPixmapRect(), and Digikam::ImportDelegate::paint().
|
overrideprotectedvirtualinherited |
Returns the delegate, typically, the derived class.
Implements Digikam::ItemDelegateOverlayContainer.
|
inherited |
References Digikam::ItemViewImportDelegate::gridSize(), Digikam::ThumbnailSize::maxThumbsSize(), Digikam::ThumbnailSize::size(), Digikam::ThumbnailSize::Small, Digikam::ItemViewImportDelegate::spacing(), and Digikam::ItemViewImportDelegate::thumbnailSize().
Referenced by Digikam::ImportIconView::fitToWidthIcons().
|
inherited |
|
overrideprotectedvirtualinherited |
Reimplemented from Digikam::DItemDelegate.
References Digikam::DItemDelegate::clearCaches().
Referenced by Digikam::ImportDelegate::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.
Referenced by Digikam::ImportDelegate::modelChanged(), and Digikam::ImportDelegate::modelContentsChanged().
|
inherited |
|
staticinherited |
|
inherited |
|
protectedinherited |
References Digikam::ColorLabelWidget::labelColor(), and Digikam::NoColorLabel.
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::dateToString().
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
References Digikam::CamItemInfo::DownloadedNo, Digikam::CamItemInfo::DownloadedYes, and Digikam::CamItemInfo::DownloadUnknown.
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
References Digikam::ItemPropertiesTab::humanReadableBytesCount().
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
|
protectedinherited |
References Digikam::ItemScanner::formatToString().
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::paint().
|
protectedvirtualinherited |
|
protectedinherited |
References Digikam::AcceptedLabel, Digikam::NoPickLabel, Digikam::PendingLabel, and Digikam::RejectedLabel.
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
References Digikam::ItemViewImportDelegate::ratingPixmap(), and Digikam::ItemViewImportDelegate::ratingRect().
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
References Digikam::DItemDelegate::squeezedTextCached().
Referenced by Digikam::ImportDelegate::paint().
|
protectedinherited |
Use the tool methods for painting in subclasses.
References Digikam::DItemDelegate::thumbnailBorderPixmap().
Referenced by Digikam::ImportDelegate::paint().
|
overridevirtualinherited |
Returns the gridsize to be set by the view. It's sizeHint plus spacing.
Implements Digikam::DItemDelegate.
Referenced by Digikam::ImportDelegate::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::ItemViewImportDelegate.
|
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 |
reimplement these in subclasses
Reimplemented from Digikam::ItemViewImportDelegate.
References Digikam::ItemViewImportDelegate::invalidatePaintingCache().
|
inherited |
|
staticinherited |
|
protectedslotinherited |
References Digikam::ImportDelegate::clearModelDataCaches(), and Digikam::ImportDelegate::setModel().
Referenced by Digikam::ImportDelegate::setView().
|
protectedslotinherited |
References Digikam::ImportDelegate::clearModelDataCaches().
Referenced by Digikam::ImportDelegate::setModel().
|
overridevirtualinherited |
NOTE: to be called by ItemViewCategorized only
Implements Digikam::DItemDelegate.
References Digikam::ItemDelegateOverlayContainer::mouseMoved().
|
protectedinherited |
References Digikam::ImportDelegate::actualPixmapRect().
Referenced by Digikam::ImportDelegate::acceptsActivation(), and Digikam::ImportDelegate::acceptsToolTip().
|
overrideprotectedslotinherited |
|
inherited |
|
overrideinherited |
References Digikam::ImportDelegate::actualPixmapRect(), Digikam::CamItemInfo::colorLabel, Digikam::CamItemInfo::ctime, Digikam::CamItemInfo::downloaded, Digikam::CamItemInfo::downloadName, Digikam::ItemViewImportDelegate::drawColorLabelRect(), Digikam::ItemViewImportDelegate::drawCreationDate(), Digikam::ItemViewImportDelegate::drawDownloadIndicator(), Digikam::ItemViewImportDelegate::drawFileSize(), Digikam::ItemViewImportDelegate::drawFocusRect(), Digikam::ItemViewImportDelegate::drawGeolocationIndicator(), Digikam::ItemViewImportDelegate::drawImageFormat(), Digikam::ItemViewImportDelegate::drawImageSize(), Digikam::ItemViewImportDelegate::drawLockIndicator(), Digikam::ItemViewImportDelegate::drawMouseOverRect(), Digikam::ItemViewImportDelegate::drawName(), Digikam::ItemDelegateOverlayContainer::drawOverlays(), Digikam::ItemViewImportDelegate::drawPickLabelIcon(), Digikam::ItemViewImportDelegate::drawRating(), Digikam::ItemViewImportDelegate::drawTags(), Digikam::ItemViewImportDelegate::drawThumbnail(), Digikam::PhotoInfoContainer::hasCoordinates, Digikam::CamItemInfo::height, Digikam::AlbumManager::instance(), Digikam::CamItemInfo::isNull(), Digikam::CamItemInfo::mime, Digikam::CamItemInfo::photoInfo, Digikam::CamItemInfo::pickLabel, Digikam::CamItemInfo::rating, Digikam::ImportItemModel::retrieveCamItemInfo(), Digikam::CamItemInfo::size, Digikam::CamItemInfo::tagIds, Digikam::AlbumManager::tagNames(), Digikam::ImportDelegate::thumbnailPixmap(), Digikam::ImportDelegate::updateActualPixmapRect(), Digikam::CamItemInfo::width, and Digikam::CamItemInfo::writePermissions.
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
References Digikam::DItemDelegate::makeDragPixmap(), and Digikam::ImportDelegate::thumbnailPixmap().
|
overridevirtualinherited |
Returns the area where the pixmap is drawn, or null if not supported
Reimplemented from Digikam::ItemViewImportDelegate.
|
protectedinherited |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Please call this method after prepareBackground() and when d->ratingPixmap is set
Referenced by Digikam::ImportDelegate::updateSizeRectsAndPixmaps().
|
protectedinherited |
Returns the relevant pixmap from the cached rating pixmaps.
Referenced by Digikam::ItemViewImportDelegate::drawRating().
|
virtualinherited |
Returns the rectangle where the rating is drawn, or a null rectangle if not supported.
Referenced by Digikam::ItemViewImportDelegate::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 ImportItemModel::ThumbnailRole for the given index from the given index, which must adhere to ImportThumbnailModel semantics.
References Digikam::ImportItemModel::ThumbnailRole, and Digikam::ItemViewImportDelegate::thumbnailSize().
Referenced by Digikam::ImportDelegate::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::ImportThumbnailDelegate.
References Digikam::ItemViewImportDelegate::setDefaultViewOptions().
Referenced by Digikam::ImportThumbnailDelegate::setDefaultViewOptions().
|
protectedinherited |
References Digikam::ImportDelegate::modelContentsChanged().
Referenced by Digikam::ImportDelegate::modelChanged(), and Digikam::ImportDelegate::setView().
|
inherited |
Can be used to temporarily disable drawing of the rating. Call with QModelIndex() afterwards.
|
overridevirtualinherited |
Implements Digikam::DItemDelegate.
References Digikam::ItemViewImportDelegate::setSpacing(), and Digikam::ItemViewImportDelegate::spacing().
|
overridevirtualinherited |
reimplemented from DItemDelegate
Implements Digikam::DItemDelegate.
References Digikam::ItemViewImportDelegate::invalidatePaintingCache().
Referenced by Digikam::ImportCategorizedView::setItemDelegate().
|
inherited |
|
inherited |
|
overrideinherited |
|
protectedslotinherited |
|
protectedslotinherited |
|
inherited |
|
staticinherited |
Referenced by Digikam::DItemDelegate::squeezedTextCached().
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
protectedvirtualinherited |
References Digikam::ImportDelegate::retrieveThumbnailPixmap().
Referenced by Digikam::ImportDelegate::paint(), and Digikam::ImportDelegate::pixmapForDrag().
|
inherited |
|
protectedinherited |
References Digikam::ItemViewImportDelegate::rect().
Referenced by Digikam::ImportDelegate::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::ImportThumbnailDelegate.
Referenced by Digikam::ImportThumbnailDelegate::updateContentWidth(), and Digikam::ImportDelegate::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::ImportDelegate.
References Digikam::ImportSettings::getIconShowCoordinates(), Digikam::ImportSettings::getIconShowDate(), Digikam::ImportSettings::getIconShowImageFormat(), Digikam::ImportSettings::getIconShowName(), Digikam::ImportSettings::getIconShowRating(), Digikam::ImportSettings::getIconShowSize(), Digikam::ImportSettings::getIconShowTags(), and Digikam::ImportSettings::instance().
|
overrideprotectedvirtualinherited |
Implements Digikam::ItemViewImportDelegate.
References Digikam::ImportDelegate::clearCaches(), Digikam::ItemViewImportDelegate::prepareBackground(), Digikam::ItemViewImportDelegate::prepareFonts(), Digikam::ItemViewImportDelegate::prepareMetrics(), Digikam::ItemViewImportDelegate::prepareRatingPixmaps(), Digikam::ImportDelegate::updateContentWidth(), and Digikam::ImportDelegate::updateRects().
|
signalinherited |
|
protectedinherited |
Referenced by Digikam::ItemViewImportDelegate::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().