52 [[nodiscard]] QPointF
pan()
const override {
return m_pan; };
58 [[nodiscard]]
float zoom()
const override {
return m_zoom; };
Base class for Qt Quick image display items managing common state dimensions.
BaseImageItem()
Constructs a BaseImageItem.
bool isImageValid() const override
Checks if the full image data is loaded and valid. This method provides thread-safe access to check t...
virtual void onZoomChanged(float new_zoom)
QPointF pan() const override
Gets the current pan offset.
std::unique_ptr< Core::Common::ImageRegion > m_full_image
Unique pointer to the full image data displayed by this item.
virtual void onPanChanged(const QPointF &new_pan)
QMutex m_image_mutex
Mutex protecting access to m_full_image and related state. Ensures thread-safe updates to the image d...
int imageHeight() const override
Gets the height of the image. This method provides thread-safe access to m_image_height.
float zoom() const override
Gets the current zoom level.
QPointF m_pan
Current pan offset applied to the image.
float m_zoom
Current zoom level applied to the image.
int imageWidth() const override
Gets the width of the image. This method provides thread-safe access to m_image_width.
void setZoom(float zoom) override
Sets the zoom level.
virtual void onImageChanged()
QMutex * getImageMutex() const override
Gets a pointer to the mutex protecting the image data. This method provides access to the mutex for t...
void setPan(const QPointF &pan) override
Sets the pan offset.
const Core::Common::ImageRegion * getFullImage() const override
Gets a pointer to the full image data. This method provides access to the internal image data pointer...
Abstract base class for image display items managing common state (zoom, pan, dimensions).
Represents a rectangular region of an image and its pixel data.