digiKam
|
Public Types | |
enum | Flag { NoFlags = 0 , ShowResizeHandles = 1 << 0 , MoveByDrag = 1 << 1 , GeometryEditable = ShowResizeHandles | MoveByDrag } |
Public Slots | |
void | setViewportRect (const QRectF &rect) |
Signals | |
void | geometryChanged () |
void | geometryEdited () |
void | geometryOnImageChanged () |
void | positionChanged () |
void | positionOnImageChanged () |
void | sizeChanged () |
void | sizeOnImageChanged () |
Public Member Functions | |
QRectF | boundingRect () const override |
void | changeFlags (Flags flags, bool addOrRemove) |
Flags | flags () const |
QGraphicsWidget * | hudWidget () const |
void | moveBy (qreal dx, qreal dy) |
QPoint | originalPos () const |
QRect | originalRect () const |
QSize | originalSize () const |
GraphicsDImgItem * | parentDImgItem () const |
QRectF | rect () const |
RegionFrameItem (QGraphicsItem *const parent) | |
QPointF | relativePos () const |
QRectF | relativeRect () const |
QSizeF | relativeSize () const |
void | setFixedRatio (double ratio) |
void | setFlags (Flags flags) |
void | setHudWidget (QGraphicsWidget *const hudWidget) |
void | setHudWidget (QWidget *const widget, Qt::WindowFlags wFlags=Qt::WindowFlags()) |
void | setHudWidgetVisible (bool visible) |
void | setOriginalPos (const QPointF &posInOriginal) |
void | setOriginalPos (qreal x, qreal y) |
void | setOriginalRect (const QRectF &rect) |
void | setOriginalRect (qreal x, qreal y, qreal width, qreal height) |
void | setOriginalSize (const QSizeF &sizeInOriginal) |
void | setOriginalSize (qreal width, qreal height) |
void | setPos (const QPointF &zoomedPos) |
void | setPos (qreal x, qreal y) |
void | setRect (const QRectF &rect) |
void | setRect (qreal x, qreal y, qreal width, qreal height) |
void | setRectInSceneCoordinates (const QRectF &rect) |
void | setRectInSceneCoordinatesAdjusted (const QRectF &rect) |
void | setRelativePos (const QPointF &relativePosition) |
void | setRelativePos (qreal x, qreal y) |
void | setRelativeRect (const QRectF &rect) |
void | setRelativeRect (qreal x, qreal y, qreal width, qreal height) |
void | setRelativeSize (const QSizeF &relativeSize) |
void | setRelativeSize (qreal width, qreal height) |
void | setSize (const QSizeF &zoomedSize) |
void | setSize (qreal width, qreal height) |
QSizeF | size () const |
~RegionFrameItem () override | |
Protected Slots | |
void | imageSizeChanged (const QSizeF &) |
Protected Member Functions | |
bool | eventFilter (QObject *watched, QEvent *event) override |
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) override |
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *) override |
void | mousePressEvent (QGraphicsSceneMouseEvent *) override |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *) override |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override |
|
explicit |
|
override |
|
override |
References Digikam::DImgChildItem::boundingRect().
Referenced by Digikam::FaceGroup::closestItem(), hoverEnterEvent(), hoverLeaveEvent(), hoverMoveEvent(), and paint().
void Digikam::RegionFrameItem::changeFlags | ( | Flags | flags, |
bool | addOrRemove | ||
) |
References flags(), and setFlags().
Referenced by Digikam::FaceItem::setEditable(), and Digikam::FocusPointItem::setEditable().
|
overrideprotected |
RegionFrameItem::Flags Digikam::RegionFrameItem::flags | ( | ) | const |
Referenced by changeFlags(), and setFlags().
|
signalinherited |
|
signal |
|
signalinherited |
Referenced by Digikam::DImgChildItem::setRelativePos(), and Digikam::DImgChildItem::setRelativeSize().
|
overrideprotected |
References boundingRect().
|
overrideprotected |
References boundingRect().
|
overrideprotected |
References boundingRect(), and GeometryEditable.
QGraphicsWidget * Digikam::RegionFrameItem::hudWidget | ( | ) | const |
|
protectedslotinherited |
|
overrideprotectedinherited |
References value.
|
overrideprotected |
References Digikam::GraphicsDImgItem::boundingRect(), Digikam::CH_Bottom, Digikam::CH_Content, Digikam::CH_Left, Digikam::CH_Right, Digikam::CH_Top, Digikam::DImgChildItem::parentDImgItem(), Digikam::DImgChildItem::rect(), and Digikam::DImgChildItem::setRect().
Referenced by Digikam::RubberItem::mouseMoveEvent().
|
overrideprotected |
References Digikam::CH_Content, and GeometryEditable.
|
overrideprotected |
References Digikam::CH_None.
Referenced by Digikam::RubberItem::mouseReleaseEvent().
|
inlineinherited |
|
inherited |
|
inherited |
Returns the position and size in coordinates of the original image. Note that the return value is integer based. At high zoom rates, different values of relativeRect() or zoomedRect() may result in the same originalRect(), when one pixel in the original is represented by more than one pixel on screen.
References Digikam::DImgChildItem::originalPos(), and Digikam::DImgChildItem::originalSize().
Referenced by Digikam::FaceGroup::applyItemGeometryChanges(), Digikam::FaceGroup::slotAddItemFinished(), Digikam::FocusPointGroup::slotAddItemFinished(), and Digikam::FaceGroup::slotAssigned().
|
inherited |
References Digikam::ImageZoomSettings::originalImageSize(), Digikam::DImgChildItem::parentDImgItem(), and Digikam::GraphicsDImgItem::zoomSettings.
Referenced by Digikam::DImgChildItem::originalPos(), Digikam::DImgChildItem::originalRect(), Digikam::DImgChildItem::setOriginalPos(), and Digikam::DImgChildItem::setOriginalSize().
|
overrideprotected |
References boundingRect(), Digikam::CH_None, and Digikam::DImgChildItem::rect().
|
inherited |
If the parent item is a GraphicsDImgItem, return it, if the parent item is null or of a different class, returns 0.
Referenced by mouseMoveEvent(), Digikam::DImgChildItem::originalPos(), Digikam::DImgChildItem::originalSize(), Digikam::DImgChildItem::setOriginalPos(), and Digikam::DImgChildItem::setOriginalSize().
|
signalinherited |
These signals are emitted in any case when the geometry changed: Either after changing the geometry relative to the original image, or when the size of the parent GraphicsDImgItem changed (zooming). positionChanged() is equivalent to listening to xChanged() and yChanged().
Referenced by RegionFrameItem().
|
signalinherited |
These signals are emitted when the geometry, relative to the original image, of this item has changed. This happens by calling any of the methods above.
Referenced by Digikam::DImgChildItem::setRelativePos().
|
inherited |
Returns position and size of this item, in coordinates of the parent DImg with the current zoom. This is the same result as QRectF(pos(), boundingRect()), boundingRect is virtual and may be overridden by base classes.
References Digikam::DImgChildItem::size().
Referenced by mouseMoveEvent(), paint(), Digikam::DImgChildItem::setOriginalRect(), Digikam::DImgChildItem::setRect(), Digikam::DImgChildItem::setRectInSceneCoordinates(), setRectInSceneCoordinatesAdjusted(), Digikam::DImgChildItem::setRelativeRect(), and setViewportRect().
|
inherited |
Referenced by Digikam::DImgChildItem::setRelativePos().
|
inherited |
Returns the position and size relative to the DImg displayed in the parent item. All four values are in the interval [0;1].
|
inherited |
Referenced by Digikam::DImgChildItem::setRelativeSize().
void Digikam::RegionFrameItem::setFixedRatio | ( | double | ratio | ) |
void Digikam::RegionFrameItem::setFlags | ( | Flags | flags | ) |
References flags(), GeometryEditable, and ShowResizeHandles.
Referenced by changeFlags(), and RegionFrameItem().
void Digikam::RegionFrameItem::setHudWidget | ( | QGraphicsWidget *const | hudWidget | ) |
Sets a widget item as HUD item. A HUD item will be positioned relative to this item, and repositioned on position changes or resizing. Ownership of the item is taken, and it is made a child item of this item. You can also add QWidget directly. It will be wrapped in a proxy item.
References hudWidget().
Referenced by Digikam::FaceItem::setHudWidget(), and setHudWidget().
void Digikam::RegionFrameItem::setHudWidget | ( | QWidget *const | widget, |
Qt::WindowFlags | wFlags = Qt::WindowFlags() |
||
) |
References setHudWidget().
void Digikam::RegionFrameItem::setHudWidgetVisible | ( | bool | visible | ) |
|
inherited |
Sets the position and size of this item, in coordinates of the original image. Requires a valid parent item.
References Digikam::ImageZoomSettings::originalImageSize(), Digikam::DImgChildItem::originalSize(), Digikam::DImgChildItem::parentDImgItem(), Digikam::DImgChildItem::setRelativePos(), and Digikam::GraphicsDImgItem::zoomSettings.
Referenced by Digikam::DImgChildItem::setOriginalRect().
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
Sets the position and size of this item, in coordinates of the parent DImg item. This is accepting unscaled parent coordinates, just like the "normal" setPos() does. Requires a valid parent item.
References Digikam::DImgChildItem::setRelativePos().
Referenced by Digikam::DImgChildItem::setRect().
|
inlineinherited |
|
inherited |
References Digikam::DImgChildItem::rect(), Digikam::DImgChildItem::setPos(), and Digikam::DImgChildItem::setSize().
Referenced by mouseMoveEvent(), and Digikam::DImgChildItem::setRectInSceneCoordinates().
|
inlineinherited |
|
inherited |
Equivalent to mapping the scene coordinates to the parent item, and calling setRect().
References Digikam::DImgChildItem::rect(), and Digikam::DImgChildItem::setRect().
Referenced by setRectInSceneCoordinatesAdjusted().
void Digikam::RegionFrameItem::setRectInSceneCoordinatesAdjusted | ( | const QRectF & | rect | ) |
|
inherited |
Sets the position and size of this item, relative to the DImg displayed in the parent item. The values of relativePosition must be in the interval [0;1].
References Digikam::DImgChildItem::geometryOnImageChanged(), Digikam::DImgChildItem::positionOnImageChanged(), and Digikam::DImgChildItem::relativePos().
Referenced by Digikam::DImgChildItem::setOriginalPos(), Digikam::DImgChildItem::setPos(), and Digikam::DImgChildItem::setRelativeRect().
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
References Digikam::DImgChildItem::setRelativeSize(), and Digikam::DImgChildItem::size().
Referenced by Digikam::DImgChildItem::setRect().
|
inlineinherited |
|
slot |
The associated HUD item is dynamically moved to be visible. This can only be done for one region at a time. Set the current primary view region of the scene by this method to dynamically reposition the HUD inside this region. The rect given is in scene coordinates.
References Digikam::DImgChildItem::rect().
|
inherited |
|
signalinherited |
Referenced by RegionFrameItem().
|
signalinherited |
Referenced by Digikam::DImgChildItem::setRelativeSize().