mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-28 06:16:03 +00:00
backend_qt: new method save_as_memfile() to save as
`BARCODE_MEMORY_FILE` and use in GUI for pasting to clipboard instead of creating temporary file CLI: allow fully case-insensitive "tiff" as filetype (saved as ".tif"), processing up to 4-letter extensions and hopefully making filetype handling more expected; simplify `validate_float()` (unneeded 2nd fractional max test); add some more internal "--test" tests BWIPP: update to latest (change from ctx to global VM) - zint tests work as-is, no change
This commit is contained in:
@@ -278,10 +278,10 @@ public:
|
||||
bool takesGS1AIData(int symbology = 0) const;
|
||||
|
||||
|
||||
/* Error or warning returned by Zint on `render()` or `save_to_file()` */
|
||||
/* Error or warning returned by Zint on `render()`, `save_to_file()` or `save_to_memfile()` */
|
||||
int getError() const;
|
||||
|
||||
/* Error message returned by Zint on `render()` or `save_to_file()` */
|
||||
/* Error message returned by Zint on `render()`, `save_to_file()` or `save_to_memfile()` */
|
||||
const QString& lastError() const; // `symbol->errtxt`
|
||||
|
||||
/* Whether `lastError()` set */
|
||||
@@ -291,6 +291,10 @@ public:
|
||||
/* Encode and print barcode to file `filename`. Only sets `getError()` on error, not on warning */
|
||||
bool save_to_file(const QString& filename); // `ZBarcode_Print()`
|
||||
|
||||
/* Encode and print barcode to memory file `filename` (only the extension is used, to determine output format).
|
||||
Only sets `getError()` on error, not on warning */
|
||||
bool save_to_memfile(const QString& filename, QByteArray& data); // `ZBarcode_Print()` + BARCODE_MEMORY_FILE
|
||||
|
||||
/* Encode and display barcode in `paintRect` using `painter`.
|
||||
Note: legacy argument `mode` is not used */
|
||||
void render(QPainter& painter, const QRectF& paintRect, AspectRatioMode mode = IgnoreAspectRatio);
|
||||
|
||||
Reference in New Issue
Block a user