mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-31 15:18:29 -04:00
HANXIN: 0xFFE terminator; reedsol/AZTEC: stack-based; AZTEC/HANXIN/QR/GRIDMATRIX speedups; #209
This commit is contained in:
parent
ab379a233d
commit
cd214addba
70 changed files with 5703 additions and 2907 deletions
|
@ -503,6 +503,48 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelHXMask">
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbHXMask</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbHXMask">
|
||||
<property name="maxVisibleItems">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -94,6 +94,48 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelMQRMask">
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbMQRMask</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbMQRMask">
|
||||
<property name="maxVisibleItems">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -283,6 +283,68 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelQRMask">
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRMask</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbQRMask">
|
||||
<property name="maxVisibleItems">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -345,7 +407,7 @@
|
|||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>43</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
|
|
@ -811,6 +811,7 @@ void MainWindow::change_options()
|
|||
tabMain->insertTab(1,m_optionWidget,tr("QR Cod&e"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbQRMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radQRStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
|
@ -842,6 +843,7 @@ void MainWindow::change_options()
|
|||
tabMain->insertTab(1,m_optionWidget,tr("Han Xin Cod&e"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("chkHXFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
|
@ -855,6 +857,7 @@ void MainWindow::change_options()
|
|||
tabMain->insertTab(1,m_optionWidget,tr("Micro QR Cod&e"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbMQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbMQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbMQRMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("chkMQRFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
|
@ -1424,8 +1427,12 @@ void MainWindow::update_preview()
|
|||
if (item_val) {
|
||||
m_bc.bc.setSecurityLevel(item_val);
|
||||
}
|
||||
item_val = m_optionWidget->findChild<QComboBox*>("cmbQRMask")->currentIndex();
|
||||
if (item_val) {
|
||||
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
|
||||
}
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkQRFullMultibyte")->isChecked()) {
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE);
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1439,8 +1446,12 @@ void MainWindow::update_preview()
|
|||
if (item_val) {
|
||||
m_bc.bc.setSecurityLevel(item_val);
|
||||
}
|
||||
item_val = m_optionWidget->findChild<QComboBox*>("cmbMQRMask")->currentIndex();
|
||||
if (item_val) {
|
||||
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
|
||||
}
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkMQRFullMultibyte")->isChecked()) {
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE);
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1522,8 +1533,12 @@ void MainWindow::update_preview()
|
|||
if (item_val) {
|
||||
m_bc.bc.setSecurityLevel(item_val);
|
||||
}
|
||||
item_val = m_optionWidget->findChild<QComboBox*>("cmbHXMask")->currentIndex();
|
||||
if (item_val) {
|
||||
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
|
||||
}
|
||||
if (m_optionWidget->findChild<QCheckBox*>("chkHXFullMultibyte")->isChecked()) {
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE);
|
||||
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1951,6 +1966,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
|
|||
case BARCODE_HIBC_QR:
|
||||
settings.setValue("studio/bc/qrcode/size", get_combobox_index("cmbQRSize"));
|
||||
settings.setValue("studio/bc/qrcode/ecc", get_combobox_index("cmbQRECC"));
|
||||
settings.setValue("studio/bc/qrcode/mask", get_combobox_index("cmbQRMask"));
|
||||
settings.setValue("studio/bc/qrcode/encoding_mode", get_button_group_index(QStringList() << "radDM200Stand" << "radQRGS1" << "radQRHIBC"));
|
||||
settings.setValue("studio/bc/qrcode/chk_full_multibyte", get_checkbox_val("chkQRFullMultibyte"));
|
||||
break;
|
||||
|
@ -1965,12 +1981,14 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
|
|||
case BARCODE_HANXIN:
|
||||
settings.setValue("studio/bc/hanxin/size", get_combobox_index("cmbHXSize"));
|
||||
settings.setValue("studio/bc/hanxin/ecc", get_combobox_index("cmbHXECC"));
|
||||
settings.setValue("studio/bc/hanxin/mask", get_combobox_index("cmbHXMask"));
|
||||
settings.setValue("studio/bc/hanxin/chk_full_multibyte", get_checkbox_val("chkHXFullMultibyte"));
|
||||
break;
|
||||
|
||||
case BARCODE_MICROQR:
|
||||
settings.setValue("studio/bc/microqr/size", get_combobox_index("cmbMQRSize"));
|
||||
settings.setValue("studio/bc/microqr/ecc", get_combobox_index("cmbMQRECC"));
|
||||
settings.setValue("studio/bc/microqr/mask", get_combobox_index("cmbMQRMask"));
|
||||
settings.setValue("studio/bc/microqr/chk_full_multibyte", get_checkbox_val("chkMQRFullMultibyte"));
|
||||
break;
|
||||
|
||||
|
@ -2174,6 +2192,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
|
|||
case BARCODE_HIBC_QR:
|
||||
set_combobox_from_setting(settings, "studio/bc/qrcode/size", "cmbQRSize");
|
||||
set_combobox_from_setting(settings, "studio/bc/qrcode/ecc", "cmbQRECC");
|
||||
set_combobox_from_setting(settings, "studio/bc/qrcode/mask", "cmbQRMask");
|
||||
set_radiobutton_from_setting(settings, "studio/bc/qrcode/encoding_mode", QStringList() << "radDM200Stand" << "radQRGS1" << "radQRHIBC");
|
||||
set_checkbox_from_setting(settings, "studio/bc/qrcode/chk_full_multibyte", "chkQRFullMultibyte");
|
||||
break;
|
||||
|
@ -2188,12 +2207,14 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
|
|||
case BARCODE_HANXIN:
|
||||
set_combobox_from_setting(settings, "studio/bc/hanxin/size", "cmbHXSize");
|
||||
set_combobox_from_setting(settings, "studio/bc/hanxin/ecc", "cmbHXECC");
|
||||
set_combobox_from_setting(settings, "studio/bc/hanxin/mask", "cmbHXMask");
|
||||
set_checkbox_from_setting(settings, "studio/bc/hanxin/chk_full_multibyte", "chkHXFullMultibyte");
|
||||
break;
|
||||
|
||||
case BARCODE_MICROQR:
|
||||
set_combobox_from_setting(settings, "studio/bc/microqr/size", "cmbMQRSize");
|
||||
set_combobox_from_setting(settings, "studio/bc/microqr/ecc", "cmbMQRECC");
|
||||
set_combobox_from_setting(settings, "studio/bc/microqr/mask", "cmbMQRMask");
|
||||
set_checkbox_from_setting(settings, "studio/bc/microqr/chk_full_multibyte", "chkMQRFullMultibyte");
|
||||
break;
|
||||
|
||||
|
|
|
@ -173,6 +173,10 @@ namespace Zint {
|
|||
m_option_2 = option;
|
||||
}
|
||||
|
||||
int QZint::option3() const {
|
||||
return m_option_3;
|
||||
}
|
||||
|
||||
void QZint::setOption3(int option) {
|
||||
m_option_3 = option;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
int option2() const;
|
||||
void setOption2(int option);
|
||||
|
||||
int option3() const;
|
||||
void setOption3(int option);
|
||||
|
||||
float scale() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue