mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 22:35:27 -04: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:
parent
d0465375bb
commit
d222add96d
68 changed files with 1929 additions and 1497 deletions
|
@ -1,35 +1,35 @@
|
|||
TEMPLATE = vcapp
|
||||
TARGET = qtZint
|
||||
CONFIG += warn_on \
|
||||
thread \
|
||||
qt \
|
||||
uitools
|
||||
CONFIG += warn_on \
|
||||
thread \
|
||||
qt \
|
||||
uitools
|
||||
|
||||
FORMS = mainWindow.ui \
|
||||
extCLI.ui \
|
||||
extScale.ui \
|
||||
extSequence.ui \
|
||||
extExport.ui \
|
||||
extData.ui
|
||||
extCLI.ui \
|
||||
extScale.ui \
|
||||
extSequence.ui \
|
||||
extExport.ui \
|
||||
extData.ui
|
||||
|
||||
HEADERS = mainwindow.h \
|
||||
barcodeitem.h \
|
||||
cliwindow.h \
|
||||
datawindow.h \
|
||||
exportwindow.h \
|
||||
scalewindow.h \
|
||||
sequencewindow.h \
|
||||
qzint.h
|
||||
HEADERS = mainwindow.h \
|
||||
barcodeitem.h \
|
||||
cliwindow.h \
|
||||
datawindow.h \
|
||||
exportwindow.h \
|
||||
scalewindow.h \
|
||||
sequencewindow.h \
|
||||
qzint.h
|
||||
|
||||
SOURCES = main.cpp \
|
||||
mainwindow.cpp \
|
||||
barcodeitem.cpp \
|
||||
cliwindow.cpp \
|
||||
datawindow.cpp \
|
||||
exportwindow.cpp \
|
||||
scalewindow.cpp \
|
||||
sequencewindow.cpp \
|
||||
qzint.cpp
|
||||
SOURCES = main.cpp \
|
||||
mainwindow.cpp \
|
||||
barcodeitem.cpp \
|
||||
cliwindow.cpp \
|
||||
datawindow.cpp \
|
||||
exportwindow.cpp \
|
||||
scalewindow.cpp \
|
||||
sequencewindow.cpp \
|
||||
qzint.cpp
|
||||
|
||||
RESOURCES = resources.qrc
|
||||
|
||||
|
|
|
@ -75,182 +75,182 @@ be set based on data</string>
|
|||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15 x 15 Compact</string>
|
||||
<string>15 x 15 Compact (Zint 1)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19 x 19 Compact</string>
|
||||
<string>19 x 19 Compact (Zint 2)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23 x 23 Compact</string>
|
||||
<string>23 x 23 Compact (Zint 3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27 x 27 Compact</string>
|
||||
<string>27 x 27 Compact (Zint 4)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19 x 19 (1 Layer)</string>
|
||||
<string>19 x 19 (1 Layer) (Zint 5)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23 x 23 (2 Layers)</string>
|
||||
<string>23 x 23 (2 Layers) (Zint 6)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27 x 27 (3 Layers)</string>
|
||||
<string>27 x 27 (3 Layers) (Zint 7)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>31 x 31 (4 Layers)</string>
|
||||
<string>31 x 31 (4 Layers) (Zint 8)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>37 x 37 (5 Layers)</string>
|
||||
<string>37 x 37 (5 Layers) (Zint 9)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>41 x 41 (6 Layers)</string>
|
||||
<string>41 x 41 (6 Layers) (Zint 10)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>45 x 45 (7 Layers)</string>
|
||||
<string>45 x 45 (7 Layers) (Zint 11)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>49 x 49 (8 Layers)</string>
|
||||
<string>49 x 49 (8 Layers) (Zint 12)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>53 x 53 (9 Layers)</string>
|
||||
<string>53 x 53 (9 Layers) (Zint 13)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>57 x 57 (10 Layers)</string>
|
||||
<string>57 x 57 (10 Layers) (Zint 14)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>61 x 61 (11 Layers)</string>
|
||||
<string>61 x 61 (11 Layers) (Zint 15)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>67 x 67 (12 Layers)</string>
|
||||
<string>67 x 67 (12 Layers) (Zint 16)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>71 x 71 (13 Layers)</string>
|
||||
<string>71 x 71 (13 Layers) (Zint 17)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>75 x 75 (14 Layers)</string>
|
||||
<string>75 x 75 (14 Layers) (Zint 18)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>79 x 79 (15 Layers)</string>
|
||||
<string>79 x 79 (15 Layers) (Zint 19)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>83 x 83 (16 Layers)</string>
|
||||
<string>83 x 83 (16 Layers) (Zint 20)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>87 x 87 (17 Layers)</string>
|
||||
<string>87 x 87 (17 Layers) (Zint 21)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>91 x 91 (18 Layers)</string>
|
||||
<string>91 x 91 (18 Layers) (Zint 22)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>95 x 95 (19 Layers)</string>
|
||||
<string>95 x 95 (19 Layers) (Zint 23)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>101 x 101 (20 Layers)</string>
|
||||
<string>101 x 101 (20 Layers) (Zint 24)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>105 x 105 (21 Layers)</string>
|
||||
<string>105 x 105 (21 Layers) (Zint 25)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>109 x 109 (22 Layers)</string>
|
||||
<string>109 x 109 (22 Layers) (Zint 26)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>113 x 113 (23 Layers)</string>
|
||||
<string>113 x 113 (23 Layers) (Zint 27)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>117 x 117 (24 Layers)</string>
|
||||
<string>117 x 117 (24 Layers) (Zint 28)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>121 x 121 (25 Layers)</string>
|
||||
<string>121 x 121 (25 Layers) (Zint 29)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>125 x 125 (26 Layers)</string>
|
||||
<string>125 x 125 (26 Layers) (Zint 30)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>131 x 131 (27 Layers)</string>
|
||||
<string>131 x 131 (27 Layers) (Zint 31)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>135 x 135 (28 Layers)</string>
|
||||
<string>135 x 135 (28 Layers) (Zint 32)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>139 x 139 (29 Layers)</string>
|
||||
<string>139 x 139 (29 Layers) (Zint 33)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>143 x 143 (30 Layers)</string>
|
||||
<string>143 x 143 (30 Layers) (Zint 34)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>147 x 147 (31 Layers)</string>
|
||||
<string>147 x 147 (31 Layers) (Zint 35)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>151 x 151 (32 Layers)</string>
|
||||
<string>151 x 151 (32 Layers) (Zint 36)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
@ -533,7 +533,7 @@ Value ranges from 2 to 26</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblAztecStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -61,52 +61,52 @@ variable widths</string>
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16 x 18 (Version A)</string>
|
||||
<string>16 x 18 (Version A) (Zint 1)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>22 x 22 (Version B)</string>
|
||||
<string>22 x 22 (Version B) (Zint 2)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>28 x 32 (Version C)</string>
|
||||
<string>28 x 32 (Version C) (Zint 3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>40 x 42 (Version D)</string>
|
||||
<string>40 x 42 (Version D) (Zint 4)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>52 x 54 (Version E)</string>
|
||||
<string>52 x 54 (Version E) (Zint 5)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>70 x 76 (Version F)</string>
|
||||
<string>70 x 76 (Version F) (Zint 6)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>104 x 98 (Version G)</string>
|
||||
<string>104 x 98 (Version G) (Zint 7)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>148 x 134 (Version H)</string>
|
||||
<string>148 x 134 (Version H) (Zint 8)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8 x automatic width (Version S)</string>
|
||||
<string>8 x automatic width (Version S) (Zint 9)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16 x automatic width (Version T)</string>
|
||||
<string>16 x automatic width (Version T) (Zint 10)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
@ -215,7 +215,7 @@ Value ranges from 1 (Disabled) to 128</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblC1StructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -270,7 +270,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblC1StructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDotCols">
|
||||
<property name="text">
|
||||
<string>&Number of Data Columns:</string>
|
||||
<string>&Number of Columns:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set the width of the symbol</string>
|
||||
|
@ -1034,26 +1034,48 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelDotMask">
|
||||
<widget class="QLabel" name="lblDotSize">
|
||||
<property name="text">
|
||||
<string>Size:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Height x width in X-dimensions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lblDotSizeMsg">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Height x width in X-dimensions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblDotMask">
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use
|
||||
<string>Manually specify which mask to use.
|
||||
The prime masks 0' to 3' are the same
|
||||
as 0 to 3 with the corners lit</string>
|
||||
as 0 to 3 with the corners lit (and may
|
||||
not differ if already set)</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDotMask</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbDotMask">
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use
|
||||
<string>Manually specify which mask to use.
|
||||
The prime masks 0' to 3' are the same
|
||||
as 0 to 3 with the corners lit</string>
|
||||
as 0 to 3 with the corners lit (and may
|
||||
not differ if already set)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
|
@ -1373,7 +1395,7 @@ Value ranges from 2 to 35</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblDotStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -1600,7 +1622,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblDotStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -340,7 +340,7 @@ Value ranges from 2 to 16</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblGridStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -472,7 +472,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblGridStructAppID">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -201,7 +201,7 @@ Value ranges from 000 to 999
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lblMaxiSCMService">
|
||||
<property name="enabled">
|
||||
|
@ -278,7 +278,7 @@ specified as follows
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="lblMaxiSCMVV">
|
||||
<property name="enabled">
|
||||
|
@ -423,7 +423,7 @@ Value ranges from 2 to 8</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblMaxiStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -515,7 +515,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblMaxiStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -300,7 +300,7 @@ Value ranges from 1 (Disabled) to 99999</string>
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblMPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -991,7 +991,7 @@ Value ranges from 1 (Disabled) to 99999</string>
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -1046,7 +1046,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblPDFStructAppID">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -579,7 +579,7 @@ Value ranges from 2 to 16</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblQRStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -711,7 +711,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblQRStructAppID">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -273,7 +273,7 @@ Value ranges from 2 to 8</string>
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblUltraStructAppIndex">
|
||||
<property name="enabled">
|
||||
|
@ -365,7 +365,7 @@ Value ranges from 1 to count
|
|||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblUltraStructAppID">
|
||||
<property name="enabled">
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
***************************************************************************/
|
||||
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
//#include <QDebug>
|
||||
#if 0
|
||||
#include <QDebug>
|
||||
#endif
|
||||
#include <QAction>
|
||||
#include <QClipboard>
|
||||
#include <QColor>
|
||||
|
@ -802,7 +804,7 @@ void MainWindow::about()
|
|||
"<p>Copyright © 2006-2025 Robin Stuart and others.<br>"
|
||||
"Qt backend by BogDan Vatra.<br>"
|
||||
"Released under GNU GPL 3.0 or later.</p>"
|
||||
"<p>Qt version %2<br>%3</p>"
|
||||
"<p>Qt version %2, settings:<br>%3</p>"
|
||||
"<p>\"Mailmark\" is a Registered Trademark of Royal Mail.<br>"
|
||||
"\"QR Code\" is a Registered Trademark of Denso Corp.<br>"
|
||||
"\"Telepen\" is a Registered Trademark of SB Electronics.</p>"
|
||||
|
@ -3576,25 +3578,44 @@ void MainWindow::automatic_info_set()
|
|||
if (!m_optionWidget) {
|
||||
return;
|
||||
}
|
||||
|
||||
static const char qrECCs[4] = { 'L', 'M', 'Q', 'H' };
|
||||
static const char *qrECCPercents[4] = { "~20%", "~37%", "~55%", "~65%" };
|
||||
const int symbology = bstyle_items[bstyle->currentIndex()].symbology;
|
||||
const bool isError = m_bc.bc.getError() >= ZINT_ERROR;
|
||||
QLineEdit *txt;
|
||||
QComboBox *cmb;
|
||||
QLabel *lbl;
|
||||
int opt;
|
||||
|
||||
if (symbology == BARCODE_AZTEC || symbology == BARCODE_HIBC_AZTEC) {
|
||||
if ((txt = m_optionWidget->findChild<QLineEdit*>(QSL("txtAztecAutoInfo")))) {
|
||||
if (!isError && !get_rad_val(QSL("radAztecSize"))) {
|
||||
if (!isError) {
|
||||
static const QString eccStrs[6] = {
|
||||
"3 words", "< 5% + 3 words", "10% + 3 words", "23% + 3 words", "36% + 3 words", "50% + 3 words"
|
||||
};
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
if (w <= 27) { // Note Zint always favours Compact on automatic
|
||||
txt->setText(QString::asprintf("(%d X %d Compact)", w, w));
|
||||
} else {
|
||||
int layers;
|
||||
if (w <= 95) {
|
||||
layers = (w - 16 + (w <= 61)) / 4;
|
||||
const int z = m_bc.bc.encodedOption2();
|
||||
const int ecc = m_bc.bc.encodedOption1();
|
||||
QString sizeStr, eccStr;
|
||||
if (z >= 1 && z <= 36) {
|
||||
if (z <= 4) {
|
||||
sizeStr = QSL("%1 X %2 Compact (Zint %3)").arg(w).arg(w).arg(z);
|
||||
} else {
|
||||
layers = (w - 20 + (w <= 125) * 2) / 4;
|
||||
sizeStr = QSL("%1 X %2 (%3 Layers) (Zint %4)").arg(w).arg(w).arg(z - 4).arg(z);
|
||||
}
|
||||
txt->setText(QString::asprintf("(%d X %d (%d Layers))", w, w, layers));
|
||||
}
|
||||
if (ecc >= -1 && ecc <= 4) { // -1 indicates min 3, 0 indicates < 5% + 3
|
||||
eccStr = eccStrs[ecc + 1];
|
||||
}
|
||||
if (get_rad_val("radAztecAuto") && !sizeStr.isEmpty() && !eccStr.isEmpty()) {
|
||||
txt->setText(QSL("%1, ECC %2").arg(sizeStr).arg(eccStr));
|
||||
} else if (get_rad_val("radAztecSize") && !eccStr.isEmpty()) {
|
||||
txt->setText(QSL("ECC %1").arg(eccStr));
|
||||
} else if (get_rad_val("radAztecECC") && !sizeStr.isEmpty()) {
|
||||
txt->setText(sizeStr);
|
||||
} else {
|
||||
txt->setText(QSEmpty);
|
||||
}
|
||||
} else {
|
||||
txt->setText(QSEmpty);
|
||||
|
@ -3603,9 +3624,8 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_CHANNEL) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbChannel")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
const int channels = (m_bc.bc.encodedWidth() - 7) / 4;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", channels));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 3 && opt <= 8) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3613,16 +3633,15 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_CODABLOCKF || symbology == BARCODE_HIBC_BLOCKF) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbCbfWidth")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
const int data_w = (m_bc.bc.encodedWidth() - 57) / 11;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d (%d data))", data_w + 5, data_w));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 9 && opt <= 67) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 (%2 data)").arg(opt).arg(opt - 5));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbCbfHeight")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", m_bc.bc.encodedRows()));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 1 && opt <= 44) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3630,8 +3649,8 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_CODE16K) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbC16kRows")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", m_bc.bc.encodedRows()));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 2 && opt <= 16) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3639,8 +3658,8 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_CODE49) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbC49Rows")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", m_bc.bc.encodedRows()));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 2 && opt <= 8) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3648,18 +3667,13 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_CODEONE) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbC1Size")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 8) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
// Note Versions S & T not used by Zint in automatic mode
|
||||
static const char vers[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' };
|
||||
int idx;
|
||||
if (r <= 40) {
|
||||
idx = (r == 22) + (r == 28) * 2 + (r == 40) * 3;
|
||||
} else {
|
||||
idx = (r == 70) + (r == 104) * 2 + (r == 148) * 3 + 4;
|
||||
}
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d X %d (Version %c))", r, w, vers[idx]));
|
||||
static const char vers[8] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' };
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Version %3) (Zint %4)")
|
||||
.arg(r).arg(w).arg(vers[opt - 1]).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3667,43 +3681,13 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_DATAMATRIX || symbology == BARCODE_HIBC_DM) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbDM200Size")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 48) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
int z = 0;
|
||||
if (r == w) {
|
||||
if (r <= 26) {
|
||||
z = (r - 8) / 2;
|
||||
} else if (r <= 52) {
|
||||
z = 10 + (r - 32) / 4;
|
||||
} else if (r <= 104) {
|
||||
z = 16 + (r - 64) / 8;
|
||||
} else {
|
||||
z = 22 + (r - 120) / 12;
|
||||
}
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Zint %d))", r, w, z));
|
||||
} else if ((r == 8 && (w == 18 || w == 32)) || (r == 12 && (w == 26 || w == 36))
|
||||
|| (r == 16 && (w == 36 || w == 48))) {
|
||||
z = 25 + (w == 32) + (w == 26) * 2 + (r == 12 && w == 36) * 3
|
||||
+ (r == 16 && w == 36) * 4 + (w == 48) * 5;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Zint %d))", r, w, z));
|
||||
} else { // DMRE
|
||||
if (r == 8) {
|
||||
z = 31 + (w == 64) + (w == 80) * 2 + (w == 96) * 3 + (w == 120) * 4 + (w == 144) * 5;
|
||||
} else if (r == 12) {
|
||||
z = 37 + (w == 88);
|
||||
} else if (r == 16) {
|
||||
z = 39;
|
||||
} else if (r == 20) {
|
||||
z = 40 + (w == 44) + (w == 64) * 2;
|
||||
} else if (r == 22) {
|
||||
z = 43;
|
||||
} else if (r == 24) {
|
||||
z = 44 + (w == 64);
|
||||
} else { /* if (r == 26) */
|
||||
z = 46 + (w == 48) + (w == 64) * 2;
|
||||
}
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (DMRE) (Zint %d))", r, w, z));
|
||||
if (opt >= 31) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (DMRE) (Zint %3)").arg(r).arg(w).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Zint %3)").arg(r).arg(w).arg(opt));
|
||||
}
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
|
@ -3712,17 +3696,11 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_MAILMARK_2D) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMailmark2DSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2())
|
||||
&& (opt == 8 || opt == 10 || opt == 30)) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
int z;
|
||||
if (r == w) {
|
||||
z = r <= 26 ? 8 : 10;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Zint %d) - Type %d)", r, w, z, z - 1));
|
||||
} else {
|
||||
z = 30;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Zint %d) - Type %d)", r, w, z, z - 1));
|
||||
}
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Zint %3) - Type %4").arg(r).arg(w).arg(opt).arg(opt - 1));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3730,8 +3708,26 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_DOTCODE) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbDotCols")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", m_bc.bc.encodedWidth()));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 5 && opt <= 200) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((lbl = m_optionWidget->findChild<QLabel*>(QSL("lblDotSizeMsg")))) {
|
||||
if (!isError) {
|
||||
lbl->setText(QSL("%1x%2 (HxW)").arg(m_bc.bc.encodedRows()).arg(m_bc.bc.encodedWidth()));
|
||||
} else {
|
||||
lbl->setText(QSEmpty);
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbDotMask")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = (m_bc.bc.encodedOption3() >> 8)) >= 1 && opt <= 8) {
|
||||
QString mask = QString::number((opt - 1) & 0x3);
|
||||
if (opt > 4) {
|
||||
mask += '\'';
|
||||
}
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(mask));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3739,9 +3735,16 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_GRIDMATRIX) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbGridSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 13) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Version %d))", r, r, (r - 6) / 12));
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Version %3)").arg(r).arg(r).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbGridECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 1 && opt <= 5) {
|
||||
cmb->setItemText(0, QSL("Automatic ~%1%").arg(opt * 10));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3749,9 +3752,24 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_HANXIN) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbHXSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 84) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Version %d))", r, r, (r - 21) / 2));
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Version %3)").arg(r).arg(r).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbHXECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 1 && opt <= 4) {
|
||||
static const char *eccPercents[4] = { "~8%", "~15%", "~23%", "~30%" };
|
||||
cmb->setItemText(0, QSL("Automatic %1 (Level L%2)").arg(eccPercents[opt - 1]).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbHXMask")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = (m_bc.bc.encodedOption3() >> 8)) >= 1 && opt <= 4) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt - 1));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3759,19 +3777,8 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_MICROPDF417 || symbology == BARCODE_HIBC_MICPDF) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMPDFCols")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
int cols;
|
||||
if (w == 38) {
|
||||
cols = 1;
|
||||
} else if (w == 55) {
|
||||
cols = 2;
|
||||
} else if (w == 82) {
|
||||
cols = 3;
|
||||
} else { /* if (w == 99) */
|
||||
cols = 4;
|
||||
}
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", cols));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 4) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3779,9 +3786,23 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_MICROQR) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMQRSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 4) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Version M%d))", r, r, (r - 9) / 2));
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (M%3)").arg(r).arg(r).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMQRECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 1 && opt <= 3) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 (Level %2)").arg(qrECCPercents[opt - 1]).arg(qrECCs[opt - 1]));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMQRMask")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = (m_bc.bc.encodedOption3() >> 8)) >= 1 && opt <= 4) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt - 1));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3789,18 +3810,22 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_PDF417 || symbology == BARCODE_PDF417COMP || symbology == BARCODE_HIBC_PDF) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbPDFCols")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
const int overhead = get_rad_val(QSL("radPDFTruncated")) || symbology == BARCODE_PDF417COMP ? 35 : 69;
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", (w - overhead) / 17));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 30) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbPDFRows")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d)", r));
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedRows()) >= 3 && opt <= 90) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbPDFECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 0 && opt <= 8) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 (%2 words)").arg(opt).arg((int) pow(2, opt + 1)));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3808,9 +3833,23 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_QRCODE || symbology == BARCODE_HIBC_QR) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbQRSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 40) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (%d x %d (Version %d))", r, r, (r - 17) / 4));
|
||||
cmb->setItemText(0, QSL("Automatic %1 x %2 (Version %3)").arg(r).arg(r).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbQRECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) >= 1 && opt <= 4) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 (Level %2)").arg(qrECCPercents[opt - 1]).arg(qrECCs[opt - 1]));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbQRMask")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = (m_bc.bc.encodedOption3() >> 8)) >= 1 && opt <= 8) {
|
||||
cmb->setItemText(0, QSL("Automatic %1").arg(opt - 1));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3818,26 +3857,17 @@ void MainWindow::automatic_info_set()
|
|||
|
||||
} else if (symbology == BARCODE_RMQR) {
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbRMQRSize")))) {
|
||||
if (!isError && cmb->currentIndex() == 0) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 38) {
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
int z;
|
||||
if (r == 11 || r == 13) {
|
||||
z = 11 + (r == 13) * 6 + (w == 43) + (w == 59) * 2 + (w == 77) * 3 + (w == 99) * 4
|
||||
+ (w == 139) * 5;
|
||||
} else {
|
||||
z = (w == 59) + (w == 77) * 2 + (w == 99) * 3 + (w == 139) * 4;
|
||||
if (r == 7) {
|
||||
z += 1;
|
||||
} else if (r == 9) {
|
||||
z += 6;
|
||||
} else if (r == 15) {
|
||||
z += 23;
|
||||
} else { /* if (r == 17) */
|
||||
z += 28;
|
||||
}
|
||||
}
|
||||
cmb->setItemText(0, QString::asprintf("Automatic (R%dx%d (Zint %d))", r, w, z));
|
||||
cmb->setItemText(0, QSL("Automatic R%1x%2 (Zint %3)").arg(r).arg(w).arg(opt));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
}
|
||||
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbRMQRECC")))) {
|
||||
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption1()) && (opt == 2 || opt == 4)) {
|
||||
cmb->setItemText(0, QSL("Automatic %1 (Level %2)").arg(qrECCPercents[opt - 1]).arg(qrECCs[opt - 1]));
|
||||
} else {
|
||||
cmb->setItemText(0, QSL("Automatic"));
|
||||
}
|
||||
|
@ -3846,9 +3876,21 @@ void MainWindow::automatic_info_set()
|
|||
} else if (symbology == BARCODE_ULTRA) {
|
||||
if ((txt = m_optionWidget->findChild<QLineEdit*>(QSL("txtUltraAutoInfo")))) {
|
||||
if (!isError) {
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
static const QString eccStrs[6] = {
|
||||
"Error Detection Only", "Approx 5%", "Approx 9%", "Approx 17%", "Approx 25%", "Approx 33%"
|
||||
};
|
||||
const int r = m_bc.bc.encodedRows();
|
||||
txt->setText(QString::asprintf("(%d X %d)", w, r));
|
||||
const int w = m_bc.bc.encodedWidth();
|
||||
const int ecc = m_bc.bc.encodedOption1();
|
||||
QString eccStr;
|
||||
if (ecc >= 1 && ecc <= 6) {
|
||||
eccStr = eccStrs[ecc - 1];
|
||||
}
|
||||
if (get_rad_val("radUltraAuto")) {
|
||||
txt->setText(QSL("%1 X %2 (HxW), EC%3 - %4").arg(r).arg(w).arg(ecc - 1).arg(eccStr));
|
||||
} else {
|
||||
txt->setText(QSL("%1 X %2 (HxW)").arg(r).arg(w));
|
||||
}
|
||||
} else {
|
||||
txt->setText(QSEmpty);
|
||||
}
|
||||
|
|
|
@ -1,87 +1,46 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <winver.h>
|
||||
|
||||
|
||||
#define VER_FILEVERSION 2,15,0,9
|
||||
#define VER_FILEVERSION_STR "2.15.0.9\0"
|
||||
#define VER_FILEVERSION 2,15,0,9
|
||||
#define VER_FILEVERSION_STR "2.15.0.9\0"
|
||||
|
||||
#ifdef GCC_WINDRES
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
#else
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
#endif
|
||||
|
||||
FILEVERSION VER_FILEVERSION
|
||||
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
||||
#else
|
||||
|
||||
FILEFLAGS 0
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
#endif
|
||||
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
|
||||
FILETYPE VFT_APP
|
||||
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
|
||||
BLOCK "StringFileInfo"
|
||||
|
||||
BEGIN
|
||||
|
||||
BLOCK "000904b0"
|
||||
|
||||
BEGIN
|
||||
|
||||
VALUE "CompanyName", "Robin Stuart & BogDan Vatra"
|
||||
|
||||
VALUE "FileDescription", "qtZint barcode generator"
|
||||
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
|
||||
VALUE "InternalName", "qtZint"
|
||||
|
||||
VALUE "LegalCopyright", "Copyright © 2025 Robin Stuart & BogDan Vatra"
|
||||
|
||||
VALUE "License", "GNU General Public License version 3"
|
||||
|
||||
VALUE "CompanyName", "Robin Stuart & BogDan Vatra"
|
||||
VALUE "FileDescription", "qtZint barcode generator"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "qtZint"
|
||||
VALUE "LegalCopyright", "Copyright © 2025 Robin Stuart & BogDan Vatra"
|
||||
VALUE "License", "GNU General Public License version 3"
|
||||
VALUE "OriginalFilename", "qtZint"
|
||||
|
||||
VALUE "ProductName", "Zint Barcode Studio"
|
||||
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
|
||||
VALUE "WWW", "http://www.zint.org.uk"
|
||||
|
||||
VALUE "ProductName", "Zint Barcode Studio"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
VALUE "WWW", "https://www.zint.org.uk"
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
BEGIN
|
||||
|
||||
VALUE "Translation", 0x9, 1200
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "zint-qt.ico"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue