| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Digikam::GraphicsDImgView Class Reference
Inheritance diagram for Digikam::GraphicsDImgView:

## Signals
void | activated ()
void | contentsMoved (bool panningFinished)
void | contentsMoving (int, int)
void | leftButtonClicked ()
void | leftButtonDoubleClicked ()
void | resized ()
void | rightButtonClicked ()
void | signalZoomFactorChanged ()
void | toNextImage ()
void | toPreviousImage ()
void | viewportRectChanged (const QRectF &viewportRect)

## Public Member Functions
| GraphicsDImgView (QWidget *const parent=nullptr)
int | contentsX () const
int | contentsY () const
void | drawText (QPainter *p, const QRectF &rect, const QString &text)
void | fitToWindow ()
bool | isMagnifierVisible () const
GraphicsDImgItem * | item () const
| Return the instance of item set by setItem().
SinglePhotoPreviewLayout * | layout () const
int | magnifierSize () const
qreal | magnifierZoomFactor () const
DImgPreviewItem * | previewItem () const
void | scrollPointOnPoint (const QPointF &scenePos, const QPoint &viewportPos)
| Scrolls the view such that scenePos (in scene coordinates is displayed on the viewport at viewportPos (in viewport coordinates).
void | setContentsPos (int x, int y)
void | setItem (GraphicsDImgItem *const item)
| Store internal instance of item as GraphicsDImgItem.
void | setMagnifierSize (int size)
void | setMagnifierVisible (bool b)
void | setMagnifierZoomFactor (qreal factor)
void | toggleFullScreen (bool set)
QRect | visibleArea () const

## Protected Slots
void | slotContentsMoved ()
virtual void | slotPanIconSelectionMoved (const QRect &, bool)
void | slotRefreshPanIconSelection ()
void | slotZoomFactorChanged ()

## Protected Member Functions
virtual bool | acceptsMouseClick (QMouseEvent *e)
void | continuePanning (const QPoint &pos)
void | drawForeground (QPainter *painter, const QRectF &rect) override
virtual bool | event (QEvent *) override
void | finishPanning ()
PanIconWidget * | installPanIcon ()
virtual void | mouseDoubleClickEvent (QMouseEvent *) override
virtual void | mouseMoveEvent (QMouseEvent *) override
virtual void | mousePressEvent (QMouseEvent *) override
virtual void | mouseReleaseEvent (QMouseEvent *) override
virtual void | resizeEvent (QResizeEvent *) override
virtual void | scrollContentsBy (int dx, int dy) override
void | setScaleFitToWindow (bool value)
void | setShowText (bool value)
void | startPanning (const QPoint &pos)
void | updatePanIconWidget ()
virtual bool | viewportEvent (QEvent *) override
virtual void | wheelEvent (QWheelEvent *) override

## Member Function Documentation

## ◆ drawText()

void Digikam::GraphicsDImgView::drawText | ( | QPainter * | p,
|  | const QRectF & | rect,
|  | const QString & | text
| ) |  |

Note
  Change from protected to public to be used by ImageRegionWidget and ImageRegionItem

## ◆ previewItem()

DImgPreviewItem * Digikam::GraphicsDImgView::previewItem | ( |  | ) | const

Returns
  a cast of item instance of item set by setItem() as DImgPreviewItem

Note
  if you store a GraphicsDImgItem object using setItem(), this method will return nullptr.

## ◆ scrollPointOnPoint()

void Digikam::GraphicsDImgView::scrollPointOnPoint | ( | const QPointF & | scenePos,
|  | const QPoint & | viewportPos
| ) |  |

E.g., calling scrollPointOnPoint(scenePos, viewport()->rect().center()) is equivalent to calling centerOn(scenePos).

## ◆ setItem()

void Digikam::GraphicsDImgView::setItem | ( | GraphicsDImgItem *const | item | ) |

You can store DImgPreviewItem object also by this method. Use item() or previewItem() to get right version.

Note
  if you store a GraphicsDImgItem object, previewItem() will return 0.