mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-08 21:14:14 +02:00
Return qet.imageCrop() as {x, y, width, height}
The crop rectangle came back as the string "x,y,width,height", which a script had to split and parse. elementGeometry() returns a map; the crop now does the same, and an empty map for no such image. Suggested in the review of #1310. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -543,7 +543,7 @@ class QetScriptApi : public QObject
|
||||
Q_INVOKABLE bool setImageScale(int folioIndex, int imageIndex, double factor);
|
||||
Q_INVOKABLE bool setImageRotation(int folioIndex, int imageIndex, double angle);
|
||||
Q_INVOKABLE bool cropImage(int folioIndex, int imageIndex, int x, int y, int width, int height);
|
||||
Q_INVOKABLE QString imageCrop(int folioIndex, int imageIndex) const;
|
||||
Q_INVOKABLE QVariantMap imageCrop(int folioIndex, int imageIndex) const;
|
||||
Q_INVOKABLE bool deleteImage(int folioIndex, int imageIndex);
|
||||
Q_INVOKABLE int addPdfPage(int folioIndex, const QString &pdfPath, int pageNumber,
|
||||
int dpi, double x, double y);
|
||||
|
||||
Reference in New Issue
Block a user