mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 10:57:07 +00:00
- AZTEC/CHANNEL/CODABLOCKF/CODE16K/CODE49/CODEONE/DATAMATRIX/
DOTCODE/GRIDMATRIX/HANXIN/MICROPDF417/MICROQR/PDF417/QRCODE/
RMQR/ULTRA: set `option_1/2/3` to values used in encodation
("Feedback options"), and add new access methods
`encodedOption1()` etc. to Qt Backend, and use in GUI to provide
better feedback on "Automatic" selections
- AZTEC: give more precise warnings in low ECC situations, and
indicate via `option_1` by setting to -1 (min 3 words), 0
(<5% + 3 words) (`ecc_ratio`)
- set_height: fix non-compliance false positives by using epsilon
in checks (prompted by CODABLOCKF non-compliant warning for
zint-generated compliant height - floating point `rows` mult !=
`zero_count` div; one test regression for CODE93);
better warning messages on non-compliant heights (min/max)
- manual/man page: fix DATAMATRIX Sizes tables "28 12x26" ->
"27 12x26"
- GUI: AZTEC/CODEONE: add Zint versions to comboboxes
- DOTCODE: improve error messages re size too small/large
- ULTRA: better ZINT_TEST codeword dump (ZINT_DEBUG_TEST)
- general: various tabs -> spaces; prettify main .rc files;
trailing spaces; small amount of code fiddling (CODE16K)
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#include <QDebug>
|
||||
#if 0
|
||||
#include <QDebug>
|
||||
#endif
|
||||
#include <QFontDatabase>
|
||||
#include <QFontMetrics>
|
||||
/* The following include is necessary to compile with Qt 5.15 on Windows; Qt 5.7 did not require it */
|
||||
@@ -204,6 +206,7 @@ namespace Zint {
|
||||
m_warn_level(WARN_DEFAULT), m_debug(false),
|
||||
m_encodedWidth(0), m_encodedRows(0), m_encodedHeight(0.0f),
|
||||
m_vectorWidth(0.0f), m_vectorHeight(0.0f),
|
||||
m_encodedOption1(-1), m_encodedOption2(0), m_encodedOption3(0),
|
||||
m_error(0),
|
||||
target_size_horiz(0), target_size_vert(0) // Legacy
|
||||
{
|
||||
@@ -315,10 +318,16 @@ namespace Zint {
|
||||
m_encodedHeight = m_zintSymbol->height;
|
||||
m_vectorWidth = m_zintSymbol->vector->width;
|
||||
m_vectorHeight = m_zintSymbol->vector->height;
|
||||
m_encodedOption1 = m_zintSymbol->option_1;
|
||||
m_encodedOption2 = m_zintSymbol->option_2;
|
||||
m_encodedOption3 = m_zintSymbol->option_3;
|
||||
emit encoded();
|
||||
} else {
|
||||
m_encodedWidth = m_encodedRows = 0;
|
||||
m_encodedHeight = m_vectorWidth = m_vectorHeight = 0.0f;
|
||||
m_encodedOption1 = -1;
|
||||
m_encodedOption2 = 0;
|
||||
m_encodedOption3 = 0;
|
||||
emit errored();
|
||||
}
|
||||
}
|
||||
@@ -798,6 +807,18 @@ namespace Zint {
|
||||
return m_vectorHeight;
|
||||
}
|
||||
|
||||
int QZint::encodedOption1() const { // Read-only, encoded `option_1`
|
||||
return m_encodedOption1;
|
||||
}
|
||||
|
||||
int QZint::encodedOption2() const { // Read-only, encoded `option_2`
|
||||
return m_encodedOption2;
|
||||
}
|
||||
|
||||
int QZint::encodedOption3() const { // Read-only, encoded `option_3`
|
||||
return m_encodedOption3;
|
||||
}
|
||||
|
||||
/* Legacy property getters/setters */
|
||||
void QZint::setWidth(int width) { setOption2(width); }
|
||||
int QZint::width() const { return m_option_2; }
|
||||
|
||||
Reference in New Issue
Block a user