digiKam
|
Classes | |
class | ShowfotoDelegatePrivate |
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) |
QRect | coordinatesIndicatorRect () const |
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 |
QRect | rect () const |
void | removeAllOverlays () |
void | removeOverlay (ItemDelegateOverlay *overlay) |
void | setAllOverlaysActive (bool active) |
void | setDefaultViewOptions (const QStyleOptionViewItem &option) override |
void | setSpacing (int spacing) override |
void | setThumbnailSize (const ThumbnailSize &thumbSize) override |
reimplemented from DItemDelegate More... | |
void | setView (ShowfotoThumbnailBar *view) |
void | setViewOnAllOverlays (QAbstractItemView *view) |
ShowfotoDelegate (QObject *const parent=nullptr) | |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
int | spacing () const |
ThumbnailSize | thumbnailSize () const |
~ShowfotoDelegate () 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 | 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 | drawImageFormat (QPainter *p, const QRect &dimsRect, const QString &mime) const |
void | drawImageSize (QPainter *p, const QRect &dimsRect, const QSize &dims) 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 |
QRect | drawThumbnail (QPainter *p, const QRect &thumbRect, const QPixmap &background, const QPixmap &thumbnail) const |
Use the tool methods for painting in subclasses. More... | |
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 | setModel (QAbstractItemModel *model) |
ShowfotoDelegate (ShowfotoDelegate::ShowfotoDelegatePrivate &dd, QObject *const parent) | |
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 () |
virtual void | updateRects ()=0 |
void | updateSizeRectsAndPixmaps () override |
Protected Attributes | |
ShowfotoItemViewDelegatePrivate *const | d_ptr |
QList< ItemDelegateOverlay * > | m_overlays |
|
explicit |
|
override |
|
protected |
|
overridevirtual |
Implements Digikam::DItemDelegate.
Reimplemented in ShowFoto::ShowfotoThumbnailDelegate.
References onActualPixmapRect().
|
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.
References onActualPixmapRect().
QRect ShowFoto::ShowfotoDelegate::actualPixmapRect | ( | const QModelIndex & | index | ) | const |
References ShowFoto::ShowfotoItemViewDelegate::rect().
Referenced by onActualPixmapRect(), and paint().
|
overrideprotectedvirtualinherited |
Returns the delegate, typically, the derived class.
Implements Digikam::ItemDelegateOverlayContainer.
int ShowFoto::ShowfotoDelegate::calculatethumbSizeToFit | ( | int | ws | ) |
|
overrideprotectedvirtual |
Reimplemented from Digikam::DItemDelegate.
References Digikam::DItemDelegate::clearCaches().
Referenced by updateSizeRectsAndPixmaps().
|
protectedvirtual |
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 modelChanged(), and modelContentsChanged().
QRect ShowFoto::ShowfotoDelegate::coordinatesIndicatorRect | ( | ) | const |
|
staticinherited |
|
protectedinherited |
References Digikam::DItemDelegate::dateToString().
Referenced by paint().
|
protectedinherited |
Referenced by paint().
|
protectedinherited |
Referenced by paint().
|
protectedinherited |
Referenced by paint().
|
protectedinherited |
Referenced by paint().
|
protectedinherited |
|
protectedinherited |
Referenced by paint().
|
protectedinherited |
Referenced by paint().
|
protectedvirtualinherited |
References Digikam::ItemDelegateOverlayContainer::m_overlays, and Digikam::ItemDelegateOverlay::paint().
Referenced by Digikam::ItemDelegate::paint(), paint(), and Digikam::ImportDelegate::paint().
|
protectedinherited |
Use the tool methods for painting in subclasses.
References Digikam::DItemDelegate::thumbnailBorderPixmap().
Referenced by paint().
|
overridevirtualinherited |
Returns the gridsize to be set by the view. It's sizeHint plus spacing.
Implements Digikam::DItemDelegate.
Referenced by calculatethumbSizeToFit().
|
signalinherited |
QRect ShowFoto::ShowfotoDelegate::groupIndicatorRect | ( | ) | const |
|
signalinherited |
Referenced by ShowFoto::ShowfotoCategorizedView::setItemDelegate().
|
overridevirtual |
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 ShowFoto::ShowfotoItemViewDelegate.
|
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().
|
overrideprotectedvirtual |
reimplement these in subclasses
Reimplemented from ShowFoto::ShowfotoItemViewDelegate.
References ShowFoto::ShowfotoItemViewDelegate::invalidatePaintingCache().
|
staticinherited |
|
protectedslot |
References clearModelDataCaches(), and setModel().
Referenced by setView().
|
protectedslot |
References clearModelDataCaches().
Referenced by setModel().
|
overridevirtualinherited |
NOTE: to be called by ItemViewCategorized only
Implements Digikam::DItemDelegate.
|
protected |
References actualPixmapRect().
Referenced by acceptsActivation(), and acceptsToolTip().
|
overrideprotectedslotinherited |
|
inherited |
|
override |
References actualPixmapRect(), ShowFoto::ShowfotoItemInfo::ctime, ShowFoto::ShowfotoItemViewDelegate::drawCreationDate(), ShowFoto::ShowfotoItemViewDelegate::drawFileSize(), ShowFoto::ShowfotoItemViewDelegate::drawFocusRect(), ShowFoto::ShowfotoItemViewDelegate::drawGeolocationIndicator(), ShowFoto::ShowfotoItemViewDelegate::drawImageFormat(), ShowFoto::ShowfotoItemViewDelegate::drawMouseOverRect(), ShowFoto::ShowfotoItemViewDelegate::drawName(), Digikam::ItemDelegateOverlayContainer::drawOverlays(), ShowFoto::ShowfotoItemViewDelegate::drawThumbnail(), ShowFoto::ShowfotoItemInfo::dtime, Digikam::PhotoInfoContainer::hasCoordinates, ShowFoto::ShowfotoSettings::instance(), ShowFoto::ShowfotoItemInfo::isNull(), ShowFoto::ShowfotoItemInfo::mime, ShowFoto::ShowfotoItemInfo::name, ShowFoto::ShowfotoItemInfo::photoInfo, ShowFoto::ShowfotoItemModel::retrieveShowfotoItemInfo(), ShowFoto::ShowfotoItemInfo::size, thumbnailPixmap(), and updateActualPixmapRect().
|
overridevirtual |
Implements Digikam::DItemDelegate.
References Digikam::DItemDelegate::makeDragPixmap(), and thumbnailPixmap().
|
overridevirtual |
Returns the area where the pixmap is drawn, or null if not supported
Reimplemented from ShowFoto::ShowfotoItemViewDelegate.
|
protectedinherited |
Referenced by updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by updateSizeRectsAndPixmaps().
|
protectedinherited |
Referenced by updateSizeRectsAndPixmaps().
|
inherited |
Referenced by actualPixmapRect(), and updateActualPixmapRect().
|
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 |
Referenced by ShowFoto::ShowfotoCategorizedView::setItemDelegate().
|
static |
Retrieve the thumbnail pixmap in given size for the ShowfotoItemModel::ThumbnailRole for the given index from the given index, which must adhere to ShowfotoThumbnailModel semantics.
References ShowFoto::ShowfotoItemModel::ThumbnailRole, and ShowFoto::ShowfotoItemViewDelegate::thumbnailSize().
Referenced by thumbnailPixmap().
|
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.
Reimplemented in ShowFoto::ShowfotoThumbnailDelegate.
References ShowFoto::ShowfotoItemViewDelegate::setDefaultViewOptions().
Referenced by ShowFoto::ShowfotoThumbnailDelegate::setDefaultViewOptions().
|
protected |
References modelContentsChanged().
Referenced by modelChanged(), and setView().
|
overridevirtual |
Implements Digikam::DItemDelegate.
References ShowFoto::ShowfotoItemViewDelegate::setSpacing(), and ShowFoto::ShowfotoItemViewDelegate::spacing().
|
overridevirtualinherited |
reimplemented from DItemDelegate
Implements Digikam::DItemDelegate.
References ShowFoto::ShowfotoItemViewDelegate::invalidatePaintingCache().
Referenced by ShowFoto::ShowfotoCategorizedView::setItemDelegate().
void ShowFoto::ShowfotoDelegate::setView | ( | ShowfotoThumbnailBar * | view | ) |
|
inherited |
|
overrideinherited |
|
protectedslotinherited |
|
protectedslotinherited |
|
inherited |
|
staticinherited |
Referenced by Digikam::DItemDelegate::squeezedTextCached().
|
protectedinherited |
|
protectedinherited |
|
protectedvirtual |
References retrieveThumbnailPixmap().
Referenced by paint(), and pixmapForDrag().
|
inherited |
Referenced by calculatethumbSizeToFit(), and retrieveThumbnailPixmap().
|
protected |
References ShowFoto::ShowfotoItemViewDelegate::rect().
Referenced by paint().
|
protectedvirtual |
Reimplement this to set contentWidth. This is the maximum width of all content rectangles, typically excluding margins on both sides.
Reimplemented in ShowFoto::ShowfotoThumbnailDelegate.
Referenced by ShowFoto::ShowfotoThumbnailDelegate::updateContentWidth(), and updateSizeRectsAndPixmaps().
|
protectedpure virtual |
In a subclass, you need to implement this method to set up the rects for drawing. The paint() method operates depending on these rects.
Implemented in ShowFoto::ShowfotoNormalDelegate, and ShowFoto::ShowfotoThumbnailDelegate.
Referenced by updateSizeRectsAndPixmaps().
|
overrideprotectedvirtual |
|
signalinherited |
|
protectedinherited |
|
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().