CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
qml_painted_image_item.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <QQuickItem>
12
13namespace CaptureMoment::UI {
14
26
27Q_OBJECT
28
29 // Expose properties from PaintedImageItem to QML
30 // These properties map directly to getter/setter methods and signals defined in BaseImageItem.
31 Q_PROPERTY(float zoom READ zoom WRITE setZoom NOTIFY zoomChanged)
32 Q_PROPERTY(QPointF pan READ pan WRITE setPan NOTIFY panChanged)
33 Q_PROPERTY(int imageWidth READ imageWidth NOTIFY imageSizeChanged)
34 Q_PROPERTY(int imageHeight READ imageHeight NOTIFY imageSizeChanged)
35
36public:
41 explicit QMLPaintedImageItem(QQuickItem* parent = nullptr);
42
50 };
51
52} // namespace CaptureMoment::UI
QQuickItem wrapping PaintedImageItem for direct use in QML.
void setZoom(float zoom) override
Sets the zoom level.
void setPan(const QPointF &pan) override
Sets the pan offset.
QQuickItem that renders an image via QPainter.
void imageSizeChanged()
Signal emitted when the image dimensions change (width or height).
void panChanged(const QPointF &pan)
Signal emitted when the pan offset changes.
void zoomChanged(float zoom)
Signal emitted when the zoom value changes.
Simple image display using QQuickPaintedItem and QPainter (Qt 6)
CaptureMoment — footer