mirror of
https://git.code.sf.net/p/zint/code
synced 2026-06-10 15:43:40 +00:00
TELEPEN/TELEPEN_NUM: support AIM-defined Start/Stop characters
with option "--vers=1" (API `option_2 = 1`); define minimum height based on AIM USS Telepen TELEPEN_NUM: support switching to Full ASCII mode with DLE; max digits 136 -> 138 TELEPEN: support switching to Compressed Numeric Mode with DLE if AIM-defined Start/Stop enabled CLI: make args for "--dmb256", "--dmc40", "--scalexdimdp" and "--scmvv" optional library: new escape sequences `\L`, `\F`, `\N`, & refactor parsing to use `escs` table ZBarcode_Scale_From_XdimDp: allow TXT filetype (so "--dump" test works) output: Telepen default quiet zone confirmed as 10X aztec/dmatrix: fix source line too long man page: embolden options and emphasize args; add barcode names to standards; various other fixes
This commit is contained in:
@@ -63,8 +63,8 @@ DataWindow::DataWindow(const QString &input, bool isEscaped, int seg_no) : Valid
|
||||
QString out;
|
||||
out.reserve(input.length());
|
||||
QZINT_SIZETYPE lastPosn = 0;
|
||||
QRegularExpression escRE(QSL("\\\\(?:[0EabtnvfreGR\\\\]|d[0-9]{3}|o[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}"
|
||||
"|U[0-9A-Fa-f]{6})"));
|
||||
QRegularExpression escRE(QSL("\\\\(?:[0EabtnvfrLeFGRN\\\\]|d[0-9]{3}|o[0-7]{3}|x[0-9A-Fa-f]{2}"
|
||||
"|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{6})"));
|
||||
QRegularExpressionMatchIterator matchI = escRE.globalMatch(input);
|
||||
while (matchI.hasNext()) {
|
||||
QRegularExpressionMatch match = matchI.next();
|
||||
|
||||
@@ -57,6 +57,8 @@ FORMS += extCLI.ui \
|
||||
grpPZN.ui \
|
||||
grpQR.ui \
|
||||
grpRMQR.ui \
|
||||
grpTelepen.ui \
|
||||
grpTelepenNum.ui \
|
||||
grpUltra.ui \
|
||||
grpUPCA.ui \
|
||||
grpUPCEAN.ui \
|
||||
|
||||
@@ -49,6 +49,8 @@ FORMS += extCLI.ui \
|
||||
grpPZN.ui \
|
||||
grpQR.ui \
|
||||
grpRMQR.ui \
|
||||
grpTelepen.ui \
|
||||
grpTelepenNum.ui \
|
||||
grpUltra.ui \
|
||||
grpUPCA.ui \
|
||||
grpUPCEAN.ui \
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpTelepen</class>
|
||||
<widget class="QWidget" name="grpTelepen">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>186</width>
|
||||
<height>123</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vLayoutTelepen">
|
||||
<property name="contentMargins">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkTelepenAIM">
|
||||
<property name="text">
|
||||
<string>Enable &AIM Full ASCII + Compressed Numeric Mode</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Use different Start/Stop characters that indicate
|
||||
the use of Full ASCII + Compressed Numeric Mode
|
||||
where DLE (ASCII 16, escape '\L') indicates switch
|
||||
to Compressed Numeric Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="noteTelepenDLE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Note: DLE only indicates switch to Compressed Numeric if AIM enabled.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpTelepenNum</class>
|
||||
<widget class="QWidget" name="grpTelepenNum">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>186</width>
|
||||
<height>123</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vLayoutTelepenNum">
|
||||
<property name="contentMargins">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkTelepenNumAIM">
|
||||
<property name="text">
|
||||
<string>Enable &AIM Compressed Numeric Mode (+ Full ASCII)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Use different Start/Stop characters that indicate
|
||||
the use of Compressed Numeric Mode (+ Full ASCII)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="noteTelepenNumDLE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Note: DLE (ASCII 16, escape '\L') may always be used to indicate switch to Full ASCII.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1558,9 +1558,12 @@ or import from file</string>
|
||||
<tr><td>\v&nbsp;</td><td>Vertical Tab (0x0B)</td></tr>
|
||||
<tr><td>\f&nbsp;</td><td>Form Feed (0x0C)</td></tr>
|
||||
<tr><td>\r&nbsp;</td><td>Carriage Return (0x0D)</td></tr>
|
||||
<tr><td>\L&nbsp;</td><td>Data Link Escape (0x10)</td></tr>
|
||||
<tr><td>\e&nbsp;</td><td>Escape (0x1B)</td></tr>
|
||||
<tr><td>\F&nbsp;</td><td>File Separator (0x1C)</td></tr>
|
||||
<tr><td>\G&nbsp;</td><td>Group Separator (0x1D)</td></tr>
|
||||
<tr><td>\R&nbsp;</td><td>Record Separator (0x1E)</td></tr>
|
||||
<tr><td>\N&nbsp;</td><td>Unit Separator (0x1F)</td></tr>
|
||||
<tr><td>\(&nbsp;</td><td>Opening parenthesis (0x28) ("GS1 ()" only) </td></tr>
|
||||
<tr><td>\)&nbsp;</td><td>Closing parenthesis (0x29) ("GS1 ()" only) </td></tr>
|
||||
<tr><td>\\&nbsp;</td><td>Backslash (0x5C)</td></tr>
|
||||
|
||||
@@ -2297,6 +2297,30 @@ void MainWindow::change_options()
|
||||
connect(get_widget(QSL("chkPlesseyShowChecks")), SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
} else if (symbology == BARCODE_TELEPEN) {
|
||||
QFile file(QSL(":/grpTelepen.ui"));
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
m_optionWidget = uiload.load(&file);
|
||||
file.close();
|
||||
load_sub_settings(settings, symbology);
|
||||
vLayoutSpecific->addWidget(m_optionWidget);
|
||||
set_smaller_font(QSL("noteTelepenDLE"));
|
||||
grpSpecific->show();
|
||||
connect(get_widget(QSL("chkTelepenAIM")), SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
} else if (symbology == BARCODE_TELEPEN_NUM) {
|
||||
QFile file(QSL(":/grpTelepenNum.ui"));
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
m_optionWidget = uiload.load(&file);
|
||||
file.close();
|
||||
load_sub_settings(settings, symbology);
|
||||
vLayoutSpecific->addWidget(m_optionWidget);
|
||||
set_smaller_font(QSL("noteTelepenNumDLE"));
|
||||
grpSpecific->show();
|
||||
connect(get_widget(QSL("chkTelepenNumAIM")), SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
} else if (symbology == BARCODE_ULTRA) {
|
||||
QFile file(QSL(":/grpUltra.ui"));
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
@@ -3402,6 +3426,20 @@ void MainWindow::update_preview()
|
||||
}
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN:
|
||||
m_bc.bc.setSymbol(BARCODE_TELEPEN);
|
||||
if (get_chk_val(QSL("chkTelepenAIM"))) {
|
||||
m_bc.bc.setOption2(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN_NUM:
|
||||
m_bc.bc.setSymbol(BARCODE_TELEPEN_NUM);
|
||||
if (get_chk_val(QSL("chkTelepenNumAIM"))) {
|
||||
m_bc.bc.setOption2(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case BARCODE_ULTRA:
|
||||
m_bc.bc.setSymbol(BARCODE_ULTRA);
|
||||
if (get_rad_val(QSL("radUltraEcc")))
|
||||
@@ -4697,6 +4735,14 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
|
||||
settings.setValue(QSL("studio/bc/plessey/chk_show_checks"), get_chk_val(QSL("chkPlesseyShowChecks")));
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN:
|
||||
settings.setValue(QSL("studio/bc/telepen/chk_aim"), get_chk_val(QSL("chkTelepenAIM")));
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN_NUM:
|
||||
settings.setValue(QSL("studio/bc/telepen_num/chk_aim"), get_chk_val(QSL("chkTelepenNumAIM")));
|
||||
break;
|
||||
|
||||
case BARCODE_ULTRA:
|
||||
settings.setValue(QSL("studio/bc/ultra/autoresizing"), get_rad_grp_index(
|
||||
QStringList() << QSL("radUltraAuto") << QSL("radUltraEcc")));
|
||||
@@ -5176,6 +5222,14 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
|
||||
set_chk_from_setting(settings, QSL("studio/bc/plessey/chk_show_checks"), QSL("chkPlesseyShowChecks"));
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN:
|
||||
set_chk_from_setting(settings, QSL("studio/bc/telepen/chk_aim"), QSL("chkTelepenAIM"));
|
||||
break;
|
||||
|
||||
case BARCODE_TELEPEN_NUM:
|
||||
set_chk_from_setting(settings, QSL("studio/bc/telepen_num/chk_aim"), QSL("chkTelepenNumAIM"));
|
||||
break;
|
||||
|
||||
case BARCODE_ULTRA:
|
||||
set_rad_from_setting(settings, QSL("studio/bc/ultra/autoresizing"),
|
||||
QStringList() << QSL("radUltraAuto") << QSL("radUltraEcc"));
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<file>grpPZN.ui</file>
|
||||
<file>grpQR.ui</file>
|
||||
<file>grpRMQR.ui</file>
|
||||
<file>grpTelepen.ui</file>
|
||||
<file>grpTelepenNum.ui</file>
|
||||
<file>grpUltra.ui</file>
|
||||
<file>grpUPCA.ui</file>
|
||||
<file>grpUPCEAN.ui</file>
|
||||
|
||||
Reference in New Issue
Block a user