mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
ULTRA: add revision 2 support (based on BWIPP 2021-09-28 update)
GUI: DMATRIX: disable DMRE if SQUARE checked; ULTRA: Size/Ecc buttongroup
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpChannel</class>
|
||||
<widget class="QWidget" name="grpChannel">
|
||||
<class>grpCodeOne</class>
|
||||
<widget class="QWidget" name="grpCodeOne">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -23,7 +23,7 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblChannel">
|
||||
<widget class="QLabel" name="lblC1Size">
|
||||
<property name="text">
|
||||
<string>Symbol Si&ze:</string>
|
||||
</property>
|
||||
@ -103,7 +103,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="groupBoxC1EncodingMode">
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
|
@ -351,7 +351,8 @@ the data with a slash "/"</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Only consider square versions on automatic symbol
|
||||
size selection</string>
|
||||
size selection
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -365,7 +366,8 @@ size selection</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Consider DMRE versions on automatic symbol
|
||||
size selection</string>
|
||||
size selection
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
@ -375,11 +377,12 @@ size selection</string>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMGSSep">
|
||||
<property name="text">
|
||||
<string>&Use separator GS for GS1</string>
|
||||
<string>Use separator GS &for GS1</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Use Group Separator (ASCII 0x1D) to separate GS1 AIs
|
||||
instead of the preferred FNC1</string>
|
||||
instead of the preferred FNC1
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpAztec</class>
|
||||
<widget class="QWidget" name="grpAztec">
|
||||
<class>grpUltra</class>
|
||||
<widget class="QWidget" name="grpUltra">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -34,6 +34,9 @@ based on data</string>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupUltraSizeECC</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -45,6 +48,9 @@ based on data</string>
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupUltraSizeECC</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -91,10 +97,40 @@ error correction codewords</string>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelUltraRevision">
|
||||
<property name="text">
|
||||
<string>Rev&ision:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set revision to use on output</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbUltraRevision</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbUltraRevision">
|
||||
<property name="toolTip">
|
||||
<string>Set revision to use on output</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 (default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpUltraEncodingMode">
|
||||
<widget class="QGroupBox" name="groupBoxUltraEncodingMode">
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
@ -381,7 +417,7 @@ Value ranges from 1 to 80088
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>43</height>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -407,4 +443,7 @@ Value ranges from 1 to 80088
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroupUltraSizeECC"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -1092,6 +1092,7 @@ void MainWindow::change_options()
|
||||
connect(widget_obj("radUltraAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(widget_obj("radUltraEcc"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(widget_obj("cmbUltraEcc"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(widget_obj("cmbUltraRevision"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(widget_obj("radUltraStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(widget_obj("radUltraGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(widget_obj("cmbUltraStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
@ -1675,10 +1676,11 @@ void MainWindow::update_preview()
|
||||
if (m_optionWidget->findChild<QComboBox*>("cmbDM200Size")->currentIndex() == 0) {
|
||||
// Supressing rectangles or allowing DMRE only makes sense if in automatic size mode
|
||||
findChild<QCheckBox*>("chkDMRectangle")->setEnabled(true);
|
||||
findChild<QCheckBox*>("chkDMRE")->setEnabled(true);
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkDMRectangle")->isChecked())
|
||||
m_bc.bc.setOption3(DM_SQUARE);
|
||||
else {
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkDMRectangle")->isChecked()) {
|
||||
m_bc.bc.setOption3(DM_SQUARE);
|
||||
findChild<QCheckBox*>("chkDMRE")->setEnabled(false);
|
||||
} else {
|
||||
findChild<QCheckBox*>("chkDMRE")->setEnabled(true);
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkDMRE")->isChecked())
|
||||
m_bc.bc.setOption3(DM_DMRE);
|
||||
else
|
||||
@ -1891,9 +1893,14 @@ void MainWindow::update_preview()
|
||||
case BARCODE_ULTRA:
|
||||
m_bc.bc.setSymbol(BARCODE_ULTRA);
|
||||
if (m_optionWidget->findChild<QRadioButton*>("radUltraEcc")->isChecked())
|
||||
m_bc.bc.setOption1(m_optionWidget->findChild<QComboBox*>("cmbUltraEcc")->currentIndex() + 1);
|
||||
m_bc.bc.setOption1(get_combobox_index("cmbUltraEcc") + 1);
|
||||
set_gs1_mode(m_optionWidget->findChild<QRadioButton*>("radUltraGS1")->isChecked());
|
||||
|
||||
item_val = get_combobox_index("cmbUltraRevision");
|
||||
if (item_val > 0) {
|
||||
m_bc.bc.setOption2(item_val + 1); // Combobox 0-based
|
||||
}
|
||||
|
||||
item_val = get_combobox_index("cmbUltraStructAppCount");
|
||||
if (item_val) {
|
||||
QString id;
|
||||
@ -2521,6 +2528,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
|
||||
settings.setValue("studio/bc/ultra/autoresizing", get_button_group_index(
|
||||
QStringList() << "radUltraAuto" << "radUltraEcc"));
|
||||
settings.setValue("studio/bc/ultra/ecc", get_combobox_index("cmbUltraEcc"));
|
||||
settings.setValue("studio/bc/ultra/revision", get_combobox_index("cmbUltraRevision"));
|
||||
settings.setValue("studio/bc/ultra/encoding_mode", get_button_group_index(
|
||||
QStringList() << "radUltraStand" << "radUltraGS1"));
|
||||
settings.setValue("studio/bc/ultra/structapp_count", get_combobox_index("cmbUltraStructAppCount"));
|
||||
@ -2862,6 +2870,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
|
||||
set_radiobutton_from_setting(settings, "studio/bc/ultra/autoresizing",
|
||||
QStringList() << "radUltraAuto" << "radUltraEcc");
|
||||
set_combobox_from_setting(settings, "studio/bc/ultra/ecc", "cmbUltraEcc");
|
||||
set_combobox_from_setting(settings, "studio/bc/ultra/revision", "cmbUltraRevision");
|
||||
set_radiobutton_from_setting(settings, "studio/bc/ultra/encoding_mode",
|
||||
QStringList() << "radUltraStand" << "radUltraGS1");
|
||||
set_combobox_from_setting(settings, "studio/bc/ultra/structapp_count", "cmbUltraStructAppCount");
|
||||
|
Reference in New Issue
Block a user