10#include <QQuickPaintedItem>
49 QImage m_current_qimage;
71 void setImage(std::unique_ptr<Core::Common::ImageRegion> image)
override;
82 void updateTile(std::unique_ptr<Core::Common::ImageRegion> tile)
override;
95 void paint(QPainter* painter)
override;
143 [[nodiscard]]
bool isImagePaintValid()
const;
Base class for Qt Quick image display items managing common state (zoom, pan, dimensions)
Base class for Qt Quick image display items managing common state dimensions.
QPointF pan() const override
Gets the current pan offset.
float zoom() const override
Gets the current zoom level.
QQuickItem that renders an image via QPainter.
void paint(QPainter *painter) override
Paints the image using QPainter.
void onImageChanged() override
void onZoomChanged(float new_zoom) override
void onPanChanged(const QPointF &new_pan) override
void setImage(std::unique_ptr< Core::Common::ImageRegion > image) override
Sets the full image to be displayed.
void updateTile(std::unique_ptr< Core::Common::ImageRegion > tile) override
Updates a specific tile of the displayed image.
void imageSizeChanged()
Signal emitted when the image dimensions change (width or height).
void panChanged(const QPointF &pan)
Signal emitted when the pan offset changes.
PaintedImageItem(QQuickItem *parent=nullptr)
Constructs a new PaintedImageItem.
~PaintedImageItem()=default
Destroys the PaintedImageItem.
void zoomChanged(float zoom)
Signal emitted when the zoom value changes.
Represents a rectangular region of an image and its pixel data.